monit-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Q: Arbitrary program status for process check?


From: SZÉPE Viktor
Subject: Re: Q: Arbitrary program status for process check?
Date: Sat, 06 Oct 2018 07:46:15 +0200
User-agent: Horde Application Framework 5

Idézem/Quoting Steven Christensen <address@hidden>:

Hello,

Long time monit user, and I really love it.

I have the following (equivalent) process monitor entry:

=====================================
check process xyzzy matching "xyzzy"
      start program "/root/start_xyzzy.sh"
      stop program /usr/bin/pkill -f "xyzzy"
=====================================

But sometimes the process can exist but it isn't doing what it needs to do.
I have another script which checks if xyzzy is actually working, and
returns a status depending on the results of the check.

So I'd like something that looks like this (note last line):
=====================================
check process xyzzy matching "xyzzy"
      start program "/root/start_xyzzy.sh"
      stop program /usr/bin/pkill -f "xyzzy"
      if program "/root/check_xyzzy.sh" status != 0 then restart
=====================================

It's the last line I don't know how to achieve. Are there any suggestions?

Thanks - Steven

Hello Steven!

I use tiny script with "depends on"
https://github.com/szepeviktor/debian-server-tools/blob/master/monitoring/monit/services/fail2ban_script
to check on services
https://github.com/szepeviktor/debian-server-tools/blob/master/monitoring/monit/services/fail2ban#L11


SZÉPE Viktor, honlap üzemeltetés / Running your application
https://github.com/szepeviktor/debian-server-tools/blob/master/CV.md
--
ügyelet/hotline: +36-20-4242498  address@hidden  skype: szepe.viktor
Budapest, III. kerület








reply via email to

[Prev in Thread] Current Thread [Next in Thread]