[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Execute script if monit fails to send
From: |
Martin Pala |
Subject: |
Re: Execute script if monit fails to send |
Date: |
Fri, 22 Nov 2013 21:58:38 +0100 |
Hello,
there is no hook for executing script on M/Monit connection failure ... you can
either add standalone "check host" test as you mentioned, or to save the
connection attempt, you can just use "check file" with content match test on
Monit logfile, something like:
check file monit_log with path /var/log/monit.log
if match "M/Monit: cannot open a connection" then exec "..."
Regards,
Martin
On 08 Nov 2013, at 16:03, Holder, Shane <address@hidden> wrote:
> Hello all,
>
> I have a situation where I have network utilization constraints so I would
> like to not make unnecessary network calls if possible. Our network also
> goes down frequently so I need a way to execute a recovery process if we
> detect that the network has gone down. Our configuration of monit is to use
> M/Monit to monitor our devices so I was wondering if it was possible for
> monit to detect that it was unable to send and then execute the recovery
> process. I know that I could put in an additional rule to connect to the
> mmonit server but I would like to not add the additional network check if
> possible.
>
> Thanks,
>
> Shane Holder | address@hidden
> Solutions Architect | AmerisourceBergen Specialty Group
> 3101 Gaylord Parkway, 2W-E131 | Frisco, TX 75034
> (469)365-7727
>
> CONFIDENTIALITY NOTICE. This electronic mail transmission may contain
> privileged, confidential and/or protected health information and is intended
> only for the review of the party to whom it is addressed. Any unauthorized
> use or disclosure of the information contained herein may be a violation of
> federal law, including the Health Insurance Portability and Accountability
> Act (HIPAA). If you have received this transmission in error, please
> immediately return it to the sender, delete it and destroy it without
> reading it. Unintended transmission shall not constitute the waiver of the
> attorney-client or any other privilege.
>
>
>
>
> --
> To unsubscribe:
> https://lists.nongnu.org/mailman/listinfo/monit-general