Page 1 of 1

nagiosxi event_handler

Posted: Tue Nov 07, 2017 11:54 am
by lewislopez
I have the following cfg with event handler enabled. How can I prevent the event handler from running on warning. I only want it to execute on critical... ?? I still want to receive warning notification but I don't want the event handler to run on warning.

define service{
use generic-service
host_name altoona
service_description Check Proc CPU Usage
event_handler event_handler_oaprod_proc
event_handler_enabled 1
contacts mail_sa_altoona,mail_oaprod_24
check_command check_proc_cpu!12!15

Re: nagiosxi event_handler

Posted: Tue Nov 07, 2017 12:08 pm
by kyang
You would need to add macros to your event handler.

This documentation gives you a few examples of what you could do to specify when an event handler should run. (Starting from page 9)

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

The macros would be $SERVICESTATE$ $SERVICESTATETYPE$ to specify when executing on critical.