Re: Integrating Monit alerts in ServiceNow

2018-09-30 Thread Lutz Mader
Hello Victor, the oldes monit version I find is 5.19.0 and this version works well. >>> check program ntp-status with path /opt/vsd/sysmon/ntpStatus.sh >>> > >> if status != 0 then exec /usr/local/monit/scripts/snowfail >>> > >> else if succeeded then exec /usr/local/monit/ >>> > >>

Re: Integrating Monit alerts in ServiceNow

2018-09-24 Thread Lutz Mader
Hello Victor, I don't know the reason, the command will not executed. But it seems to me the used monit is an old version. >> check program ntp-status with path /opt/vsd/sysmon/ntpStatus.sh >> if status != 0 then exec /usr/local/monit/scripts/snowfail >> else if succeeded then exec

Re: Integrating Monit alerts in ServiceNow

2018-09-22 Thread Lutz Mader
Hello Victor, check your "monit.log" file. > For some reason is not I don't know what's going wrong. As long as the "ntpStatus.sh" ended with "exit 1" (or any other value from 1 to 255) your script should be called. check program ntp-status with path /usr/local/monit/scripts/script.sh if

Re: Integrating Monit alerts in ServiceNow

2018-09-21 Thread Lutz Mader
Hello Victor, > For some reason is not check program ntp-status with path "/opt/vsd/sysmon/ntpStatus.sh" if status !=0 then exec "/snow.sh" else if succeeded then exec "/snow.sh" What's happened I you add the "succeeded" rule. Are some messages in the monitor.log file, all the time the

Re: Integrating Monit alerts in ServiceNow

2018-09-21 Thread Lutz Mader
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

Re: Integrating Monit alerts in ServiceNow

2018-09-15 Thread Lutz Mader
Hello Victor, I don't know anything about the ServiceNow API, but some useful curl samples are available on the monit site, see https://mmonit.com/wiki/Notification/Notification > We need to integrate Monit alerts to our ServiceNow solution. > EMail/SMTP alerts are not permitted > ServiceNow will

Re: Integrating Monit alerts in ServiceNow

2018-09-14 Thread Lutz Mader
Hi again, I use $MONIT_SERVICE and $MONIT_EVENT only. The first step is I try to get the sys_id based on the resource name ($MONIT_SERVICE), then I update the table field ($MONIT_EVENT). The used $MONIT_SERVICE names are unique, this is the reason I can use the names. # ServiceNow init.