willixix / naglio-plugins

Monitoring Plugins by William Leibzon
http://william.leibzon.org/nagios/
77 stars 54 forks source link

Fix impossibility of matching non-uppercased string values. #33

Open rbroemeling opened 11 years ago

rbroemeling commented 11 years ago

String thresholds that were being passed in were being uppercased, which guaranteed that they could never match a non-uppercased value being returned from Redis.

willixix commented 11 years ago

I'll take this as an open issue for the library. Pull request is no go here as I simply copy library code into plugin when I get new version ready.

rbroemeling commented 11 years ago

OK. Is there a different file that I should issue a PR to?

This was a critical problem for me -- it makes checking the value of the Redis "role" completely impossible, for instance. The value returned from Redis is lower-case, and this bug makes it impossible to match a lower-case string.

willixix commented 11 years ago

Yes, I understand its core issue for you and its something I overlooked when I upgraded my threshold code into library with new long-option syntax. Use your modified version. This will get fixed in the next release, there are a lot more work going into library so I prefer no submission there until its more stable and ready for use by others. After submissions to Naglio.pm on dev branch will be accepted.

The other staff forr check_redis that you submitted will get fixed too, some of my bad spellings I already fixed on my side and I will see how I can merge with what you submitted since I'm working on everything in dev branch.

willixix commented 11 years ago

Please test latest check_redis.pl and Naglio.pm in dev branch. There are a lot of changes to library code (its been updated to support multiple WARN and CRIT keywords on threshold option), among that is fix so that both upper-case and lowercase values when specifying threshold are supported.