You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Patrick Hunt (JIRA)" <ji...@apache.org> on 2012/08/01 00:38:35 UTC

[jira] [Commented] (ZOOKEEPER-1500) Nagios check always returns OK when the critical and warning values are the same

    [ https://issues.apache.org/jira/browse/ZOOKEEPER-1500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13426184#comment-13426184 ] 

Patrick Hunt commented on ZOOKEEPER-1500:
-----------------------------------------

Thanks for the patch Brian, could you try attaching the patch now? You can do it using the "more actions" drop down, then "attach files" button.
                
> 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
>            Assignee: 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