diff options
author | Thomas Guyot-Sionnest <dermoth@aei.ca> | 2009-07-31 07:50:42 (GMT) |
---|---|---|
committer | Thomas Guyot-Sionnest <dermoth@aei.ca> | 2009-07-31 07:52:10 (GMT) |
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 dff5bcc..9096cda 100644 --- a/plugins/check_snmp.c +++ b/plugins/check_snmp.c | |||
@@ -100,7 +100,7 @@ size_t nunits = 0; | |||
100 | size_t unitv_size = 8; | 100 | size_t unitv_size = 8; |
101 | int numoids = 0; | 101 | int numoids = 0; |
102 | int numauthpriv = 0; | 102 | int numauthpriv = 0; |
103 | int verbose = FALSE; | 103 | int verbose = 0; |
104 | int usesnmpgetnext = FALSE; | 104 | int usesnmpgetnext = FALSE; |
105 | char *warning_thresholds = NULL; | 105 | char *warning_thresholds = NULL; |
106 | char *critical_thresholds = NULL; | 106 | char *critical_thresholds = NULL; |
@@ -255,6 +255,9 @@ main (int argc, char **argv) | |||
255 | ptr = chld_out.line[i]; | 255 | ptr = chld_out.line[i]; |
256 | oidname = strpcpy (oidname, ptr, delimiter); | 256 | oidname = strpcpy (oidname, ptr, delimiter); |
257 | response = strstr (ptr, delimiter); | 257 | response = strstr (ptr, delimiter); |
258 | if (verbose > 2) { | ||
259 | printf("Processing line %i\n line: %s\n oidname: %s\n response: %s\n", i+1, ptr, oidname, response); | ||
260 | } | ||
258 | 261 | ||
259 | /* We strip out the datatype indicator for PHBs */ | 262 | /* We strip out the datatype indicator for PHBs */ |
260 | 263 | ||
@@ -431,7 +434,7 @@ process_arguments (int argc, char **argv) | |||
431 | print_revision (progname, NP_VERSION); | 434 | print_revision (progname, NP_VERSION); |
432 | exit (STATE_OK); | 435 | exit (STATE_OK); |
433 | case 'v': /* verbose */ | 436 | case 'v': /* verbose */ |
434 | verbose = TRUE; | 437 | verbose++; |
435 | break; | 438 | break; |
436 | 439 | ||
437 | /* Connection info */ | 440 | /* Connection info */ |