Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1451997 - [RHEL-6] Move custom nrpe commands to conf.d folder
[RHEL-6] Move custom nrpe commands to conf.d folder
Status: CLOSED ERRATA
Product: Red Hat Gluster Storage
Classification: Red Hat
Component: gluster-nagios-addons (Show other bugs)
3.1
Unspecified Unspecified
medium Severity medium
: ---
: RHGS 3.3.0
Assigned To: Sahina Bose
Sweta Anandpara
:
Depends On: 1425724
Blocks: 1417151
  Show dependency treegraph
 
Reported: 2017-05-18 02:35 EDT by Sahina Bose
Modified: 2017-09-21 00:52 EDT (History)
8 users (show)

See Also:
Fixed In Version: gluster-nagios-addons-0.2.9-1.el6rhs
Doc Type: Bug Fix
Doc Text:
Gluster monitoring stops working when the default NRPE config file is overwritten due to use of configuration management tools. With this update, the gluster command definitions are moved to a custom folder. Hence, the Gluster command definitions are retained and they are not affected by multiple tools writing to the default NRPE config file.
Story Points: ---
Clone Of: 1425724
Environment:
Last Closed: 2017-09-21 00:52:44 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:2782 normal SHIPPED_LIVE gluster-nagios-addons bug fix and enhancement update 2017-09-21 04:23:17 EDT

  None (edit)
Description Sahina Bose 2017-05-18 02:35:30 EDT
+++ This bug was initially created as a clone of Bug #1425724 +++

Description of problem:
With the rise of configuration management tools, the default nrpe.conf file often times gets overwritten. A simple solution for this is to move our custom nrpe commands in a special configuration file in /etc/nrpe.d/

Version-Release number of selected component (if applicable):
RHGS 3.1.3 (version independent)
gluster-nagios-addons-0.2.7-1.el7
gluster-nagios-common-0.2.4-1.el7

How reproducible:
always

Steps to Reproduce:
1. Have a configuration management tool that templates the nrpe.conf file
2. See the custom gluster commands disappear

Actual results:
Customer Gluster commands are inaccessible breaking monitoring

Expected results:
Gluster commands are still reachable

Additional info:
Please :)


--- Additional comment from Sahina Bose on 2017-05-17 04:09:46 EDT ---

Patch https://review.gluster.org/#/c/17306 posted to address this. Moved the gluster nrpe commands to /etc/nrpe.d/glusternrpe.cfg
Comment 3 Sweta Anandpara 2017-06-09 06:53:06 EDT
Verified this bz with gluster-nagios-addons-0.2.9-1.el6rhs.x86_64 and glusterfs-3.8.4-26.el6rhs.x86_64.

The section related to gluster in /etc/nagios/nrpe.cfg is moved to /etc/nrpe.d/glusternrpe.cfg. There is no impact on the configured nagios functionality, when tried with fresh install or upgrade. 

Moving the BZ to verified in 3.3. Related logs are pasted below:

[root@dhcp37-44 nagios]# 
[root@dhcp37-44 nagios]# gluster pool list
UUID					Hostname                         	State
d1c1fb6c-a7e4-4498-aea4-aa5ec4130cac	dhcp37-127.lab.eng.blr.redhat.com	Connected 
4f3cea73-379d-4036-bd57-541ad087ccf8	dhcp37-91.lab.eng.blr.redhat.com 	Connected 
01dde995-e611-4dcc-b88f-ee8ca297ecc5	dhcp37-118.lab.eng.blr.redhat.com	Connected 
2cce6af6-617e-49b4-8194-2493692cd866	dhcp37-124.lab.eng.blr.redhat.com	Connected 
35325849-ce70-48d8-853b-a2d0bfefe50c	dhcp37-89.lab.eng.blr.redhat.com 	Connected 
c11413e0-7dec-4300-b17f-0a325327038e	localhost                        	Connected 
[root@dhcp37-44 nagios]# rpm -qa | grep gluster
gluster-nagios-common-0.2.4-1.el6rhs.noarch
glusterfs-3.8.4-26.el6rhs.x86_64
glusterfs-fuse-3.8.4-26.el6rhs.x86_64
glusterfs-geo-replication-3.8.4-26.el6rhs.x86_64
vdsm-gluster-4.16.30-1.5.el6rhs.noarch
glusterfs-libs-3.8.4-26.el6rhs.x86_64
glusterfs-api-3.8.4-26.el6rhs.x86_64
gluster-nagios-addons-0.2.9-1.el6rhs.x86_64
glusterfs-server-3.8.4-26.el6rhs.x86_64
python-gluster-3.8.4-26.el6rhs.noarch
glusterfs-client-xlators-3.8.4-26.el6rhs.x86_64
glusterfs-cli-3.8.4-26.el6rhs.x86_64
glusterfs-rdma-3.8.4-26.el6rhs.x86_64
[root@dhcp37-44 nagios]# 
[root@dhcp37-44 nagios]# rpm -qa | grep nagios
gluster-nagios-common-0.2.4-1.el6rhs.noarch
nagios-plugins-dummy-1.4.16-12.el6rhs.x86_64
nagios-plugins-ide_smart-1.4.16-12.el6rhs.x86_64
nagios-plugins-1.4.16-12.el6rhs.x86_64
nagios-plugins-procs-1.4.16-12.el6rhs.x86_64
nagios-3.5.1-9.el6.x86_64
nagios-plugins-nrpe-2.15-4.2.el6rhs.x86_64
nagios-plugins-ping-1.4.16-12.el6rhs.x86_64
pnp4nagios-0.6.22-2.1.el6rhs.x86_64
gluster-nagios-addons-0.2.9-1.el6rhs.x86_64
nagios-common-3.5.1-9.el6.x86_64
nagios-server-addons-0.2.6-1.el6rhs.noarch
[root@dhcp37-44 nagios]# 
[root@dhcp37-44 nagios]# 
[root@dhcp37-44 nagios]# nagios -v /etc/nagios/nagios.cfg 

