Icinga / icinga2

The core of our monitoring platform with a powerful configuration language and REST API.
https://icinga.com/docs/icinga2/latest
GNU General Public License v2.0
2k stars 575 forks source link

Disabling checks via feature command switches does not affect child zones #9845

Open log1-c opened 1 year ago

log1-c commented 1 year ago

Describe the bug

When using the feature command switches under /icingaweb2/health#!/icingaweb2/icingadb/health to disable host or service checks, I would expect them to stop completely. But they are still being executed image image

To Reproduce

Provide a link to a live example, or an unambiguous set of steps to reproduce this bug. Include configuration, logs, etc. to reproduce, if relevant.

  1. go to /icingaweb2/health#!/icingaweb2/icingadb/health
  2. disable active checks

Expected behavior

No checks are executed.

Your Environment

Include as many relevant details about the environment you experienced the problem in

julianbrost commented 1 year ago

Where are these checks executed, are they running on the master or some satellite or agent? Also, are you using any HA zones?

log1-c commented 1 year ago

The checks are running one two satellite nodes belonging to one satellite zone.

julianbrost commented 1 year ago

Looks like that flag is only synced within a zone but not to any child zones, so that change stays within the master zone.

Al2Klimov commented 1 year ago

We could stop processing checks from below nodes as long as they're disabled. 🙈

But jokes aside, IW2 actually just updates an attribute of a config object. And that runtime change is just synced inside the zone as usual. As long as not all Icinga 2 versions in a cluster forward such specific attribute updates below, we can only consider the option I described in the above paragraph. As a bridge technology.

Tqnsls commented 1 year ago

We could stop processing checks from below nodes as long as they're disabled. 🙈

I don't think you meant nothing else, but the config changes for the other buttons, especially the Event Handlers, should also be distributed to the child zones. We had to learn this the hard way that event handlers are not disabled globally by toggling the switch in IW2.

Is there another option to "globally" disable host/ service checks and eventhandlers without curl'ing the endpoints in the child zone?

Al2Klimov commented 1 year ago

💡 You could try putting the IcingaApplication in a global zone, maybe it will broadcast the updates then. But I don't know whether it works.