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

SNMPv3 does not pull correct counters with multiple contexts on the same node #21

Open
zibartsk opened this issue Nov 16, 2019 · 2 comments
Labels

Comments

@zibartsk
Copy link

This functionality below actually prevents SNMPv3 multiple contexts working correctly when retrieving the same OID

%<--------------------------------
SNMP Request Optimization
MRTG is designed to economize on its SNMP requests. Where a target definition appears more than once in the configuration file, MRTG requests the data from the device only once per round of data collection and uses the collected data for each instance of a particular target. Recognition of two target definitions as being identical is based on a simple string match rather than any kind of deeper semantic analysis.
%<--------------------------------

What happens is that target line is actually identical (OID+IP) but what makes the difference is the context name in SnmpOptions. As a result all contexts will get the same value assigned for the same OID retrieved from the first poll.
Workaround seems to be to change host name with mix of different lower and upper case letters for different contexts but would be nice to have a proper fix!

Thanks

@oetiker
Copy link
Owner

oetiker commented Nov 18, 2019

oh, in that case it would make sense to extract the context from the options and adding it to the key for looking up values ... PR welcome!

@oetiker oetiker added the bug label Nov 18, 2019
@zibartsk
Copy link
Author

Not too sure if I will have time right now :( since i got the workaround playing with hostname mixing lower/iupper case letters and that works :)

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