aspnet / Diagnostics

[Archived] Diagnostics middleware for reporting info and handling exceptions and errors in ASP.NET Core, and diagnosing Entity Framework Core migrations errors. Project moved to https://github.com/aspnet/AspNetCore
Apache License 2.0
213 stars 111 forks source link

Host Information #465

Closed steveoh closed 6 years ago

steveoh commented 6 years ago

I think it would be great to make general machine metrics easily available as a health check. I thought @DamianEdwards mentioned cpu/ram utilization etc on a community standup.

Example syntax

services.AddHealthChecks(x => { 
  x.AddCpu();
  x.AddRam()
);

I really like the ability to add a connection string as a check. I have not tried the preview bits but is that available for things like npgsql, redis, etc?

mkArtakMSFT commented 6 years ago

Thanks for contacting us, @steveoh. @rynowak FYI

steveoh commented 6 years ago

It would also be useful to output the configuration the application is running as.

glennc commented 6 years ago

We know that metrics based checks are a thing people are going to want to write. Where a metric check is being healthy/unhealthy based on some threshold of data you can collect. I think our samples have an example for memory. But we don't have a plan to include too many of these by default yet. You guys giving us the same examples of checks you want would help us decide which ones should be in the box, based on actual usage and scenarios.

There is work like this happening: https://github.com/dotnet/designs/blob/master/accepted/cross-platform-performance-monitoring.md and I would also like to see what form that takes before committing to a bunch of checks. For example, if the event pipe type system described in the linked doc exists then a check that lets you examine things from the event pipe makes sense, and may cover a large set of otherwise specialized scenarios. I don't know that it will, but I want to see and in the mean time it shouldn't be too hard to copy some samples or have community members provide some checks. I am trying to be conservative about what we put in the base system initially. Does that make sense?

mkArtakMSFT commented 6 years ago

Thanks @glennc. I'm closing this issue as it seems this feedback is incorporated in an effort, which is still in planning phase.