-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
[SNMP Plugin] Use Part of OID as Field Name #2291
Comments
cc @phemmer |
I think you will be able to get the entire ip as a tag in snmpcollector. ( we are already getting complete domain names from some dns boxes ) Feel free to test it |
Still pondering on this. It's extremely odd that this agent wouldn't provide an OID for the IP. |
Oh, see #1948. I think this might be a duplicate of that. |
@phemmer I'm running into this issue as well (polling bgp peering prefixes) but am unable to get the table index as a tag portion working. When I try the suggestions from the related issues I get "Error in plugin: initializing table bgp_peer_prefix_counts: getting table columns: Was that a table?", which I assume is due to using the wrong OID for the "inputs.snmp.table" portion. My current base config that partially works:
results in:
when I test the config via CLI, however the localhost/metrics page shows only the first peering. I'm not exactly sure which OID to use to catch the table index. Any help would be greatly appreciated. |
I've run into a situation that I'm not sure can be solved using the snmp plugin. I believe I need to use a substring of a numerical OID as the name for the value obtained by querying that OID.
The component I'm querying is a Cisco 7900 series router for BGP peers prefixes.
Below is the truncated output of an snmp walk command.
OID .1.3.6.1.4.1.9.9.187.1.2.4.1.1 is called cbgpPeerAcceptedPrefixes in the following MIB: CISCO-BGP4-MIB and has dependencies BGP4-MIB and CISCO-SMI all located at
ftp://ftp.cisco.com/pub/mibs/v2
As you can see, the IP address of each BGP peer is contained in the numerical OID. Above, Peer 10.232.8.10 has 769 accepted prefixes. Unfortunately, I can't see a way to have telegraf output this correctly.
Relevant telegraf.conf:
Telegraf outputs, depending on whether MIBs are loaded or not:
The telegraf snmp plugin outputs only the OID prefix without the IP address information. I'm willing to accept the entire OID string if need be but I do need the prefix values to be reported uniquely.
I have looked for ways around this but cannot find the IP addresses as OID values anywhere else within the BGP route table MIBs.
System info:
Telegraf v1.1.1 (git: release-1.1.0 94de9dca1fc6efb3a4bf3ec6869c356278c6755a)
on Fedora 24
Thanks for any assistance you can provide.
The text was updated successfully, but these errors were encountered: