Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BB] Updating the file to accept thresholds #77

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bbhalki1
Copy link

@bbhalki1 bbhalki1 commented Jan 18, 2017

This change accepts thresholds {[Warning] and [Critical] or none } and returns the exit status by comparing the count of "vhost, exchange, binding, queue, channel" with the thresholds which are passed as an input. Executed this change on command line and I could get valid results. Performed sanity checks with all possible approaches and could get expected output.

./check_rabbitmq_objects -H HOSTNAME -u USERNAME -p PASSWORD -w 50,50,50,50,50 -c 100,100,100,100,100 RABBITMQ_OBJECTS OK - Gathered Object Counts | vhost=3;50;100 exchange=39;50;100 binding=37;50;100 queue=27;50;100 channel=4;50;100

./check_rabbitmq_objects -H HOSTNAME -u USERNAME -p PASSWORD -c 10,50,100,100,50 RABBITMQ_OBJECTS OK - Gathered Object Counts | vhost=3;;10 exchange=39;;50 binding=37;;100 queue=27;;100 channel=4;;50

./check_rabbitmq_objects -H HOSTNAME -u USERNAME -p PASSWORD -w 10,10,10,10,10 -c 100,100,100,100,100 RABBITMQ_OBJECTS WARNING - Gathered Object Counts | vhost=3;10;100 exchange=39;10;100 binding=37;10;100 queue=27;10;100 channel=4;10;100

./check_rabbitmq_objects -H HOSTNAME -u nagmonmq -p PASSWORD -w 0,0,0,0,0 -c 100,100,100,100,1 RABBITMQ_OBJECTS CRITICAL - Gathered Object Counts | vhost=3;0;100 exchange=39;0;100 binding=37;0;100 queue=27;0;100 channel=4;0;1

This change accepts thresholds {[Warning] and [Critical] or none } and returns the exit status by comparing the count of "vhost, exchange, binding, queue, channel" with the thresholds which are passed as an input. Executed this change on command line and I could get valid results. Performed sanity checks with all possible approaches and could get expected output.
spec => 'warning|w=s',
help =>
qq{-w, --warning=THRESHOLD[,THRESHOLD[,THRESHOLD[,THRESHOLD[,THRESHOLD]]]]
Warning thresholds specified in order that the metrics are returned.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bbhalki1 can you please update the help with a text about the order of thresholds like this? Something with vhost, exchange, binding, etc.

spec => 'critical|c=s',
help =>
qq{-c, --critical=THRESHOLD[,THRESHOLD[,THRESHOLD[,THRESHOLD[,THRESHOLD]]]]
Critical thresholds specified in order that the metrics are returned.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as for the warning threshold.

@barryib
Copy link
Member

barryib commented Mar 27, 2017

@bbhalki1 Thanks for your PR.

Just caching up. Can you please update the following doc (pod) for this script according to your changes?

@barryib
Copy link
Member

barryib commented Apr 29, 2017

@bbhalki1 ping

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants