Icinga2: MaxConcurrentChecks constant is ignored

Created on 11 Apr 2019  路  4Comments  路  Source: Icinga/icinga2

Describe the bug

When trying to increase the number of max concurrent checks, Icinga2 is ignoring the value set in the constants.conf file.

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. Add const MaxConcurrentChecks = 1024 to the constants.conf file
  2. Restart icinga2
  3. Open Icinga2 console and do a log(MaxConcurrentChecks). The printed value is the default 512.

Expected behavior

Have the MaxConcurrentChecks value increased.

Your Environment

  • Version used (icinga2 --version): r2.10.3-1
  • Operating System and version: Debian Stretch
  • Enabled features (icinga2 feature list): api checker ido-pgsql livestatus mainlog notification
  • Icinga Web 2 version and modules (System - About):
  • Config validation (icinga2 daemon -C):
[2019-04-11 09:23:18 +0000] information/cli: Icinga application loader (version: r2.10.3-1)
[2019-04-11 09:23:18 +0000] information/cli: Loading configuration file(s).
[2019-04-11 09:23:19 +0000] information/ConfigItem: Committing config item(s).
[2019-04-11 09:23:19 +0000] information/ApiListener: My API identity: XXXXX
[2019-04-11 09:23:29 +0000] information/WorkQueue: #4 (DaemonUtility::LoadConfigFiles) items: 0, rate: 17.6/s (1056/min 1056/5min 1056/15min);
[2019-04-11 09:23:29 +0000] information/WorkQueue: #6 (ApiListener, SyncQueue) items: 0, rate:  0/s (0/min 0/5min 0/15min);
[2019-04-11 09:23:29 +0000] information/WorkQueue: #5 (ApiListener, RelayQueue) items: 0, rate:  0/s (0/min 0/5min 0/15min);
[2019-04-11 09:23:31 +0000] information/ConfigItem: Instantiated 151957 Services.
[2019-04-11 09:23:31 +0000] information/ConfigItem: Instantiated 1 LivestatusListener.
[2019-04-11 09:23:31 +0000] information/ConfigItem: Instantiated 1 IcingaApplication.
[2019-04-11 09:23:31 +0000] information/ConfigItem: Instantiated 6686 Hosts.
[2019-04-11 09:23:31 +0000] information/ConfigItem: Instantiated 1 FileLogger.
[2019-04-11 09:23:31 +0000] information/ConfigItem: Instantiated 2 NotificationCommands.
[2019-04-11 09:23:31 +0000] information/ConfigItem: Instantiated 1 NotificationComponent.
[2019-04-11 09:23:31 +0000] information/ConfigItem: Instantiated 1 ApiListener.
[2019-04-11 09:23:31 +0000] information/ConfigItem: Instantiated 3 Comments.
[2019-04-11 09:23:31 +0000] information/ConfigItem: Instantiated 1 CheckerComponent.
[2019-04-11 09:23:31 +0000] information/ConfigItem: Instantiated 6 Zones.
[2019-04-11 09:23:31 +0000] information/ConfigItem: Instantiated 9 Endpoints.
[2019-04-11 09:23:31 +0000] information/ConfigItem: Instantiated 1 ApiUser.
[2019-04-11 09:23:31 +0000] information/ConfigItem: Instantiated 1 User.
[2019-04-11 09:23:31 +0000] information/ConfigItem: Instantiated 65 CheckCommands.
[2019-04-11 09:23:31 +0000] information/ConfigItem: Instantiated 1 UserGroup.
[2019-04-11 09:23:31 +0000] information/ConfigItem: Instantiated 1 TimePeriod.
[2019-04-11 09:23:31 +0000] information/ScriptGlobal: Dumping variables to file '/var/cache/icinga2/icinga2.vars'
[2019-04-11 09:23:31 +0000] information/cli: Finished validating the configuration file(s).
  • If you run multiple Icinga 2 instances, the zones.conf file (or icinga2 object list --type Endpoint and icinga2 object list --type Zone) from all affected nodes.
    I don't think the zones.conf would be relevant in this specific problem, but if you really need it, please inform me and I'll get it.

Additional context

This is an HA setup with 2 masters, 4 zones (2 satellites in each). We don't use Icinga2-agent yet. All checks are either ran straight from satellites (ping, http) or through NRPE.

areconfiguration bug

All 4 comments

Seems that a loaded CheckComponent with concurrent_checks overrides this value, even when no value is set. While this needs a bugfix, use the mentioned method as a workaround. On agents, where no checker feature is enabled, you can use that constant.

Note for tests: icinga2 console doesn't load the entire application nor does it compile configuration. You'll need to use --connect for the runtime state access.

I've now completely refactored this specific handling (very error prone with Configuration:: and ScriptGlobal:: classes), and dropped the checkercomponent's attribute. Keep that in mind when upgrading to 2.11, it is extra noted in the upgrading docs.

Screen Shot 2019-04-16 at 15 01 55

Screen Shot 2019-04-16 at 15 01 06

Screen Shot 2019-04-16 at 15 02 25

Was this page helpful?
0 / 5 - 0 ratings