Hello,
I'd like to put in a feature request: hierarchical event handlers. For complex environments like ours, we may need a half-dozen different event handlers for a single service, many of which are co-dependent or at least sequential. This feature would aid us immensely in turning Nagios from reactive to proactive.
Thank you.
-- Mike Beebe
Feature Request: multiple event handlers
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Feature Request: multiple event handlers
We can add this as a feature request for the underlying Core engine, but I did want to make you aware that many people accomplish what you are looking to do by creating one script that calls multiple other script passing the argument to each.
this can easily be done in bash
for example, if you have an event handler defined as something like the following:
In my_multi_handler.sh you can call any number of additional scripts passing the same args, such as
this can easily be done in bash
for example, if you have an event handler defined as something like the following:
Code: Select all
$USER1$/my_multi_handler.sh "$HOSTADDRESS$" "$HOSTNAME$" "$HOSTSTATE$"Code: Select all
#!/bin/bash
/path/to/1st_event.sh "$1" "$2" "$3"
/path/to/2nd_event.sh "$1" "$2" "$3"
/path/to/3rd_event.sh "$1" "$2" "$3"Re: Feature Request: multiple event handlers
Yes, that's what we're doing right now, but's it's not scalable or long-term supportable.
Feel free to close ticket and thanks for submitting the suggestion.
-- Mike Beebe
Feel free to close ticket and thanks for submitting the suggestion.
-- Mike Beebe
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Feature Request: multiple event handlers
Great!mbeebe wrote:Yes, that's what we're doing right now, but's it's not scalable or long-term supportable.
Feel free to close ticket and thanks for submitting the suggestion.
-- Mike Beebe
Locking thread