Brian Sutherland created ZOOKEEPER-1500:
-------------------------------------------

             Summary: Nagios check always returns OK when the critical and 
warning values are the same
                 Key: ZOOKEEPER-1500
                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1500
             Project: ZooKeeper
          Issue Type: Bug
          Components: contrib
            Reporter: Brian Sutherland
            Priority: Minor


The plugin requires a difference between the warning and critical value for the 
checks to work. If the values are the same, OK is always returned.

I can't figure out how to attach a file to this ticket in JIRA, so here's a 
minimal inline patch that at least lets the admin know it's not working:

{noformat}
Index: src/contrib/monitoring/check_zookeeper.py
===================================================================
--- src/contrib/monitoring/check_zookeeper.py   (revision 1357335)
+++ src/contrib/monitoring/check_zookeeper.py   (working copy)
@@ -57,6 +57,10 @@
             print >>sys.stderr, 'Invalid values for "warning" and "critical".'
             return 2
 
+        if warning == critical:
+            print >>sys.stderr, '"warning" and "critical" cannot have the same 
value.'
+            return 2
+
         if opts.key is None:
             print >>sys.stderr, 'You should specify a key name.'
             return 2
{noformat}


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to