diff --git a/plugins/check_snmp.c b/plugins/check_snmp.c
index b0059845358cbd19755a208462e16828759aadf9..a4be11bc64c648b3e7baeeed326155eb000117f2 100644 (file)
--- a/plugins/check_snmp.c
+++ b/plugins/check_snmp.c
show = strstr (response, "Gauge: ") + 7;
else if (strstr (response, "Gauge32: "))
show = strstr (response, "Gauge32: ") + 9;
+ else if (strstr (response, "Counter32: "))
+ show = strstr (response, "Counter32: ") + 11;
else if (strstr (response, "INTEGER: "))
show = strstr (response, "INTEGER: ") + 9;
else
eval_method[i] & WARN_EQ ||
eval_method[i] & WARN_NE) {
p2 = strpbrk (p2, "0123456789");
+ if (p2 == NULL)
+ terminate (STATE_UNKNOWN,"No valid data returned");
response_value[i] = strtoul (p2, NULL, 10);
iresult = check_num (i);
asprintf (&show, "%lu", response_value[i]);