Publishing ASP.NET Core 2.2 health check results to elmah.io

We just published a new integration between ASP.NET Core and elmah.io. As you already know, elmah.io comes with excellent support for ASP.NET Core. With the latest addition, integrating ASP.NET Core 2.2 health checks with elmah.io requires a few lines of code only. If you are not already familiar with health checks, I recommend you to read our guide ASP.NET Core 2.2 Health Checks Explained.

Back already? This means that you are now a true health checks expert and ready for the awesomeness to come. Health checks enables a much better approach to verify that your websites are working, compared to pinging the front page every 5 minutes. But, before putting health checks into production, you want to be able to monitor when your website starts complaining. elmah.io to the rescue!

Notice the call to the AddElmahIoPublisher-method, which is where the magic happens really. You probably also want to add custom checks using the AddCheck-method (as described in the guide), but I've excluded this for now.

Elmah.Io.AspNetCore.HealthChecks automatically picks up failing health checks and publish them to the log specified in the LOG_ID parameter. Your existing email subscriptions and apps will notify you when your website doesn't work as intended. The new package also works perfectly with an uptime monitoring service like Pingdom or elmah.io Uptime Monitoring.