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

Help: The result of snmp_exporter is not what I want . #680

Open
btdan opened this issue Aug 27, 2021 · 1 comment
Open

Help: The result of snmp_exporter is not what I want . #680

btdan opened this issue Aug 27, 2021 · 1 comment

Comments

@btdan
Copy link

btdan commented Aug 27, 2021

Hello, I want to collect snmp data with the help of snmp_exporter. However, There is a problem I do not know how to solve it.
The value of one snmpwalk result is not in iedal format. The detail information is as follows:

Host operating system: output of uname -a

Linux localhost.localdomain 3.10.0-1160.31.1.el7.x86_64 #1 SMP Thu Jun 10 13:32:12 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

snmp_exporter version: output of snmp_exporter -version

0.20

What device/snmpwalk OID are you using?

when I run the command :
snmpwalk -v 2c -c public 192.168.18.202 1.3.6.1.4.1.2011.5.25.177.1.1.3.1.1.0.1.1.1.4.192.168.18.212
and the result is as follows:
SNMPv2-SMI::enterprises.2011.5.25.177.1.1.3.1.1.0.1.1.1.4.192.168.18.212 = Counter32: 853946

the config file snmp.yml about this is as follows:
-------snmp.yml begin---------

f_mib:
  walk:
  - 1.3.6.1.2.1.1.3.0
  - 1.3.6.1.2.1.2
  - 1.3.6.1.2.1.31.1.1
  - 1.3.6.1.4.1.2011.5.25.31.1.1.1.1
  - 1.3.6.1.4.1.2011.6.3.4.1.2
  - 1.3.6.1.2.1.1
  - 1.3.6.1.2.1.47.1.1.1.1.7
  - 1.3.6.1.4.1.2011.5.25.31.1.1.3.1
  - 1.3.6.1.2.1.15.3.1
  - 1.3.6.1.4.1.2011.5.25.177.1.1.3.1
  get:
  - 1.3.6.1.2.1.1.3.0
  metrics:
  - name: hwBgpPeerPrefixRcvCounter
    oid: 1.3.6.1.4.1.2011.5.25.177.1.1.3.1.1.0.1.1.1.4.192.168.18.212
    type: Gauge

-------snmp.yml end---------

However, when we visit the website of snmp_export , I find that the content about it is as follow:
hwBgpPeerPrefixRcvCounter{hwBgpPeerPrefixRcvCounter="854144"} 1

I want the ideal content is
hwBgpPeerPrefixRcvCounter 854144

Can anyone be kind to tell me how to solve this problem?Thanks very much.

@SuperQ
Copy link
Member

SuperQ commented Aug 27, 2021

For questions/help/support please use our community channels. There are more people available to potentially respond to your request and the whole community can benefit from the answers provided.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants