Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check_snmp sending wrong timeout to snmpget. #129

Closed
Freeze opened this issue Dec 9, 2015 · 1 comment
Closed

check_snmp sending wrong timeout to snmpget. #129

Freeze opened this issue Dec 9, 2015 · 1 comment
Assignees
Labels

Comments

@Freeze
Copy link

Freeze commented Dec 9, 2015

If you use the check_snmp plugin with the -t flag, it sends the wrong value for -t to /usr/bin/snmpget. For instance, if you tell it to use a timeout of 30, it sends 7 to snmpget.

Example output:

[root@core libexec]# ./check_snmp -H x.x.x.x -t 30 -o sysName.0 -vvv

/usr/local/bin/snmpget -Le -t 7 -r 5 -m ALL -v 1 [authpriv] x.x.x.x:161 sysName.0

Notice the -t 30 and -t 7

https://support.nagios.com/forum/viewtopic.php?f=35&t=36087&p=163900#p163900

@jfrickson jfrickson added the Bug label Oct 31, 2016
@jfrickson jfrickson self-assigned this Oct 31, 2016
@jfrickson jfrickson added Invalid and removed Bug labels Nov 2, 2016
@jfrickson
Copy link
Contributor

This is working as designed. The timeout sent to snmpget is the -t timeout (defaults to 10 seconds) divided by the number of retries (defaults to 5) plus 1. So using defaults: 10 / 5 + 1 = 3. Using -t 30 results in 30 / 5 + 1 = 7.

The reasoning is -t is the plugin timeout, not the socket timeout. Plugin timeout divided by number of retries is the socket timeout.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants