diff options
author | Thomas Guyot-Sionnest <dermoth@aei.ca> | 2009-07-31 03:50:42 -0400 |
---|---|---|
committer | Thomas Guyot-Sionnest <dermoth@aei.ca> | 2009-07-31 03:52:10 -0400 |
commit | 43571dba915621251378e35e85cc593803d9fbe6 (patch) | |
tree | 7e550b7b9b24809516946d4611e311f358c3877a /plugins/check_snmp.c | |
parent | 8a96ee4741633cf8e832903f7ce0f542a77dbed8 (diff) | |
download | monitoring-plugins-43571dba915621251378e35e85cc593803d9fbe6.tar.gz |
check_snmp: Add some verbose output and tests
Diffstat (limited to 'plugins/check_snmp.c')
-rw-r--r-- | plugins/check_snmp.c | 7 |
1 files changed, 5 insertions, 2 deletions
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 */ |