Преглед на файлове

check_snmp: small improvement by anonymous submission

- response should not start with the delimiter
- OID response value taken into account

Closes issue #1029
Closes push request #1173
Jan Wagner преди 10 години
родител
ревизия
96932fd7b7
променени са 1 файла, в които са добавени 3 реда и са изтрити 0 реда
  1. 3 0
      plugins/check_snmp.c

+ 3 - 0
plugins/check_snmp.c

@@ -418,6 +418,9 @@ main (int argc, char **argv)
 		else if (strstr (response, "INTEGER: ")) {
 			show = strstr (response, "INTEGER: ") + 9;
 		}
+		else if (strstr (response, "OID: ")) {
+			show = strstr (response, "OID: ") + 5;
+		}
 		else if (strstr (response, "STRING: ")) {
 			show = strstr (response, "STRING: ") + 8;
 			conv = "%.10g";