Re: Integrating Monit alerts in ServiceNow

Lutz Mader <[email protected]>
Newsgroups gmane.comp.monitoring.monit.general
Message-ID <[email protected]>
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


-- 
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.