Bug 1467971

Summary: Regression to Bug 963703 - nrpe.cfg sets config values after including user configuration
Product: [Fedora] Fedora EPEL Reporter: QITS GmbH Team Linux <systeme-unix>
Component: nrpeAssignee: Stephen John Smoogen <smooge>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: epel7CC: athmanem, b.heden, jose.p.oliveira.oss, kmf, ondrejj, paddy, smooge, smooge, s, swilkerson
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: All   
OS: Unspecified   
Whiteboard:
Fixed In Version: nrpe-3.1.1-6.fc24 nrpe-3.1.1-6.fc25 nrpe-3.2.0-6.el7 nrpe-3.2.0-6.el6 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-11-16 15:47:48 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description QITS GmbH Team Linux 2017-07-05 17:11:48 UTC
Description of problem:

In /etc/nrpe.cfg the configs in /etc/nrpe.d/ are included, then /etc/nrpe.cfg sets it's own commands, this leads to /etc/nrpe.cfg possibly overruling stuff in /etc/nrpe.d/.

Version-Release number of selected component (if applicable):

EPEL 6 and 7 on CentOS (possibly more), nrpe 3:

[root@hostname ~]# rpm -qi nrpe
Name        : nrpe
Version     : 3.1.1
Release     : 1.el7
Architecture: x86_64
Install Date: Mi 05 Jul 2017 13:05:16 CEST
Group       : Applications/System
Size        : 341792
License     : GPLv2
Signature   : RSA/SHA256, Do 15 Jun 2017 03:02:22 CEST, Key ID 6a2faea2352c64e5
Source RPM  : nrpe-3.1.1-1.el7.src.rpm
Build Date  : Do 15 Jun 2017 02:50:55 CEST
Build Host  : buildvm-20.phx2.fedoraproject.org
Relocations : (not relocatable)
Packager    : Fedora Project
Vendor      : Fedora Project
URL         : http://www.nagios.org
Summary     : Host/service/network monitoring agent for Nagios


Steps to Reproduce:

1. Have nrpe 2.x with a /etc/nrpe.d/local.cfg that defines a command for load measurement
2. Automatic update from nrpe 2 to nrpe 3 happens at night


Actual results: Nagios signals a critical load for all hosts that got the update (the load command defined in /etc/nrpe.cfg issues a critical at a load of 0.3 or higher and overwrites my load command in /etc/nrpe.d/local.cfg)


Expected results: Flawless upgrade :).

Additional info: This is a regression to this bug in nrpe 2 from 2013: https://bugzilla.redhat.com/show_bug.cgi?id=963703

Comment 1 Stephen John Smoogen 2017-07-05 18:07:35 UTC
Yikes. That was not seen in testing, but it is clear that my testing only used supplemental nrpe.cfg configs.

There are 1 of 2 fixes.

1. Comment out the preconfigured section

# command[check_users]=/usr/lib64/nagios/plugins/check_users -w 5 -c 10
# command[check_load]=/usr/lib64/nagios/plugins/check_load -r -w .15,.10,.05 -c .30,.25,.20
# command[check_hda1]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /dev/hda1
# command[check_zombie_procs]=/usr/lib64/nagios/plugins/check_procs -w 5 -c 10 -s Z
# command[check_total_procs]=/usr/lib64/nagios/plugins/check_procs -w 150 -c 200

2. Move the include_dir=/etc/nrpe.d/ to the bottom of the file

I will roll out a fix with one of these 2 in and see if upstream will fix their config file also.


## PS I got these suggestions from someone also affected by the rollout. I am not taking the credit for their work.

Comment 2 Stephen John Smoogen 2017-07-05 18:31:45 UTC
OK upstream has moved them to the bottom with their commit 20a5931074ac1b1f02b87db7ccd59f2779d16c9a

I will follow suit and fix ours.

Comment 3 QITS GmbH Team Linux 2017-07-05 18:53:19 UTC
(In reply to Stephen John Smoogen from comment #1)

> 2. Move the include_dir=/etc/nrpe.d/ to the bottom of the file

This would solve this bug without disturbing people depending ion the predefined commands, i guess upstream could live with it as well.

Comment 4 Fedora Update System 2017-07-05 19:37:51 UTC
nrpe-3.1.1-2.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-0ff431e36d

Comment 5 Fedora Update System 2017-07-06 02:48:44 UTC
nrpe-3.1.1-2.el6 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-a0b88febee

Comment 6 Fedora Update System 2017-07-06 02:50:16 UTC
nrpe-3.1.1-2.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-0ff431e36d

Comment 7 Paddy Doyle 2017-07-06 07:46:53 UTC
Just a 'me too' on this bug and thanks for the fix.

I submitted a patch to upstream to move the include_dir to the bottom of the file, which has now been merged into the dev branch:

https://github.com/NagiosEnterprises/nrpe/pull/144

So hopefully this will appear in future releases.

Comment 8 Bryan Heden 2017-07-06 11:30:42 UTC
Upstream talking here: Yes, we'll be releasing that patch in the next release, 3.2.1 - I suspect due to the my_system seteuid() error that I introduced in the latest enhancement we'll get the next bugfix version out within the next two weeks. Thanks for the patch!

Comment 9 Fedora Update System 2017-07-07 20:48:00 UTC
nrpe-3.1.1-4.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-f8ea02db72

Comment 10 Fedora Update System 2017-07-09 04:47:56 UTC
nrpe-3.1.1-4.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-86db243830

Comment 11 Fedora Update System 2017-07-09 04:48:23 UTC
nrpe-3.1.1-4.el6 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-f8ea02db72

Comment 12 Fedora Update System 2017-07-12 15:53:01 UTC
nrpe-3.1.1-6.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-9d9d9c0909

Comment 13 Fedora Update System 2017-07-12 16:24:45 UTC
nrpe-3.1.1-6.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-ec253d8f54

Comment 14 Fedora Update System 2017-07-13 01:46:06 UTC
nrpe-3.1.1-6.el6 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-18adf0fe26

Comment 15 Fedora Update System 2017-07-13 01:50:18 UTC
nrpe-3.1.1-6.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-1f50be4847

Comment 16 Fedora Update System 2017-07-23 21:50:45 UTC
nrpe-3.1.1-6.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Comment 17 Fedora Update System 2017-07-23 22:54:15 UTC
nrpe-3.1.1-6.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 18 Fedora Update System 2017-08-04 20:18:43 UTC
nrpe-3.2.0-6.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-030b96c51c

Comment 19 Fedora Update System 2017-08-07 02:49:24 UTC
nrpe-3.2.0-6.el6 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-bb989d629b

Comment 20 Fedora Update System 2017-08-07 07:49:27 UTC
nrpe-3.2.0-6.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-030b96c51c

Comment 21 Fedora Update System 2017-11-16 15:47:48 UTC
nrpe-3.2.0-6.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.

Comment 22 Fedora Update System 2017-11-16 16:52:57 UTC
nrpe-3.2.0-6.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.