After Edit "Run on this host only" unchecked

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent
Contact:

After Edit "Run on this host only" unchecked

Post 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
You do not have the required permissions to view the files attached to this post.
Last edited by WillemDH on Tue Jan 19, 2016 7:32 am, edited 1 time in total.
Nagios XI 5.8.1
https://outsideit.net
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

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

Post 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
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent
Contact:

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

Post 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?
Nagios XI 5.8.1
https://outsideit.net
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

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

Post by ssax »

Just "type" is not listed as a standard macro.

https://assets.nagios.com/downloads/nag ... olist.html
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

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

Post 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
You do not have the required permissions to view the files attached to this post.
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent
Contact:

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

Post 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
Nagios XI 5.8.1
https://outsideit.net
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

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

Post 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.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

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

Post 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.
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent
Contact:

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

Post 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.
Nagios XI 5.8.1
https://outsideit.net
bwallace
Posts: 1145
Joined: Tue Nov 17, 2015 1:57 pm

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

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