Nagios Alerts Creation with Event Handlers

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
RIDS_I2MP
Posts: 751
Joined: Thu Mar 13, 2014 9:25 am

Nagios Alerts Creation with Event Handlers

Post 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$
Thanks & Regards,
I2MP Team.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Nagios Alerts Creation with Event Handlers

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked