summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c77ffce)
raw | patch | inline | side by side (parent: c77ffce)
author | Karl DeBisschop <kdebisschop@users.sourceforge.net> | |
Fri, 15 Nov 2002 00:50:19 +0000 (00:50 +0000) | ||
committer | Karl DeBisschop <kdebisschop@users.sourceforge.net> | |
Fri, 15 Nov 2002 00:50:19 +0000 (00:50 +0000) |
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@201 f882894a-f735-0410-b71e-b25c423dba1c
plugins/check_snmp.c | patch | blob | history |
diff --git a/plugins/check_snmp.c b/plugins/check_snmp.c
index a8ee06fd432848f07a07817f2fa8056e27c155d7..36a33270abdea53ab287a50d4f08d18d3d3eecae 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, "INTEGER: "))
+ show = strstr (response, "INTEGER: ") + 9;
else
show = response;
p2 = show;
}
if (eval_method[i] & CRIT_GT ||
- eval_method[i] & CRIT_LT ||
- eval_method[i] & CRIT_GE ||
- eval_method[i] & CRIT_LE ||
- eval_method[i] & CRIT_EQ ||
- eval_method[i] & CRIT_NE ||
- eval_method[i] & WARN_GT ||
- eval_method[i] & WARN_LT ||
- eval_method[i] & WARN_GE ||
- eval_method[i] & WARN_LE ||
- eval_method[i] & WARN_EQ || eval_method[i] & WARN_NE) {
+ eval_method[i] & CRIT_LT ||
+ eval_method[i] & CRIT_GE ||
+ eval_method[i] & CRIT_LE ||
+ eval_method[i] & CRIT_EQ ||
+ eval_method[i] & CRIT_NE ||
+ eval_method[i] & WARN_GT ||
+ eval_method[i] & WARN_LT ||
+ eval_method[i] & WARN_GE ||
+ eval_method[i] & WARN_LE ||
+ eval_method[i] & WARN_EQ ||
+ eval_method[i] & WARN_NE) {
p2 = strpbrk (p2, "0123456789");
response_value[i] = strtoul (p2, NULL, 10);
iresult = check_num (i);
iresult = STATE_OK;
else if (eval_method[i] & CRIT_PRESENT)
iresult = STATE_CRITICAL;
- else
+ else if (eval_method[i] & WARN_PRESENT)
iresult = STATE_WARNING;
result = max_state (result, iresult);
i++;
- } /* end while */
+ } /* end while (ptr) */
if (found == 0)
terminate
if (spclose (child_process))
result = max_state (result, STATE_WARNING);
- if (nunits > 0)
- printf ("%s %s -%s %s\n", label, state_text (result), outbuff, units);
- else
- printf ("%s %s -%s\n", label, state_text (result), outbuff);
+/* if (nunits == 1 || i == 1) */
+/* printf ("%s %s -%s %s\n", label, state_text (result), outbuff, units); */
+/* else */
+ printf ("%s %s -%s\n", label, state_text (result), outbuff);
return result;
}