-
Notifications
You must be signed in to change notification settings - Fork 584
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sysconfig limits and settings are not respected #6215
Comments
You can set these limits in the sysconfig file. See the "advanced" table in this chapter: https://www.icinga.com/docs/icinga2/latest/doc/17-language-reference/#constants |
Our way of doing this may not be standard, for RHEL specific changes to init scripts and the sort please see https://github.com/Icinga/rpm-icinga2 |
Thanks for the clarification! I think these options would be better documented in the configuration chapter, maybe in a topic "Advanced configuration": https://www.icinga.com/docs/icinga2/latest/doc/04-configuring-icinga-2/
We are using the Icinga2 rpm repository. |
You cannot go lower than the default of 16k open files. That is a sane default what Icinga 2 requires at minimum to run and work.
|
He is refering to |
Thanks, @Mikesch-mp . Yes, the problem is that we want to increase the maximum number of open files to 50000, but the icinga2 processes ignore this change and stay at the default of 16 * 1024. |
Ah ok, thanks, shouldn't comment here when I am tired after giving a training. Then I am out of ideas and one needs to reproduce the problem. |
Confirmed, it is a bug. Tested inside the Icinga Vagrant box
|
It seems that all changes that are done in
|
We narrowed down the bug to the file not being read at all, i.e. the path in some instances is not set. |
The path is compiled into the binary, and under specific circumstances an empty string. We've observed this with builds inside Docker and other variants. The patch requires a new tagged release including proper tests. |
The referenced package fixes are not part of this ticket, only topic related for 2.8.3. |
@Crunsher I've cherry-picked 11853cb36339920729bcaa5fcd461b5a288ba4cb for better logging into the coming PR for this issue. |
|
It may happen that the variable is not properly initialized and we'll have an empty string. Observed on macOS and inside Docker. refs #6215
|
Ideally the sysconfig directory is not checked for the Debian family, or |
We're dealing with this in #6255 scheduled for CW 21. |
Expected Behavior
On RHEL/CentOS7, process limits as seen by systemctl show and cat /proc/PID/limits should provide consistent information.
Current Behavior
On RHEL7:
This is irritating, as the system administrator can't easily determine the limits in force for Icinga2. We've already had a discussion with RH support about this and they think that this may be related to the "--no-stack-rlimit" option passed on the command line.
Possible Solution
If Icinga2 sets its own limits (to 16384), this should be explicitly documented. Better, to make this setting configurable by the user.
Steps to Reproduce (for bugs)
Context
At the moment we are looking into an issue with checks that sometimes forward no performance metrics for Graphite. In order to rule out resource exhaustion, we are checking the configured limits of the Icinga2 processes.
Your Environment
icinga2 --version
):icinga2 - The Icinga 2 network monitoring daemon (version: r2.8.2-1)
Copyright (c) 2012-2017 Icinga Development Team (https://www.icinga.com/)
License GPLv2+: GNU GPL version 2 or later http://gnu.org/licenses/gpl2.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Application information:
Installation root: /usr
Sysconf directory: /etc
Run directory: /run
Local state directory: /var
Package data directory: /usr/share/icinga2
State path: /var/lib/icinga2/icinga2.state
Modified attributes path: /var/lib/icinga2/modified-attributes.conf
Objects path: /var/cache/icinga2/icinga2.debug
Vars path: /var/cache/icinga2/icinga2.vars
PID path: /run/icinga2/icinga2.pid
System information:
Platform: Red Hat Enterprise Linux Server
Platform version: 7.4 (Maipo)
Kernel: Linux
Kernel version: 3.10.0-693.17.1.el7.x86_64
Architecture: x86_64
Build information:
Compiler: GNU 4.8.5
Build host: unknown
Enabled features (
icinga2 feature list
):Disabled features: command compatlog debuglog elasticsearch gelf graphite influxdb livestatus notification opentsdb perfdata statusdata syslog
Enabled features: api checker mainlog
Config validation (
icinga2 daemon -C
):information/cli: Icinga application loader (version: r2.8.2-1)
information/cli: Loading configuration file(s).
information/ConfigItem: Committing config item(s).
information/ApiListener: My API identity: osshplpmo06.xxxx.de
warning/ApplyRule: Apply rule 'uptime' (in /var/lib/icinga2/api/zones/director-global/director/service_apply.conf: 1:0-1:21) for type 'Service' does not match anywhere!
warning/ApplyRule: Apply rule 'bacula_file_daemon' (in /var/lib/icinga2/api/zones/director-global/director/servicesets.conf: 139:1-139:34) for type 'Service' does not match anywhere!
warning/ApplyRule: Apply rule 'agent_icinga-core' (in /var/lib/icinga2/api/zones/director-global/director/servicesets.conf: 148:1-148:33) for type 'Service' does not match anywhere!
warning/ApplyRule: Apply rule 'available_volume_space_all' (in /var/lib/icinga2/api/zones/director-global/director/servicesets.conf: 156:1-156:42) for type 'Service' does not match anywhere!
warning/ApplyRule: Apply rule 'load' (in /var/lib/icinga2/api/zones/director-global/director/servicesets.conf: 164:1-164:20) for type 'Service' does not match anywhere!
warning/ApplyRule: Apply rule 'cluster-zone' (in /var/lib/icinga2/api/zones/director-global/director/servicesets.conf: 172:1-172:28) for type 'Service' does not match anywhere!
warning/ApplyRule: Apply rule 'icinga2_ido' (in /var/lib/icinga2/api/zones/director-global/director/servicesets.conf: 180:1-180:27) for type 'Service' does not match anywhere!
warning/ApplyRule: Apply rule 'cpu' (in /var/lib/icinga2/api/zones/director-global/director/servicesets.conf: 253:1-253:19) for type 'Service' does not match anywhere!
warning/ApplyRule: Apply rule 'ram' (in /var/lib/icinga2/api/zones/director-global/director/servicesets.conf: 262:1-262:19) for type 'Service' does not match anywhere!
warning/ApplyRule: Apply rule 'hardware-health' (in /var/lib/icinga2/api/zones/director-global/director/servicesets.conf: 329:1-329:31) for type 'Service' does not match anywhere!
warning/ApplyRule: Apply rule 'uptime' (in /var/lib/icinga2/api/zones/director-global/director/servicesets.conf: 338:1-338:22) for type 'Service' does not match anywhere!
warning/ApplyRule: Apply rule 'cpu' (in /var/lib/icinga2/api/zones/director-global/director/servicesets.conf: 349:1-349:19) for type 'Service' does not match anywhere!
warning/ApplyRule: Apply rule 'ram' (in /var/lib/icinga2/api/zones/director-global/director/servicesets.conf: 360:1-360:19) for type 'Service' does not match anywhere!
warning/ApplyRule: Apply rule 'interface_ethernet0/0_usage' (in /var/lib/icinga2/api/zones/director-global/director/servicesets.conf: 371:1-371:43) for type 'Service' does not match anywhere!
warning/ApplyRule: Apply rule 'interface_ethernet0/0_errors' (in /var/lib/icinga2/api/zones/director-global/director/servicesets.conf: 384:1-384:44) for type 'Service' does not match anywhere!
warning/ApplyRule: Apply rule 'interface_ethernet0/0_status' (in /var/lib/icinga2/api/zones/director-global/director/servicesets.conf: 397:1-397:44) for type 'Service' does not match anywhere!
information/ConfigItem: Instantiated 1 ApiListener.
information/ConfigItem: Instantiated 4 Zones.
information/ConfigItem: Instantiated 3 Endpoints.
information/ConfigItem: Instantiated 1 FileLogger.
information/ConfigItem: Instantiated 223 CheckCommands.
information/ConfigItem: Instantiated 1 IcingaApplication.
information/ConfigItem: Instantiated 1353 Hosts.
information/ConfigItem: Instantiated 600 HostGroups.
information/ConfigItem: Instantiated 2 Downtimes.
information/ConfigItem: Instantiated 2 ServiceGroups.
information/ConfigItem: Instantiated 5681 Services.
information/ConfigItem: Instantiated 1 CheckerComponent.
information/ScriptGlobal: Dumping variables to file '/var/cache/icinga2/icinga2.vars'
information/cli: Finished validating the configuration file(s).
If you run multiple Icinga 2 instances, the
zones.conf
file (oricinga2 object list --type Endpoint
andicinga2 object list --type Zone
) from all affected nodes.Object 'osshplpmo06.xxxx.de' of type 'Endpoint':
% declared in '/etc/icinga2/zones.conf', lines 28:1-28:41
% = modified in '/etc/icinga2/zones.conf', lines 28:1-28:41
Object 'ossnplpmo03.xxxx.de' of type 'Endpoint':
% declared in '/etc/icinga2/zones.conf', lines 11:1-11:41
% = modified in '/etc/icinga2/zones.conf', lines 12:9-12:30
% = modified in '/etc/icinga2/zones.conf', lines 13:9-13:21
% = modified in '/etc/icinga2/zones.conf', lines 11:1-11:41
Object 'osszplpmo02.xxxx.de' of type 'Endpoint':
% declared in '/etc/icinga2/zones.conf', lines 6:1-6:41
% = modified in '/etc/icinga2/zones.conf', lines 7:2-7:23
% = modified in '/etc/icinga2/zones.conf', lines 8:2-8:14
% = modified in '/etc/icinga2/zones.conf', lines 6:1-6:41
The text was updated successfully, but these errors were encountered: