weixin_39885166
2020-12-09 05:07 阅读 2

examples for THRESHOLD[,THRESHOLD[,THRESHOLD[,THRESHOLD]]]

Hi

I am using this command /usr/lib64/nagios/plugins/check_rabbitmq_queue -h

-w, --warning=THRESHOLD[,THRESHOLD[,THRESHOLD[,THRESHOLD]]] Warning thresholds specified in order that the metrics are returned. Specify -1 if no warning threshold. -c, --critical=THRESHOLD[,THRESHOLD[,THRESHOLD[,THRESHOLD]]] Critical thresholds specified in order that the metrics are returned. Specify -1 if no critical threshold.

I will appreciate if you can explain me with some examples for THRESHOLD[,THRESHOLD[,THRESHOLD[,THRESHOLD]]] for both warning and critical in context to check_rabbitmq_queue nagios plugin.

Thanks in Advance

Regards,

Kaushal

该提问来源于开源项目:nagios-plugins-rabbitmq/nagios-plugins-rabbitmq

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

4条回答 默认 最新

  • weixin_39885166 weixin_39885166 2020-12-09 05:07

    Hi,

    I will appreciate if anyone can help me understand the usage of the below check_rabbitmq_queue options with examples. For example what is the value to be set for THRESHOLD[,THRESHOLD[,THRESHOLD[,THRESHOLD]]]. for both warning and critical alerts

    -w, --warning=THRESHOLD[,THRESHOLD[,THRESHOLD[,THRESHOLD]]] Warning thresholds specified in order that the metrics are returned. Specify -1 if no warning threshold. -c, --critical=THRESHOLD[,THRESHOLD[,THRESHOLD[,THRESHOLD]]] Critical thresholds specified in order that the metrics are returned. Specify -1 if no critical threshold.

    Thanks in Advance

    Regards,

    Kaushal

    点赞 评论 复制链接分享
  • weixin_39607447 weixin_39607447 2020-12-09 05:07

    Hello ,

    Are you running the latest version of nagios-plugins-rabbitmq.

    Taken from the check_rabbitmq_queue's doc:

     perl
    =item -w | --warning
    The warning levels for each count of messages, messages_ready,
    messages_unacknowledged and consumers.  This field consists of
    one to four comma-separated thresholds.  Specify -1 if no threshold
    for a particular count.
    
    =item -c | --critical
    The critical levels for each count of messages, messages_ready,
    messages_unacknowledged and consumers.  This field consists of
    one to four comma-separated thresholds.  Specify -1 if no threshold
    for a particular count.
    

    So you should have something like this messages, messages_ready, messages_unacknowledged, consumers.

    For threshold format, please refer to the nagios developer guidelines.

    Is this answer ok for you?

    点赞 评论 复制链接分享
  • weixin_39885166 weixin_39885166 2020-12-09 05:07

    Thanks barryib for the reply. I have put the below settings in /etc/nagios/nrpe.cfg file

    /usr/lib64/nagios/plugins/check_rabbitmq_queue -H localhost --user admin --password=xxxxxx --vhost / --queue dealsapp_emailqueue --warning=10,10,10,4: --critical=20,20,20,4: messages, messages_ready,messages_unacknowledged and consumers respectively, is this correct?

    And lets say if i do not want any threshold for messages_unacknowledged for example, will it be like

    /usr/lib64/nagios/plugins/check_rabbitmq_queue -H localhost --user admin --password=xxxxxx --vhost / --queue dealsapp_emailqueue --warning=10,10,-1,4: --critical=20,20,-1,6:

    Please correct me if i am understanding it wrong and i am not sure what does ":" at the end of --warning=10,10,-1,4: --critical=20,20,-1,6: mean?

    Thanks again in Advance

    Regards,

    Kaushal

    点赞 评论 复制链接分享
  • weixin_39607447 weixin_39607447 2020-12-09 05:07

    taken from the nagios developer guidelines

    | Range definition | Generate an alert if x... | | --- | --- | | 10 | < 0 or > 10, (outside the range of {0 .. 10}) | | 10: | < 10, (outside {10 .. ∞}) | | ~:10 | > 10, (outside the range of {-∞ .. 10}) | | 10:20 | < 10 or > 20, (outside the range of {10 .. 20}) | | :20 | ≥ 10 and ≤ 20, (inside the range of {10 .. 20}) |

    => 4: means, generate an alert if x < 4

    please use the nagios-plugins-rabbitmq's gitter chat. It's more appropriate for this kind of questions. I can answer to your questions more quickly.

    Closing this issue.

    点赞 评论 复制链接分享

相关推荐