deltachat / chatmail

chatmail service deployment scripts and docs
https://delta.chat/en/2023-12-13-chatmail
MIT License
97 stars 5 forks source link

Add setting for metrics endpoint #328

Open link2xt opened 2 weeks ago

link2xt commented 2 weeks ago

Currently metrics are exposed over https under /metrics, but without any authentication. Metrics are generated with a cronjob. Current approach to metric generation is very limited, we have #183 open for exposing disk space and https://github.com/deltachat/chatmail/issues/273#issuecomment-2182007216

Since we want more dynamic metrics and expose data such as disk space that should not be publicly available, we will need to expose them over TCP and only to secure network, e.g. wireguard one.

By default we can expose metrics to localhost:9123 or something like this. Someone who wants to monitor chatmail instance can then create a VPN (e.g. wireguard) interface and point the metrics server there to be collected with prometheus on the other side.