Page 1 of 1

Nagios Alerts Creation with Event Handlers

Posted: Wed Sep 07, 2016 5:18 am
by RIDS_I2MP
Hi Team,

I am trying to fire an event handler by passing some Macros like Service Name and Host Name but when I am trying to fetch these macros in script, The service names are either coming blank or returning the HostNames itself. Can you pls assist me if I need to update any settings on the Nagios side. Please find the command below for event handler.

/home/Test/event_handler_test.sh $HOSTNAME$ $HOSTSTATE$ $HOSTSTATETYPE$ $HOSTOUTPUT$ $SERVICEDESC$ $SERVICESTATE$ $SERVICEOUTPUT$ $SERVICENOTES$ $NOTIFICATIONTYPE$ $CONTACTEMAIL$ $HOSTGROUPNAMES$ $SERVICEGROUPNAMES$ $SERVICE$

Re: Nagios Alerts Creation with Event Handlers

Posted: Wed Sep 07, 2016 12:37 pm
by tgriep
Some service macros are not valid when a host check is ran as well as some host macros are not valid when a service check is ran.
I am guessing that this is what you are seeing so you may have to adjust your event handlers to match.
The link below is a matrix that shows the macros and when they are valid.
https://assets.nagios.com/downloads/nag ... olist.html
Take a look at it and let is know if it helps.