Page 1 of 1

After Edit "Run on this host only" unchecked

Posted: Mon Jan 18, 2016 10:51 am
by WillemDH
Hello,

I was playing around with Nagios XI and Reactor and noticed that after editing an already configured Reactor chain for a specific service where you choose to check the box "Run on this host only", this checkbox is suddenly unchecked. This can be potentially very dangerous.

See screenshot. The configured chain should remember the configuration of the checkbox.

EDIT: Also the %type% macro does not seem to work properly? Reactor always receives %type% and not SOFT or HARD?

Grtz

Re: After Edit "Run on this host only" unchecked

Posted: Mon Jan 18, 2016 6:08 pm
by ssax
This is actually a bit more tricky than I expected, I will need to consult with the devs on the best course of action. I'll update you tomorrow, if you don't hear from me by the end of tomorrow, reply to this thread so it pops up on my dashboard.

Thank you

Re: After Edit "Run on this host only" unchecked

Posted: Tue Jan 19, 2016 4:42 am
by WillemDH
ok, FYI, I was able to use %servicestatetype% which did give me SOFT or HARD as expected. I'm not really sure what %type% macro is supposed to return?

Re: After Edit "Run on this host only" unchecked

Posted: Tue Jan 19, 2016 4:26 pm
by ssax
Just "type" is not listed as a standard macro.

https://assets.nagios.com/downloads/nag ... olist.html

Re: After Edit "Run on this host only" unchecked

Posted: Tue Jan 19, 2016 5:28 pm
by ssax
I fixed this, I also fixed it so when you click the Create button it reloads them so it shows up instead of it looking like nothing happened.
reactoreventhandler.zip
Looks like the ones that you've set with "Run on this host only" will not have saved properly, you would have to re-edit them and save.

Thank you

Re: After Edit "Run on this host only" unchecked

Posted: Wed Jan 20, 2016 3:05 am
by WillemDH
Sean

Thanks! The Reactor chains are loaded correctly with the https url configured in Reactor integration settings.. I do have some questions / concerns about the way it works.

What are the differences between a normal event handler and a Reactor event handler? I cannot see any configuration in the CCM service => check settings => Event handler? Where is this configuration saved?

How can we get an overview of all configured Reactor event handlers?

Is there some way to mass edit configured Reactor event handlers? What if someone misconfigured a Reactor event handler and did not set the "Run on this host only" checkbox. This event handler could suddenly be set for 800 services. I can imagine the horror having to go through each one to disable them?

Grtz

Re: After Edit "Run on this host only" unchecked

Posted: Wed Jan 20, 2016 12:01 pm
by ssax
The configuration is stored in the DB.

You can get an overview by going to Admin > Reactor Integration and click on either the Global Event Handlers or Host/Service Event Handlers tabs.

There is not currently a way to mass edit configured reactor event handlers, I've created a feature request for this:

Code: Select all

NEW TASK ID 7527 created - Nagios XI Feature Request: Reactor Component - Add ability to bulk modify Reactor event handlers
That being said, there are 3 types that you can create:

Host
Service
Host + Service (This means run on this host only for this service)

If you didn't select "Run on this host only" (which will run it for ALL services with that same name) it doesn't create one per service, it only creates one with that option set. What I've found is that if you go to Home > Service Detail > Click on the Service and then click on the Reactor Event Handlers Tab it will show you the one that is running for ALL services with this name. If you click the Edit button, check the box for "Run on this host only", and click Save it will edit the original one and it will stop it from applying to ALL services with that name. It essentially changes it from a Service one to a Host + Service one.

Let me know if you have any questions.

Re: After Edit "Run on this host only" unchecked

Posted: Wed Jan 20, 2016 12:06 pm
by ssax
In addition to the above post, you can also go to Admin > Reactor Integration > Host/Service Event Handlers Tab
- Click the Edit button
- Change it from Service to Service + Host and re-select what you want for the Host and Service
- Click Save

That will also fix it.

Re: After Edit "Run on this host only" unchecked

Posted: Wed Jan 20, 2016 12:25 pm
by WillemDH
In addition to the above post, you can also go to Admin > Reactor Integration > Host/Service Event Handlers Tab
- Click the Edit button
- Change it from Service to Service + Host and re-select what you want for the Host and Service
- Click Save
This answers my question and eased my mind! Thanks for the feature requests and for the patched Reactor integration component. It is working fine now with HTTPS. You can close this thread.

Re: After Edit "Run on this host only" unchecked

Posted: Wed Jan 20, 2016 4:30 pm
by bwallace
Glad we(Sean) were able to help. We'll lock this thread now and feel free to open another should you require assistance with anything else.