This support forum board is for support questions relating to
Nagios XI, our flagship commercial network monitoring solution.
-
thanigaivel.a
- Posts: 109
- Joined: Mon Jan 22, 2018 3:38 pm
Post
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]
-
thanigaivel.a
- Posts: 109
- Joined: Mon Jan 22, 2018 3:38 pm
Post
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]#
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
-
Contact:
Post
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'
-
thanigaivel.a
- Posts: 109
- Joined: Mon Jan 22, 2018 3:38 pm
Post
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]#
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
-
Contact:
Post
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