PremoWeb / chadburn

Chadburn is a scheduler alternative to cron, built on Go and designed for Docker environments.
MIT License
36 stars 4 forks source link

Implement basic Prometheus metrics #38

Closed jinnatar closed 2 years ago

jinnatar commented 2 years ago

Add a Prometheus compatible metrics endpoint to daemon mode:

Instrument Scheduler and job runner. Metrics provided are:

The most complex metric is chadburn_run_duration_seconds since it's a histogram. Example PromQL query to get average runtimes with a 5 minute window:

  rate(chadburn_run_duration_seconds_sum[5m])
/
  rate(chadburn_run_duration_seconds_count[5m])

Sample graph from that query on 3 relatively frequent and fast jobs: https://prnt.sc/cp9DBKKoCQ1t