Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1138943 - [Nagios] - Discovery.py does not check for the correctness of nagios configuration before restarting nagios service
[Nagios] - Discovery.py does not check for the correctness of nagios configu...
Status: CLOSED ERRATA
Product: Red Hat Gluster Storage
Classification: Red Hat
Component: nagios-server-addons (Show other bugs)
3.0
Unspecified Unspecified
unspecified Severity high
: ---
: RHGS 3.0.3
Assigned To: Ramesh N
RamaKasturi
: ZStream
Depends On:
Blocks: 1087818
  Show dependency treegraph
 
Reported: 2014-09-06 11:43 EDT by RamaKasturi
Modified: 2015-05-13 13:43 EDT (History)
6 users (show)

See Also:
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.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-01-15 08:49:36 EST
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-2015:0039 normal SHIPPED_LIVE Red Hat Storage Console 3.0 enhancement and bug fix update #3 2015-01-15 13:46:40 EST

  None (edit)
Description RamaKasturi 2014-09-06 11:43:40 EDT
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 01:27:27 EDT
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 05:22:26 EDT
Fixed in upstream patch http://review.gluster.org/#/c/8131/.
Comment 4 Shalaka 2014-09-21 00:01:34 EDT
Please review and sign-off edited doc text.
Comment 5 Ramesh N 2014-09-22 03:14:40 EDT
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 01:42:32 EDT
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 00:35:24 EST
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 04:07:47 EST
Hi Ramesh,

Can you please review the edited doc text for technical accuracy and sign off?
Comment 10 Ramesh N 2014-12-24 06:45:52 EST
Doc text looks good to me
Comment 12 errata-xmlrpc 2015-01-15 08:49:36 EST
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.