Eventhandler unable to read $SERVICEOUTPUT$

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
sac1472
Posts: 66
Joined: Thu May 25, 2017 5:06 am

Eventhandler unable to read $SERVICEOUTPUT$

Post by sac1472 »

Hello,
i want to add event handler script & that should be excuted on perticular error shown in nagios. for that, i want read service output using macro $SERVICEOUTPUT$ OR $LONGSERVICEOUTPUT$. but those macros are not working.
Also, i am able to use below macros but with them, i also want to read service output. which is not working.
$SERVICESTATE$ $SERVICESTATETYPE$

can someone have any idea about how to use $SERVICEOUTPUT$ & $LONGSERVICEOUTPUT$ macros with event handler ?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Eventhandler unable to read $SERVICEOUTPUT$

Post by scottwilkerson »

$SERVICEOUTPUT$ & $LONGSERVICEOUTPUT$ should work fine with event handlers, however you likely need to wrap them in quotes because they often have spaces and special chars in the output.

If you still have trouble please post the commands that are not working and any corresponding scripts.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked