Larkspur exposes its numbers in the Prometheus text format on the port given by
metrics_port, 9187 by default. Each worker serves its own numbers; the queue numbers come
from the database and are the same on every worker.
| Metric | Type | Meaning |
|---|---|---|
| larkspur_jobs_waiting | gauge | jobs waiting, per queue |
| larkspur_oldest_waiting_seconds | gauge | age of the oldest waiting job, per queue |
| larkspur_jobs_finished_total | counter | jobs finished by this worker |
| larkspur_jobs_failed_total | counter | failed attempts on this worker |
Alert on the age of the oldest waiting job, not on the number of waiting jobs. A thousand jobs that each take a millisecond are no problem; ten jobs that have waited an hour are.
- alert: LarkspurBacklog expr: larkspur_oldest_waiting_seconds > 600 for: 5m