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.
assigning multiple handlers
Re: assigning multiple handlers
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?
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
Re: assigning multiple handlers
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 !
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
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
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!