From 43571dba915621251378e35e85cc593803d9fbe6 Mon Sep 17 00:00:00 2001 From: Thomas Guyot-Sionnest Date: Fri, 31 Jul 2009 03:50:42 -0400 Subject: check_snmp: Add some verbose output and tests --- plugins/check_snmp.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'plugins/check_snmp.c') diff --git a/plugins/check_snmp.c b/plugins/check_snmp.c index dff5bccd..9096cdad 100644 --- a/plugins/check_snmp.c +++ b/plugins/check_snmp.c @@ -100,7 +100,7 @@ size_t nunits = 0; size_t unitv_size = 8; int numoids = 0; int numauthpriv = 0; -int verbose = FALSE; +int verbose = 0; int usesnmpgetnext = FALSE; char *warning_thresholds = NULL; char *critical_thresholds = NULL; @@ -255,6 +255,9 @@ main (int argc, char **argv) ptr = chld_out.line[i]; oidname = strpcpy (oidname, ptr, delimiter); response = strstr (ptr, delimiter); + if (verbose > 2) { + printf("Processing line %i\n line: %s\n oidname: %s\n response: %s\n", i+1, ptr, oidname, response); + } /* We strip out the datatype indicator for PHBs */ @@ -431,7 +434,7 @@ process_arguments (int argc, char **argv) print_revision (progname, NP_VERSION); exit (STATE_OK); case 'v': /* verbose */ - verbose = TRUE; + verbose++; break; /* Connection info */ -- cgit v1.2.3-74-g34f1