Page 2 of 2

Re: Nagios Event handler not working

Posted: Mon Aug 06, 2018 11:35 am
by thanigaivel.a

Code: Select all

[root@indeta3appu001 eventhandlers]# su nagios -c /usr/local/nagios/libexec/eventhandlers/event_handler_service 13.61.25.230_gdcsdbpecs 13.61.25.230_gdcsdbpecs 13.61.25.230 Swap Usage Swap Usage OK HARD 0 9228 20806
[root@indeta3appu001 eventhandlers]#
[quote][quote]See the output[/quote][/quote]

Re: Nagios Event handler not working

Posted: Mon Aug 06, 2018 11:55 am
by thanigaivel.a
I didn't get any error

Re: Nagios Event handler not working

Posted: Mon Aug 06, 2018 11:57 am
by thanigaivel.a
Here is the output for HARD. (still no error)

[root@indeta3appu001 eventhandlers]# su nagios -c /usr/local/nagios/libexec/eventhandlers/event_handler_service 13.61.25.230_gdcsdbpecs 13.61.25.230_gdcsdbpecs 13.61.25.230 Swap Usage Swap Usage OK HARD 0 9228 20806
[root@indeta3appu001 eventhandlers]#

Re: Nagios Event handler not working

Posted: Mon Aug 06, 2018 1:52 pm
by scottwilkerson
I'm sorry I missed the quotes

Code: Select all

su nagios -c '/usr/local/nagios/libexec/eventhandlers/event_handler_service 13.61.25.230_gdcsdbpecs 13.61.25.230_gdcsdbpecs 13.61.25.230 Swap Usage Swap Usage OK HARD 0 9228 20806'

Re: Nagios Event handler not working

Posted: Mon Aug 06, 2018 2:14 pm
by thanigaivel.a
FYI

[root@indeta3appu001 eventhandlers]# su nagios -c '/usr/local/nagios/libexec/eventhandlers/event_handler_service 13.61.25.230_gdcsdbpecs 13.61.25.230_gdcsdbpecs 13.61.25.230 Swap Usage Swap Usage OK HARD 0 9228 20806'
[root@indeta3appu001 eventhandlers]#

Re: Nagios Event handler not working

Posted: Mon Aug 06, 2018 2:34 pm
by scottwilkerson
This all appears to be correct.

You may want to modify the event handler to add the following to the end, so it would log any errors output when it runs from within nagios

Code: Select all

$USER2$/event_handler_service $HOSTNAME$ $HOSTALIAS$ $HOSTADDRESS$ $SERVICEDISPLAYNAME$ $SERVICEDESC$ $SERVICESTATE$ $SERVICESTATETYPE$ $SERVICEPROBLEMID$ $LASTSERVICEPROBLEMID$ $SERVICEEVENTID$ $SERVICEOUTPUT$ $LONGSERVICEOUTPUT$ >> /tmp/event_handler_service.log 2>&1
then you can look in /tmp/event_handler_service.log if it gives an error in the log