Generic Docker image to push a freshness metric to the Prometheus Pushgateway.
This metric can be used to determine whether a (cron) job was executed within a certain period or not.
This will push the metric freshness{job="Example",name="Foo",branch="Bar"}
to
the Pushgateway:
PUSHGATEWAY=https://prometheus.example.com:9091
docker run -t --rm -e PUSHGATEWAY=$PUSHGATEWAY freshness job=Example name=Foo branch=Bar
Note that you must always specify the PUSHGATEWAY
endpoint and the job
key-value pair.