Q: Arbitrary program status for process check?

Steven Christensen <[email protected]>
Newsgroups gmane.comp.monitoring.monit.general
Message-ID <CAPf-+Se-x+c3QW5sjwUfLGsDJ2MFhTXibcpA5f9u7Kjiuff9qQ@mail.gmail.com>
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

-- 
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.