Page 1 of 1
Bulk Change: Event Handlers?
Posted: Thu Aug 22, 2019 10:06 am
by mbeebe
Hello,
Is there a way to make bulk changes in order to add event handlers to a group of hosts/services? Apart from a lot of sed, that is.
Thanks as always,
-- Mike Beebe
Re: Bulk Change: Event Handlers?
Posted: Thu Aug 22, 2019 11:29 am
by eloyd
Do you have Nagios Enterprise add-on? If so, then you have the Bulk Change Tool in the Core Config Manager that will allow you to enable/disable the event handler for multiple services. It does not, however, let you specify what the event handler command is (this should be a feature request!)
The best thing you can do is to make a new service template that has the correct event handler information and then use the bulk change tool to apply the service template to multiple services. Then you've effectively added a layer of abstraction that does what you want.
But it still requires the bulk change tool. Otherwise, it's export/modify/import at the Nagios Core config file level.
Re: Bulk Change: Event Handlers?
Posted: Thu Aug 22, 2019 11:47 am
by benjaminsmith
Thanks Eric! I'll put in a feature request for the setting the event handler command in the Bulk Mods Tool.
@mbeebe, Just let us know if you have any additional questions.
Re: Bulk Change: Event Handlers?
Posted: Thu Aug 22, 2019 3:02 pm
by mbeebe
Thanks, Ben and Eloyd;
Will Global Event Handlers do what I want? I need to add an event handler to every host and service I'm monitoring.
-- Mike Beebe
Re: Bulk Change: Event Handlers?
Posted: Thu Aug 22, 2019 3:48 pm
by scottwilkerson
Global Event Handlers would do what you want if you want to add the same event handler to ALL hosts/services, but it cannot handle different handlers per host/service.
Re: Bulk Change: Event Handlers?
Posted: Thu Aug 22, 2019 3:52 pm
by eloyd
You could program logic into a global event handler that did different sub tasks for different services though.
Re: Bulk Change: Event Handlers?
Posted: Thu Aug 22, 2019 4:47 pm
by scottwilkerson
eloyd wrote:You could program logic into a global event handler that did different sub tasks for different services though.
true
Re: Bulk Change: Event Handlers?
Posted: Thu Aug 22, 2019 5:32 pm
by mbeebe
Can I please request this thread not be locked yet? I will have some other questions, but time prohibits me from asking them now.
Thanks,
-- Mike Beebe
Re: Bulk Change: Event Handlers?
Posted: Fri Aug 23, 2019 9:19 am
by benjaminsmith
Can I please request this thread not be locked yet? I will have some other questions, but time prohibits me from asking them now.
No problem. We'll keep it open.
Re: Bulk Change: Event Handlers?
Posted: Mon Aug 26, 2019 11:31 am
by mbeebe
Hello,
You may close this thread now as we're going to come at this from a different direction.
-- Mike Beebe