A countdown (timer) exporter for Prometheus
- Deadline - countdown timer expiration time.
- Threshold - configured prior to deadline (can be used as an countdown expiry warning)
The exporter expects either a YAML or JSON file with a single key, deadlines
, whose value is an array of objects containing these fields:
name
- timer name- type: string
description
- timer description- type: string
deadline-time
- timer expiry time- type: string
deadline-time-format
- golang time format string (Example golang time format constants)- type: string
- default: RFC3339
- Warning - exporter does not handle format strings without year, month, day, and tz info
threshold
- threshold quantity- type: int
- default: days
threshold-type
- threshold type from one of:years
,months
,days
,hours
,minutes
,seconds
- type: string
- default: RFC3339
- Name:
countdown_timers
- Labels:
countdown
- countdown timer namedescription
- timer descriptionexpired
- deadline expired status (true or false)deadline
- deadline/expiry timestampdeadline_time_format
- deadline timestamp formatthreshold
- threshold quantitythreshold_type
- threshold type (one of:years
,months
,days
,hours
,minutes
,seconds
)threshold_tripped
- threshold exceeded status (true or false)
The exporter can be configured with these environment variables:
COUNTDOWN_EXPTR_DEADLINES_FILE
- default: deadlines.yaml
COUNTDOWN_EXPTR_DEADLINES_FILE_TYPE
- default: yaml
COUNTDOWN_EXPTR_HTTP_PORT
9208- default: 9208
COUNTDOWN_EXPTR_CHECK_INTERVAL_SECS
- default: 60