Page 1 of 1

Eventhandler unable to read $SERVICEOUTPUT$

Posted: Tue Apr 17, 2018 6:37 am
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 ?

Re: Eventhandler unable to read $SERVICEOUTPUT$

Posted: Tue Apr 17, 2018 8:10 am
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.