Crontab import & Prometheus metrics
Two ways to connect CronWarden to systems you already run: pull monitors in from an existing crontab, and push monitor state out to Prometheus.
Import from a crontab
If your jobs already live in a crontab, you don't have to re-enter them. Paste the crontab into the import screen and CronWarden parses it into candidate monitors — one per scheduled line, using each line's real schedule.
It understands the ordinary user-crontab format: five schedule fields plus a command, @daily-style shorthands, comments, blank lines, and environment assignments. Lines it can't turn into a monitor come back marked so you can see why rather than having them silently dropped:
- Skipped — valid crontab content that isn't a schedule to monitor, like
@rebootjobs or aMAILTO=line. - Invalid — a line it couldn't parse.
You review the preview, adjust names, and create the monitors in bulk.
Export to Prometheus
CronWarden exposes a Prometheus-format metrics endpoint so your own Prometheus can scrape the state of your monitors alongside the rest of your infrastructure:
GET /api/metrics
Authorization: Bearer cw_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Authenticated with a team API key, it returns per-monitor gauges for that team:
cronwarden_monitor_status— the monitor's current state as a number (0new,1up,2late,3degraded,4down,5paused).cronwarden_monitor_last_duration_seconds— how long the most recent successful run took (for monitors that measured one).cronwarden_monitor_last_value— the value the most recent successful run reported (for monitors that reported one).
Point a Prometheus scrape job at the endpoint with the key in an authorization header, and you can alert on or graph monitor state in the same place as everything else you run.