Open zibartsk opened 4 years ago
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!
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 :)
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