Feature request: Poll device using multiple communities to access contexts

For my particular use case of this feature, on the Cisco ASR9000 platform, I must use a SNMP context in order to expose routing information that lives within a VRF instance; specifically, BGP neighbour information (i.e.: status, updates, prefixes). For lack of a better understanding on my part, I believe this ties to CISCO-CONTEXT-MAPPING-MIB, and I think the discussion on more general support for the MIB was by way of issue 280.

Currently, the workaround to query information from multiple contexts is for each context-aware device to be duplicated in LibreNMS one time for each context on that device a user wishes to poll. Each instance of that duplicated device would have it’s SNMP Community information populated with whatever context community they wished to have polled.

While it is an effective workaround, it comes with annoying side effects and doesn’t scale. A solution would be to allow LibreNMS to poll multiple communities for a single instance of a device. This would resolve the scaling issue of the current workaround, and remove the annoying side effects such as having multiple results for a device appear in a global search, duplicate graphs, duplicate information in the database, etc.

I envision the implementation could look something like having two SNMP Community input boxes at https://libre/device/device=#/tab=edit/section=snmp/ where “SNMP Community” could be renamed to “Global SNMP Community” and the additional community input box could be called “Context SNMP Community(s)” which would accept zero or more context communities.

I’m sure other platforms have their own equivalents for CISCO-CONTEXT-MAPPING-MIB, so I guess LibreNMS should be able to figure out which MIB it might need to use depending on what kind of device a context community could be configured on.

While being asked to provide as much detail as possible above, I hope this is adequate detail from someone who is not a coder and doesn’t have much of an understanding of what information might be useful to provide to those of you who are :slight_smile:

1 Like

Hello,

I have the same scenario using a Juniper MX104 with several logical-systems.
I’m using a main snmp community for the global context and then dedicated snmp communities ( derived from the main community ) for each logical systems. Data from the logical systems are not available in the global context.
If you need more info, feel free to ask.

Regards,
flo

Am I missing anything or has this request/feature not changed status in a while?

Thanks

Hi,

This feature request seems to have been abandoned as there hasn’t been activity in over almost a year? I’m in the same boat as flo just using Cisco-gear. This would greatly help in monitoring ASR 9Ks as the only other option is to have several hosts each with a different community string.

I can supply more info if it’s needed.

Regards,

Hello,

I have the same request for Cisco and Ekinops devices.

Thanks

I support this too. When running VXLAN on Cisco Nexus, Librenms is quite limited without a solution to multiple snmp communities.
I found a workaround is adding a cname in dns like hostname-vrf_red and allowing:
$config[‘allow_duplicate_sysName’] = true;

Far from perfect solution, but it works. No visable hit on CPU on 93180.

Some modules already support polling multiple VRFs.

The add device supports it. Any other?

I guess you are thinking of:
// v1 or v2c
$config[‘snmp’][‘community’][] = “my_custom_community”;
$config[‘snmp’][‘community’][] = “another_community”;

1 Like

No, I’m thinking of BGP and maybe another one. It queries the VRF instances from the devices then polls each one by setting the snmp context.