Skip to content

ahydrax/Hangfire.Heartbeat

Repository files navigation

Hangfire.Heartbeat

NuGet NuGet Tests

A CPU/RAM usage monitoring plugin for Hangfire. Multiple processes are supported.

dashboard

Read about hangfire here: https://github.com/HangfireIO/Hangfire#hangfire- and here: http://hangfire.io/

Instructions

Install a package from Nuget.

Then add this in your code:

for service side:

app.UseHangfireServer(additionalProcesses: new[] { new ProcessMonitor(checkInterval: TimeSpan.FromSeconds(1)) });

for dashboard:

services.AddHangfire(configuration => configuration.UseHeartbeatPage(checkInterval: TimeSpan.FromSeconds(1)));

It's not recommended to specify checkInterval less than 1 second as it can cause additional load on db server. Also I recommend to use the same interval as for server and dashboard.

Credits

License

Authored by: Viktor Svyatokha (ahydrax)

This project is under MIT license. You can obtain the license copy here.