assigning multiple handlers

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
sizmek_il
Posts: 10
Joined: Wed Sep 09, 2015 2:31 pm

assigning multiple handlers

Post 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.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: assigning multiple handlers

Post 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?
Former Nagios Employee
sizmek_il
Posts: 10
Joined: Wed Sep 09, 2015 2:31 pm

Re: assigning multiple handlers

Post 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 !
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: assigning multiple handlers

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