MONIT to monitor all running "Services" and email when stoped?

Started by lar.hed, December 01, 2023, 05:58:40 PM

Previous topic - Next topic
So I am trying to figure out (that is to learn) how to setup Monit to send me an email when one (or more for that matter, on email per services I guess) service fails(/stops).

But I can not wrap my head around how to do that. From the attached picture you can see all the services I am currently running - how do I in one Monitor instance (/row?) enable this? I can not test on stopped process as far as I am aware - and PID file will change from time to time. What or maybe more accurate where did I turn wrong?

I just set this up for configd (it's been broken since I installed then removed sensei).  Basically whenever I update opn or install a plugin...it stops then restarts configd...issue is it doesn't get restarted. 

So monit watches the pid file...When it sees it's no longer there...after a minute it runs the service command.


Ah - I think I got it a bit better, however the igmpproxy does not have a pid - but someone else on this forum already solved that kind of, so I copied that for igmpproxy.

Thanks!