Nagios Core 3.5.1
Copyright (c) 2009-2011 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 08-30-2013
License: GPL

Website: http://www.nagios.org
Reading configuration data...
   Read main config file okay...
Processing object config file '/etc/nagios/objects/commands.cfg'...
Processing object config file '/etc/nagios/objects/contacts.cfg'...
Processing object config file '/etc/nagios/objects/timeperiods.cfg'...
Processing object config file '/etc/nagios/objects/templates.cfg'...
..
..
..
Checking misc settings...

Total Warnings: 37
Total Errors:   0

Things look okay - No serious problems were detected during the pre-flight check
[root@dhcp37-44 nagios]# 
[root@dhcp37-44 nagios]# grep "gluster" /etc/nagios/nrpe.cfg 
[root@dhcp37-44 nagios]# 
[root@dhcp37-44 nagios]# ll /etc/nrpe.d/glusternrpe.cfg 
-rw-r--r--. 1 root root 1657 May 18 20:29 /etc/nrpe.d/glusternrpe.cfg
[root@dhcp37-44 nagios]# 
[root@dhcp37-44 nagios]# cat /etc/nrpe.d/glusternrpe.cfg 
command[check_disk_and_inode]=sudo /usr/lib64/nagios/plugins/gluster/check_mounts.py -w 80 -c 90 -i / -i /boot -i /home -i /var -i /usr
command[check_memory]=/usr/lib64/nagios/plugins/gluster/memory.py -w 80 -c 90 -t 2
command[check_swap_usage]=/usr/lib64/nagios/plugins/gluster/swap.py -w 80 -c 90 -t 2
command[check_cpu_multicore]=/usr/lib64/nagios/plugins/gluster/cpu.py -w 80 -c 90 -t 2
command[check_interfaces]=/usr/lib64/nagios/plugins/gluster/network.py -e lo -e ';vdsmdummy;' -t 2
command[check_brick_usage]=sudo /usr/lib64/nagios/plugins/gluster/check_mounts.py -w 80 -c 90 -i \$ARG1\$
command[check_vol_utilization]=sudo /usr/lib64/nagios/plugins/gluster/check_vol_utilization.py \$ARG1\$ -w \$ARG2\$ -c \$ARG3\$
command[check_vol_status]=sudo /usr/lib64/nagios/plugins/gluster/check_volume_status.py -v \$ARG1\$ -t \$ARG2\$
command[check_proc_status]=sudo /usr/lib64/nagios/plugins/gluster/check_gluster_proc_status.py -t \$ARG1\$
command[check_brick_status]=sudo /usr/lib64/nagios/plugins/gluster/check_gluster_proc_status.py -t BRICK -v \$ARG1\$ -b \$ARG2\$
command[discoverpeers]=sudo /usr/lib64/nagios/plugins/gluster/discoverpeers.py
command[discover_volume_list]=sudo /usr/lib64/nagios/plugins/gluster/discover_volumes.py -l
command[discover_volume_info]=sudo /usr/lib64/nagios/plugins/gluster/discover_volumes.py -v \$ARG1\$
command[discoverhostparams]=sudo /usr/lib64/nagios/plugins/gluster/discoverhostparams.py
command[configure_gluster_node]=sudo /usr/lib64/nagios/plugins/gluster/configure_gluster_node.py -c \$ARG1\$ -n \$ARG2\$ -H \$ARG3\$
command[check_quorum_status]=sudo /usr/lib64/nagios/plugins/gluster/check_quorum_status.py
[root@dhcp37-44 nagios]#
Comment 6 Pratik Mulay 2017-09-07 09:53:56 EDT
Minor changes in Doc Text based on Peer Review.
Comment 7 Pratik Mulay 2017-09-08 05:40:33 EDT
Doc text changed: NERP -> NRPE
Comment 9 errata-xmlrpc 2017-09-21 00:52:44 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:2782

Note You need to log in before you can comment on or make changes to this bug.