Page 1 of 1

assigning multiple handlers

Posted: Mon Feb 15, 2016 2:54 am
by sizmek_il
Hi Guys,

Is there a way to assign more than one handler to specific check?
We're have one handler already assigned to all the checks, now we need to add more various handlers to various checks.
The use case is that one handler is used to send SNMP host/service notification to MOM system, other handlers will be used for auto recovery of alerts.

for exampe:
check_a
- handler_generic_SNMP
- handler_restart_service

check_b
- handler_generic_SNMP
- handler_clean_logs

Please share your thoughts.

Thanks,
Alex.

Re: assigning multiple handlers

Posted: Mon Feb 15, 2016 5:23 pm
by rkennedy
For multiple event handlers, you should be able to create a wrapper script to run multiple scripts when it's triggered.

Other then that, I don't think there is a way at this time. I can file a feature request for this though, but it would fall under Core development.

Would you like me to file a request?

Re: assigning multiple handlers

Posted: Tue Feb 16, 2016 4:43 am
by sizmek_il
What about the Global event handlers?
Can I use this option for the SNMP trap handler as it s a global handler that should run for all checks and than use the ordinary handler for the other purpose? can they run together?

Thanks !

Re: assigning multiple handlers

Posted: Tue Feb 16, 2016 2:27 pm
by tgriep
Yes, you can use the Global Event Handler for your SNMP trap handler and then use the host / service event handler for your other purpose without any issue.
Take a look at this document for enabling Global Event Handlers in XI.
https://assets.nagios.com/downloads/nag ... ios-XI.pdf