Bug 1127657

Summary: [Nagios] Auto-config service should validate whether the nagios server hostname provided is a valid hostname/IP address
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Shruti Sampat <ssampat>
Component: nagios-server-addonsAssignee: Ramesh N <rnachimu>
Status: CLOSED ERRATA QA Contact: RamaKasturi <knarra>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rhgs-3.0CC: asrivast, divya, dpati, knarra, rhsc-qe-bugs, rnachimu, vagarwal
Target Milestone: ---   
Target Release: RHGS 3.1.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: nagios-server-addons-0.2.0-1.el6rhs Doc Type: Bug Fix
Doc Text:
Previously, the command 'configure-gluster-nagios' which is used to configure Nagios services asks the user to enter Nagios server address (either IP/FQDN), but it did not verify the correctness of the same. As a consequence, the user could enter invalid address and end up configuring Nagios with wrong information. With this fix, command 'configure-gluster-nagios' verifies the address entered by the user to make sure that Nagios is configured correctly to monitor RHGS nodes.
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-07-29 05:26:43 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:
Bug Depends On:    
Bug Blocks: 1202842    

Description Shruti Sampat 2014-08-07 10:07:49 UTC
Description of problem:
------------------------

When the auto-config service is run from command line, it asks the user is asked to enter the address of the Nagios server - 

Enter Nagios server address [rhs-client25.lab.eng.blr.redhat.com]:

The script accepts any string that is entered as input here. The script should validate if the entered string is a valid address.

Version-Release number of selected component (if applicable):
nagios-server-addons-0.1.5-1.el6rhs.noarch

How reproducible:
Always

Steps to Reproduce:
1. Run the auto-config script from the command line on the nagios server.
2. When prompted to enter the nagios server address, enter any string.
3. Check the file /etc/nagios/nagios_server.conf for the value of "nagios_server"

Actual results:
The value of "nagios_server" is the string provided in response to the prompt for nagios server address.

Expected results:
Auto-config should validate the string entered as address of the nagios server.

Additional info:

Comment 1 Ramesh N 2014-08-28 05:09:54 UTC
upstream patch : http://review.gluster.org/#/c/7740/

Comment 2 RamaKasturi 2015-05-29 07:14:53 UTC
Verified and works fine with build nagios-server-addons-0.2.0-1.el6rhs.noarch.

If IP address is given as the nagios server address then it
checks the pattern and verifies that it is mapped to one of the
non loopback device in the host.

 If user enters fqdn name, then it tries to resolve it,
also it verifies that resolved IP address maps to one of
the non loopback device in the host.

Comment 3 Divya 2015-07-26 05:47:16 UTC
Ramesh,

Kindly review and sign-off the edited doc text.

Comment 4 Ramesh N 2015-07-27 04:42:19 UTC
Doc text looks good. Approved.

Comment 6 errata-xmlrpc 2015-07-29 05:26:43 UTC
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://rhn.redhat.com/errata/RHEA-2015-1494.html