-
Notifications
You must be signed in to change notification settings - Fork 104
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
base: master
Are you sure you want to change the base?
Conversation
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
spec => 'critical|c=s', | ||
help => | ||
qq{-c, --critical=THRESHOLD[,THRESHOLD[,THRESHOLD[,THRESHOLD[,THRESHOLD]]]] | ||
Critical thresholds specified in order that the metrics are returned. |
There was a problem hiding this comment.
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.
@bbhalki1 Thanks for your PR. Just caching up. Can you please update the following doc (pod) for this script according to your changes? |
@bbhalki1 ping |
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