Skip to content

Instantly share code, notes, and snippets.

@scottsauber
Last active May 22, 2017 05:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scottsauber/be7ea44c24f63e47c20cb4e2ec2e68c6 to your computer and use it in GitHub Desktop.
Save scottsauber/be7ea44c24f63e47c20cb4e2ec2e68c6 to your computer and use it in GitHub Desktop.
Custom Health Checks
public void ConfigureServices(IServiceCollection services)
{
services.AddSingleton<CDriveHasMoreThan1GbFreeHealthCheck>();
services.AddHealthChecks(checks =>
{
checks.AddCheck<CDriveHasMoreThan1GbFreeHealthCheck>("C Drive has more than 1 GB Free");
});
services.AddMvc();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment