Add configurable max repetitions for SNMP bulk walks - #38
Conversation
Add the --max-repetitions option to control the snmpbulkwalk -Cr value. Keep the default at 10 to preserve the existing behavior and match the Net-SNMP default. Validate that the configured value is greater than zero.
|
install net-snmp-perl and run the plugin with an environment SNMP_XS_ENABLE=1 |
|
Im not sure if I understood you correct. Did you want me to test the vpn performance problem with the XS Backend or was it meant to test my PR against it? Anyway, I did both and can confirm that:
IMO this PR should not be influenced by the backend as the only thing it changes is to add the |
|
Ah, I think now I got it. The XS Backend already uses dynamic max-repititions based on query size, so I should not need to use the cache file at all. I'll try it, thanks. |
I monitor remote hosts over high-latency VPN connections. Regular live checks are unsuitable in this environment because they frequently time out, so I use the offline bulk-walk cache mode instead.
Currently,
snmpbulkwalkuses its defaultmax-repetitionsvalue of 10. This requires significantly more round trips than a value of 100.For example:
Default (
max-repetitions = 10)Configured with
max-repetitions = 100This reduces the runtime from about 132 seconds to 34 seconds for this connection.
Proposed change
Add a
--max-repetitionsoption that passes the configured value tosnmpbulkwalkthrough-Cr.The default remains conservatively set to 10, matching the Net-SNMP default and preserving existing behavior. Users monitoring devices over high-latency connections can increase the value when appropriate.
Values smaller than 1 are rejected during argument validation.