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 ?
Eventhandler unable to read $SERVICEOUTPUT$
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Eventhandler unable to read $SERVICEOUTPUT$
$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.
If you still have trouble please post the commands that are not working and any corresponding scripts.