Hi Team,
As we know that the for auto ticketing we will have one snow script. we will define one command. that command name will attach to service or host.
But what is the difference when we add the command to contact
when we add the command to eventhandler?
what will happen if we add the command to contact or eventhandler?
auto ticketing with contact and event handler
-
grayloglearn
- Posts: 222
- Joined: Thu Jul 06, 2017 8:55 am
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: auto ticketing with contact and event handler
Event handlers will fire every time the state changes for the object, whereas if you ass a notification handler to a contact that is added to an object it will only fire when:
In addition to the above, there are different macros available to event handlers vs. notification handlers
https://assets.nagios.com/downloads/nag ... olist.html
Most notably, you cannot get macros like $CONTACTNAME$ and $CONTACTEMAIL$ in an event handler because it is fired on the host/service object and not attached to a specific contact.
Code: Select all
a notification is triggered after max check attempts is reached
the notification timeperiod is valid
the host/service notification options are met
the contacts notification time periods are valid
the contacts notification options are met
https://assets.nagios.com/downloads/nag ... olist.html
Most notably, you cannot get macros like $CONTACTNAME$ and $CONTACTEMAIL$ in an event handler because it is fired on the host/service object and not attached to a specific contact.