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

check_rabbitmq_cluster thresholds should be inverted #97

Open
abompard opened this issue Aug 2, 2019 · 1 comment
Open

check_rabbitmq_cluster thresholds should be inverted #97

abompard opened this issue Aug 2, 2019 · 1 comment

Comments

@abompard
Copy link

abompard commented Aug 2, 2019

Currently the warning and critical threshold trigger when the number of nodes is above the number set in the threshold. They should trigger when the number of nodes goes below the threshold.

# ./check_rabbitmq_cluster -w 2,2 -c 1,1
RABBITMQ_CLUSTER CRITICAL - nb_running_node CRITICAL (3) nb_running_disc_node CRITICAL (3), nb_running_ram_node OK (0)
# ./check_rabbitmq_cluster -w 4,4 -c 5,5
RABBITMQ_CLUSTER OK - nb_running_node OK (3) nb_running_disc_node OK (3) nb_running_ram_node OK (0)
@DVD-CZ
Copy link

DVD-CZ commented Jun 24, 2022

Hi, after reading table 3 here https://nagios-plugins.org/doc/guidelines.html#THRESHOLDFORMAT it is clear why it behaves the way it does. And it also suggests how do it in a way it could be useful.

I cannot work with perl, and do not know if its possible in some more elegant way, but i assembled it to work:

REM: $critical = $critical{$metric} if (defined $critical{$metric} and $critical{$metric} ne -1);
ADD: $critical = '' . $critical{$metric} . ':' if (defined $critical{$metric} and $critical{$metric} ne -1);

And the same for warning

Or maybe more universal way - pass parameters that already are in such format, like "-c 1:,1:"

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

No branches or pull requests

2 participants