Uploaded image for project: 'ZooKeeper'
  1. ZooKeeper
  2. ZOOKEEPER-1500

Nagios check always returns OK when the critical and warning values are the same

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • contrib
    • None

    Description

      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:

      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
      

      Attachments

        Activity

          People

            jinty Brian Sutherland
            jinty Brian Sutherland
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: