Introducing Heartbeats

Time for some exciting news from your friends at elmah.io. Introducing elmah.io Heartbeats.

We don't just want to be your go-to tool when needing to monitor web applications. All companies use a combination of tools and frameworks to create business value for their customers. Windows services, Scheduled tasks, Azure Functions, Hangfire jobs, Quartz.NET, etc. are all frequently used tools. With elmah.io Heartbeats, we provide monitoring for exactly that line of tools.

With elmah.io error monitoring and logging, you have always had the possibility of logging and monitoring errors in tasks and services. But what happens when your scheduled task doesn't run or someone accidentally stopped one of your Windows services or Azure Functions? With elmah.io Heartbeats, you set up an expected interval and grace period and elmah.io will automatically verify that your task or service runs as expected. All you need to do is to notify elmah.io when your task or service is running using either one of the integrations or using the client/API. There are integrations for popular frameworks like Hangfire, Azure Functions, ASP.NET Core, and Umbraco.

Check out elmah.io Heartbeats in action:

Let me introduce you to one of the already popular integrations for elmah.io Heartbeats. Using the Elmah.Io.AspNetCore.HealthChecks package you can instruct your ASP.NET Core application to run a set of health checks every hour and notify elmah.io Heartbeats. Start by creating a new Heartbeat:

Next, install the NuGet package:

Install-Package Elmah.Io.AspNetCore.HealthChecks

Enable Health Checks with ASP.NET Core and include the publisher for elmah.io Heartbeats:

services
    .AddHealthChecks()
    .AddElmahIoPublisher(options =>
    {
        options.ApiKey = "API_KEY";
        options.LogId = new Guid("LOG_ID");
        options.HeartbeatId = "HEARTBEAT_ID";
    });

You probably already know how to find the values of API_KEY and LOG_ID. Each heartbeat has a unique Id available on the Instructions page on elmah.io. Replace HEARTBEAT_ID with the Id from your newly created heartbeat.

Finally, tell ASP.NET Core how often to run health checks:

services.Configure<HealthCheckPublisherOptions>(options =>
{
    options.Period = TimeSpan.FromHours(1);
});

That's it. Your ASP.NET Core application will now automatically run a health check every hour and send the result to elmah.io Heartbeats. If we receive a failing report or no report at all, we will automatically create an error in your normal error log. Whatever notification method you have already set up works without needing any additional configuration.

This is a simple example of the strengths of elmah.io Heartbeats. As already mentioned we provide integrations with popular frameworks like Hangfire and Azure Functions. Check out the documentation site for all the details. If you want to learn more, check out the elmah.io Heartbeats features page. We already see elmah.io Heartbeats cover a need for the users who have been part of the beta.

elmah.io: Error logging and Uptime Monitoring for your web apps

This blog post is brought to you by elmah.io. elmah.io is error logging, uptime monitoring, deployment tracking, and service heartbeats for your .NET and JavaScript applications. Stop relying on your users to notify you when something is wrong or dig through hundreds of megabytes of log files spread across servers. With elmah.io, we store all of your log messages, notify you through popular channels like email, Slack, and Microsoft Teams, and help you fix errors fast.

See how we can help you monitor your website for crashes Monitor your website