[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: monitrc syntax
From: |
Roose, Marco |
Subject: |
RE: monitrc syntax |
Date: |
Fri, 26 Mar 2021 09:42:28 +0000 |
Hi Anthony,
this should be an easy task. I usually create a bash script doing the check
ant exiting with 1 on failed checks. The you could configure monit
check program DIG_foo_bar with path /etc/monit.d/check_baz.sh
if status != 0 then exec whatever_you_want.sh
See https://mmonit.com/monit/documentation/monit.html#PROGRAM-STATUS-TEST
where is an example with some script execution, too.
Kind regards,
Dr. Marco Roose
-----Original Message-----
From: monit-general
<monit-general-bounces+marco.roose=mpibpc.mpg.de@nongnu.org> On Behalf Of
Anthony Griffiths
Sent: Friday, March 26, 2021 9:23 AM
To: This is the general mailing list for monit <monit-general@nongnu.org>
Subject: monitrc syntax
hi I'm running centos 7 with monit-5.27.2 (built from source not yum).
monitrc is set to check every 30 seconds and I wondered if its possible that
monit could 'check' a dig command and if the ip address that came back was
wrong it would run a script. I've been through monitrc but can't work out a
way to do this or understand what the correct syntax would be. thanks for any
help
smime.p7s
Description: S/MIME cryptographic signature
- monitrc syntax, Anthony Griffiths, 2021/03/26
- RE: monitrc syntax,
Roose, Marco <=