Home - gonace/Cronitor GitHub Wiki
Cronitor is a service for heartbeat-style monitoring of anything that can send an HTTP request. It's particularly well suited for monitoring cron jobs, Jenkins jobs, or any other scheduled task.
This is the documentation for Cronitor, the .NET client for the Cronitor API. It has two parts:
- Telemetry: report when your jobs run, complete or fail.
- Management: create, read, update and delete monitors, issues and notifications, and read a monitor's activity.
Quick start
dotnet add package Cronitor
CronitorClient.Configure("apiKey");
using (var run = await CronitorClient.StartAsync("monitorKey"))
{
// ... do the work
await run.CompleteAsync();
}
The run is reported when it starts, and as complete when CompleteAsync is called. If the work throws, the run is disposed without it and reported as failed. A monitor that doesn't exist yet is created by its first event.
CronitorClientused to be calledCronitor. That name still works but is obsolete: it shares its name with the namespaceCronitor, so it can only be called asCronitor.Cronitor.
Pages
Getting started
- Setup: install, the static class, the .NET Generic Host and dependency injection.
- Errors and logging: what happens when a call fails, and how to log it.
Telemetry (Telemetry API)
- Telemetry: run, complete, fail and tick, the using block, environments and custom commands.
Management
- Monitors (Monitor API): list, get, create, update, clone, delete, pause and unpause.
- Schedules and assertions: the fluent builders for a monitor's schedule and assertions.
- Activity: a monitor's activity, alerts and pings.
- Issues (Issues API): list, get, create, update and delete.
- Notifications (Notifications API): list, get, create, update and delete.
Integrations
- Integrations: report Quartz.NET, Hangfire, TickerQ and Coravel jobs without any reporting code in the jobs.