[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Integrating Monit alerts in ServiceNow
From: |
Lutz Mader |
Subject: |
Re: Integrating Monit alerts in ServiceNow |
Date: |
Fri, 21 Sep 2018 21:21:09 +0200 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 |
Hello Victor,
we use the following to handle program checks.
check program Manager_Coll with path "/usr/local/monit/scripts/emcoll.sh"
if status > 1 then exec "/usr/local/monit/scripts/servnow.sh"
else if succeeded then exec "/usr/local/monit/scripts/servnow.sh"
The "emcoll.sh" script ends with rc 0 if everything works well, but with
a rc 2 (or higher) if something does not work.
> As a test we disable the ntp service and nothing happens.
>
> If we run the snow.sh script it connects and a ticket is created with no
> data inside
As long as "ntpStatus.sh" ends with "exit 1" (not 0) and the script
"/snow.sh" is executable, your approach should work.
Best regards,
Lutz