Bug 1138943 - [Nagios] - Discovery.py does not check for the correctness of nagios configuration before restarting nagios service
Summary: [Nagios] - Discovery.py does not check for the correctness of nagios configu...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: nagios-server-addons
Version: rhgs-3.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: RHGS 3.0.3
Assignee: Ramesh N
QA Contact: RamaKasturi
URL:
Whiteboard:
Depends On:
Blocks: 1087818
TreeView+ depends on / blocked
 
Reported: 2014-09-06 15:43 UTC by RamaKasturi
Modified: 2015-05-13 17:43 UTC (History)
6 users (show)

Fixed In Version: nagios-server-addons-0.1.7-1.el6rhs
Doc Type: Bug Fix
Doc Text:
Previously, the auto-config service tried to restart the Nagios service though there was a configuration error. As a result, auto-config service reported a message: "restarted nagios successfully", though the Nagios service was not running. With this fix, changes are made to check the configuration before restarting Nagios service.
Clone Of:
Environment:
Last Closed: 2015-01-15 13:49:36 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:0039 0 normal SHIPPED_LIVE Red Hat Storage Console 3.0 enhancement and bug fix update #3 2015-01-15 18:46:40 UTC

Description RamaKasturi 2014-09-06 15:43:40 UTC
Description of problem:
Discovery.py does not check for the correctness of email and snmp config files and says "nagios restarted sucessfully" where as nagios would not have restarted sucessfully.

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


How reproducible:
nagios-server-addons-0.1.5-1.el6rhs.noarch

Steps to Reproduce:
1. Install nagios on a rhel machine.
2. Configure nagios on RHS nodes.
3. Now add some contact in gluster-templates.cfg which does not exist.

Actual results:
When discovery.py is run, script says nagios sucessfully restarted, where as nagios is stopped.

Expected results:
When discovery.py is run, script should check the correctness of all config the files which is used by nagios.

Additional info:

Comment 1 Ramesh N 2014-09-09 05:27:27 UTC
We can run 'nagios -v /etc/nagios/nagios.cfg' to check the correctness of the nagios configuration before restarting the Nagios.

Upstream patch http://review.gluster.org/#/c/8131/ will address this use case.

Comment 3 Ramesh N 2014-09-17 09:22:26 UTC
Fixed in upstream patch http://review.gluster.org/#/c/8131/.

Comment 4 Shalaka 2014-09-21 04:01:34 UTC
Please review and sign-off edited doc text.

Comment 5 Ramesh N 2014-09-22 07:14:40 UTC
The discovery.py script does not check the correctness of the nagios configuration (syntax check).So nagios restart may fail if there is some config error in the nagios configuration. Its not specific to email configuration, but for the any nagois configuration.

Note: I don't think accuracy is the right word here. We cann't verify the accuracy like verifying the correctness of email address by sending mail.

Comment 7 RamaKasturi 2014-10-17 05:42:32 UTC
From kanagaraj, i understand that these bugs have been moved to on_qa by errata. 

Since QE has not yet received the build i am moving this bug back to assigned state. Please move it on to on_qa once builds are attached to errata.

Comment 8 RamaKasturi 2014-11-14 05:35:24 UTC
Verified and works fine with build nagios-server-addons-0.1.8-1.el6rhs.noarch

When discovery.py is run and when email and snmp configs are not proper it says "CONFIG ERROR ! Check your Nagios configuration".

Comment 9 Pavithra 2014-12-24 09:07:47 UTC
Hi Ramesh,

Can you please review the edited doc text for technical accuracy and sign off?

Comment 10 Ramesh N 2014-12-24 11:45:52 UTC
Doc text looks good to me

Comment 12 errata-xmlrpc 2015-01-15 13:49:36 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/RHBA-2015-0039.html


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