From the course: ASP.NET Core: Health Checks and Logging
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Adding health checks - ASP.NET Core Tutorial
From the course: ASP.NET Core: Health Checks and Logging
Adding health checks
- [Instructor] How do we add our own custom logic to those health checks because so far the health check hasn't really been that impressive. Well, we have our services.AddHealthChecks call and what we can do there is we can add individual checks and there are different ways of doing it. I'll show you the most, let's say direct one. I add a check by providing a name which is nice later if we have specific output of those checks and then we have the implementations. This is really the easiest implementation I could think of that fits on a slide, just use a random number and if it's even then the application is healthy and if not, it's degraded. Let's try this out. Here we go. This is the AddHealthChecks call and that's where add check comes in. So my random health check and then the implementation will be that if new random number is even then we return health check result which comes from…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
(Locked)
Health checks explained1m 20s
-
(Locked)
Configuring health checks2m 33s
-
(Locked)
Adding health checks4m 31s
-
(Locked)
Adding database health checks7m 12s
-
(Locked)
Creating a UI8m 10s
-
(Locked)
Securing health check endpoints6m 42s
-
(Locked)
Challenge: Add a health check to the sample app1m 5s
-
(Locked)
Solution: Add a health check to the sample app7m 39s
-
(Locked)
Summary of health checks1m 28s
-
(Locked)