0
I'd like to monitor a system service on a set of hosts that are all running centos. The status can easily be obtained from systemctl, but does anyone know of a way to send an email if the service dies (i.e. the state of the service is not "running")?
I'd like to avoid sending hundreds of emails if the service is down for hours at a time, which could mean avoiding short term cron jobs. I'd like maybe 1 email if the service goes down, possible as many as 1 an hour, but even that feels like a lot.
I've heard Nagios, Zabbix or Kapacitor might fit the bill here, but I'm not sure which would be best for solving this type of problem. Any advice would be very helpful.
1
This looks like a relevant answer: https://serverfault.com/questions/694818/get-notification-when-systemd-monitored-service-enters-failed-state
– Eric Renouf – 2017-06-19T13:48:17.357