diff options
author | Stephane Lapie <stephane.lapie@asahinet.com> | 2013-11-15 02:04:55 (GMT) |
---|---|---|
committer | Thomas Guyot-Sionnest <dermoth@aei.ca> | 2014-01-31 05:49:18 (GMT) |
commit | 35811848da1095525e6937159f6611fc8a87261b (patch) | |
tree | e7eaa71beb82c1bb9a181f35a2ec013c4f928179 /lib | |
parent | c4e3cd6efd5aef8665db103a66996e619526ab3b (diff) | |
download | monitoring-plugins-35811848da1095525e6937159f6611fc8a87261b.tar.gz |
Handle negative values properly with check_snmp
check_snmp becomes capable of evaluating negative values properly,
but it might be returning CRITICALs where it used to return OK and was ignored,
if a negative value turns out to actually be a valid value.
If negative values are valid, this can be worked around,
by adding "~:" to the warning/critical threshold : 100 -> ~:100
Diffstat (limited to 'lib')
-rw-r--r-- | lib/utils_base.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/utils_base.h b/lib/utils_base.h index 04f6370..d69b0da 100644 --- a/lib/utils_base.h +++ b/lib/utils_base.h | |||
@@ -62,7 +62,7 @@ int check_range(double, range *); | |||
62 | int get_status(double, thresholds *); | 62 | int get_status(double, thresholds *); |
63 | 63 | ||
64 | /* All possible characters in a threshold range */ | 64 | /* All possible characters in a threshold range */ |
65 | #define NP_THRESHOLDS_CHARS "0123456789.:@~" | 65 | #define NP_THRESHOLDS_CHARS "-0123456789.:@~" |
66 | 66 | ||
67 | char *np_escaped_string (const char *); | 67 | char *np_escaped_string (const char *); |
68 | 68 | ||