mailcow / mailcow-dockerized

mailcow: dockerized - 🐮 + 🐋 = 💕
https://mailcow.email
GNU General Public License v3.0
8.25k stars 1.12k forks source link

Public /healthcheck endpoint #5929

Open feyst opened 3 days ago

feyst commented 3 days ago

Summary

I would like to monitor my environment using an uptime monitor (for example Uptime Kuma). It would be nice if there would be a public endpoint that checks the status of all services and returns 200 status if all services are up and 500 something if any service is not working as expected.

Motivation

This way I can respond quicker if any service is having problems.

Additional context

Thanks for the awesome work!

BigPig22 commented 3 hours ago

I would love to see this. The problem with the current monitoring via watchdog is that this is internal monitoring only. If for whatever reason the watchdog service fails or Internet or DNS goes down there will be no notification.

Active external monitoring will be much more reliable and having an endpoint for that rather then checking general reachability of the server would be awesome.

mrclschstr commented 1 hour ago

Active external monitoring will be much more reliable...

Perhaps a little off-topic: I would like the watchdog to be linked to an external service, such as https://healthchecks.io/.

Regular pings to healthchecks.io would ensure the function of the watchdog and information about malfunctions could be communicated via the status codes and logs. The idea is not new either: https://github.com/mailcow/mailcow-dockerized/issues/228#issuecomment-298345453