Page 1 of 1

event handler is not working for me

Posted: Thu Feb 23, 2017 1:38 pm
by alex.shane
I am running Nagios XI on CentOS 7 and trying to push my script to populate events to our web portal, here is what we use

curl --user test1:xxxx "https://crucible01.service-now.com/api/ ... e/em_event" --request POST --header "Accept:application/json" --header "Content-Type:application/json" --data "{\"source\":\"NagiosXI\",\"node\":\"$HOSTNAME\",\"type\":\"$SERVICEDESC\",\"severity\":\"$HOSTSTATEID\",\"description\":\"$HOSTOUTPUT\",\"event_class\":\"NagiosXI\",\"message_key\":\"NagiosXI_$SERVICEDESC_$HOSTNAME\"}"

it's not populating description, type, resource, Severity and alert. Also showing an error in state column. Let me know if I am doing anything wrong with the configurations or the script?

Thank,
Alex

Re: event handler is not working for me

Posted: Thu Feb 23, 2017 5:55 pm
by avandemore
Have you read through this document?

https://assets.nagios.com/downloads/nag ... ios-XI.pdf

Have you confirmed the handler is getting the vars?