From 35811848da1095525e6937159f6611fc8a87261b Mon Sep 17 00:00:00 2001 From: Stephane Lapie Date: Fri, 15 Nov 2013 11:04:55 +0900 Subject: 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 --- lib/utils_base.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/utils_base.h b/lib/utils_base.h index 04f6370c..d69b0da1 100644 --- a/lib/utils_base.h +++ b/lib/utils_base.h @@ -62,7 +62,7 @@ int check_range(double, range *); int get_status(double, thresholds *); /* All possible characters in a threshold range */ -#define NP_THRESHOLDS_CHARS "0123456789.:@~" +#define NP_THRESHOLDS_CHARS "-0123456789.:@~" char *np_escaped_string (const char *); -- cgit v1.2.3