Global Event Handlers

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
klee
Posts: 147
Joined: Fri Apr 04, 2014 2:31 pm

Re: Global Event Handlers

Post by klee »

Yes, both xi_host_event_handler & xi_service_event_handler commands already exit.

and they were already defined as Abrist showed them (verbatim).

Is there something else that needs to be done in order to "...map other nagios macros to the %vars% by editing the following commands in the ccm", as abrist suggested?

Or did you guy mean Global Event Handlers already recognize Nagios macros "out of the box"; and all we need to do (to allow additional macros to be recognized) is to follow the exiting format?

Sorry, I just couldn't fully comprehend Abrist's initial answer:

"Only to using the %variables%. BUT, you can map other nagios macros to the %vars% by editing the following commands in the ccm: "

Thank You,

-klee
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Global Event Handlers

Post by abrist »

I updated the global event handlers doc, it will be updated on library soon, but for now it is attached below. You need to edit the following commands in the ccm.
1. Go to Configure --> Core config manager --> commands
2. Edit: xi_host_event_handler
3. Add the mapping to the end of the command. For this example we will use hostduration:

Code: Select all

--hostduration="$HOSTDURATION$" 
4. Apply config.
5. Now you can use the variable %hostduration% in the global event handler component.

The same type of additional mapping can be added to the xi_service_event_handler command (though the mapped nagios macro needs to be supported by a service object).
You do not have the required permissions to view the files attached to this post.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
klee
Posts: 147
Joined: Fri Apr 04, 2014 2:31 pm

Re: Global Event Handlers

Post by klee »

Got it, thanks Abrist.

And thank you for the updated the global event handlers doc.

Please feel free to close thread.

-klee
Locked