deltachat / notifiers

Notify devices
Apache License 2.0
6 stars 0 forks source link

feat: add Prometheus metrics #26

Closed link2xt closed 7 months ago

link2xt commented 7 months ago

This adds endpoint for Prometheus. When started with --metrics 127.0.0.1:9001, there is an additional web server. Then if I do curl http://127.0.0.1:9001/metrics I get this:

# HELP direct_notifications_total Number of direct notifications.
# TYPE direct_notifications_total counter
direct_notifications_total_total 2
# EOF

The idea is to point Prometheus monitoring to this so we can notice if the counter stops increasing, e.g. when TLS certificate expires and chatmail servers cannot notify anymore because of this.