aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGravatar Karl DeBisschop <kdebisschop@users.sourceforge.net> 2003-05-09 03:00:34 +0000
committerGravatar Karl DeBisschop <kdebisschop@users.sourceforge.net> 2003-05-09 03:00:34 +0000
commit3bae38aef895b93b29836c2f15c9dfd388562e11 (patch)
tree72d15521c75da67eb1f9335ad46cc029f8e8e25a /plugins
parent6882b543648b994a1707a96a9116ae52fe72b57a (diff)
downloadmonitoring-plugins-3bae38aef895b93b29836c2f15c9dfd388562e11.tar.gz
cause snmpget try try for 1 second less than the timeout (allowing plugin to force close if needed)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@501 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins')
-rw-r--r--plugins/check_snmp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/check_snmp.c b/plugins/check_snmp.c
index 8715fb05..2aded73b 100644
--- a/plugins/check_snmp.c
+++ b/plugins/check_snmp.c
@@ -233,8 +233,9 @@ main (int argc, char **argv)
usage ("Incorrect arguments supplied\n");
/* create the command line to execute */
- asprintf (&command_line, "%s -m %s -v %s %s %s:%s %s",
- PATH_TO_SNMPGET, miblist, proto, authpriv, server_address, port, oid);
+ asprintf (&command_line, "%s -t 1 -r %d -m %s -v %s %s %s:%s %s",
+ PATH_TO_SNMPGET, timeout_interval - 1, miblist, proto,
+ authpriv, server_address, port, oid);
if (verbose)
printf ("%s\n", command_line);