What are the pitfalls of the Pushgateway?
AdvancedConceptPrometheus Architecture
Answer
- Metrics never expire: a job that stopped running still shows its last value forever unless you delete the group (
curl -X DELETE .../metrics/job/db_backup). - You lose
uphealth per job; the Pushgateway is up even if jobs are dead. - It is a single point of failure and bottleneck if many instances push.
- Using it for long-running services just turns pull into a worse push.
So we push a last_success_timestamp and alert on time() - backup_last_success_timestamp_seconds > 90000, which works even when the job never ran.
More on Prometheus Architecture
Describe the Prometheus architecture.BeginnerWhat does a basic prometheus.yml look like?BeginnerWhat is the `up` metric?BeginnerWhat are `job` and `instance` labels and where do they come from?BeginnerHow is the Prometheus TSDB organized on disk?AdvancedWhat is the WAL and why does Prometheus restart slowly sometimes?Advanced