oetiker / mrtg

MRTG - Multi Router Traffic Grapher
http://www.mrtg.org
247 stars 61 forks source link

Problems with timeout documentation #18

Open Daniel-Beardsmore opened 4 years ago

Daniel-Beardsmore commented 4 years ago

In https://oss.oetiker.ch/mrtg/doc/mrtg-reference.en.html under SnmpOptions, you have:

timeout => $default_timeout, retries => $default_retries, backoff => $default_backoff, default_max_repetitions => $max_repetitions,

The meanings of “$default_timeout” and “$default_retries” are not documented, and “timeout” does not appear in /usr/bin/mrtg. Searching Github reveals that they are defined inside SNMP_Session. The documentation should not be using unexplained variables — there needs to be a clear explanation of where these values come from.

Also, within SNMP_Session itself, the definition of “backoff” is not clear. Under the definition of $default_timeout, the comment notes, “Note that when a request is retried, the timeout is increased by BACKOFF (see below).” I read this as suggesting that the back-off amount is added, although the comment under $default_backoff mentions “factor”, correctly implying that multiplication occurs.

As regards the SnmpOptions setting, I don’t understand this remark in the documentation: “Apart from the per target timeout options, you can also configure the behaviour of the snmpget process on a more profound level.” What is a more profound level? Considering the comment that these settings OVERRIDE the per target timeout settings” — if anything is going to be “more profound”, I would say that having the default value override individual hosts (!!) would be the one “profound” setting, whereas the previously-mentioned comment suggests that this is the only non-profound setting …

¿Que?