Giter VIP home page Giter VIP logo

Comments (17)

RichiH avatar RichiH commented on May 22, 2024

You need to use oid: 1.3.6.1.4.1.35265.1.29.7.1.2 instead of oid: 1.3.6.1.4.1.35265.1.29.7.1.2.0

from snmp_exporter.

RichiH avatar RichiH commented on May 22, 2024

Also, you need to change your community string as you just posted it to the public Internet...

from snmp_exporter.

logicall avatar logicall commented on May 22, 2024

@RichiH Thank you!

Now I received data.
Do not filled Field "ifDescr" for some reason oid 1.3.6.1.4.1.35265.1.29.7.1.2.0

# HELP SmgEOnePhyState SNMP OID 1.3.6.1.4.1.35265.1.29.7.1.2
# TYPE SmgEOnePhyState untyped
SmgEOnePhyState{ifDescr="8"} 6.0
SmgEOnePhyState{ifDescr="9"} 2.0
SmgEOnePhyState{ifDescr="10"} 2.0
SmgEOnePhyState{ifDescr="11"} 6.0
SmgEOnePhyState{ifDescr="4"} 6.0
SmgEOnePhyState{ifDescr="5"} 6.0
SmgEOnePhyState{ifDescr="6"} 6.0
SmgEOnePhyState{ifDescr="7"} 6.0
SmgEOnePhyState{ifDescr="1"} 6.0
SmgEOnePhyState{ifDescr="2"} 6.0
SmgEOnePhyState{ifDescr="3"} 6.0
SmgEOnePhyState{ifDescr=""} 6.0
SmgEOnePhyState{ifDescr="12"} 6.0
SmgEOnePhyState{ifDescr="13"} 6.0
SmgEOnePhyState{ifDescr="14"} 6.0
SmgEOnePhyState{ifDescr="15"} 6.0
# HELP snmp_scrape_duration_seconds Time this SNMP scrape took, in seconds
# TYPE snmp_scrape_duration_seconds gauge
snmp_scrape_duration_seconds 0.018084049224853516
# HELP snmp_oids_walked Number of oids walked in this scrape
# TYPE snmp_oids_walked gauge
snmp_oids_walked 16.0

from snmp_exporter.

RichiH avatar RichiH commented on May 22, 2024

You didn't do a lookup. Try

walk:
    - 1.3.6.1.2.1.2
    - 1.3.6.1.4.1.35265.1.29.7.1.2

metrics:
    - name: SmgEOnePhyState
      oid: 1.3.6.1.4.1.35265.1.29.7.1.2.0
      indexes:
        - labelname: ifDescr
          type: Integer32
      lookups:
        - labels: [ifDescr]
          labelname: ifDescr
          oid: 1.3.6.1.2.1.2.2.1.2

from snmp_exporter.

brian-brazil avatar brian-brazil commented on May 22, 2024

You need to add a lookups section, see the provided example.

from snmp_exporter.

logicall avatar logicall commented on May 22, 2024

The oid 1.3.6.1.2.1.2.2.1.2 I do not have these interfaces.
This specific equipment.

 snmpwalk -On -v 2c -c public 192.168.20.228 1.3.6.1.2.1.2.2.1.2
.1.3.6.1.2.1.2.2.1.2.1 = STRING: cpu-port 1/0
.1.3.6.1.2.1.2.2.1.2.2 = STRING: host-port 1/0
.1.3.6.1.2.1.2.2.1.2.3 = STRING: host-port 1/1
.1.3.6.1.2.1.2.2.1.2.4 = STRING: host-port 1/2
.1.3.6.1.2.1.2.2.1.2.5 = STRING: sm-port 1/1
.1.3.6.1.2.1.2.2.1.2.6 = STRING: sm-port 1/2
.1.3.6.1.2.1.2.2.1.2.7 = STRING: front-port 1/0
.1.3.6.1.2.1.2.2.1.2.8 = STRING: front-port 1/1
.1.3.6.1.2.1.2.2.1.2.9 = STRING: front-port 1/2
.1.3.6.1.2.1.2.2.1.2.10 = STRING: front-port 1/3
.1.3.6.1.2.1.2.2.1.2.11 = STRING: sm-port 1/3
.1.3.6.1.2.1.2.2.1.2.12 = STRING: sm-port 1/5
.1.3.6.1.2.1.2.2.1.2.13 = STRING: sm-port 1/4
.1.3.6.1.2.1.2.2.1.2.14 = STRING: sm-port 1/0
.1.3.6.1.2.1.2.2.1.2.15 = STRING: bond1.1

This is completely different interfaces. The statistics I have not rented it.

You can somehow on another to fill this field? Counter some.
For example i = i + 1

from snmp_exporter.

RichiH avatar RichiH commented on May 22, 2024

Some table will have the names you need. You need to walk and lookup against that table.

from snmp_exporter.

logicall avatar logicall commented on May 22, 2024

The fact that there is no such information.
Quite simply fill in the serial number in order to understand how this interface.
In support of this producer told me that the last figure in the oid is the interface number. Girlfriend this information does not get it.

from snmp_exporter.

RichiH avatar RichiH commented on May 22, 2024

I am not sure how to do that; @brian-brazil would know if anyone knows.

from snmp_exporter.

logicall avatar logicall commented on May 22, 2024

@RichiH Thank you!

from snmp_exporter.

brian-brazil avatar brian-brazil commented on May 22, 2024

I don't understand the question. As @RichiH says if you want to put a string on a label, it has to be in a MIB table somewhere.

from snmp_exporter.

logicall avatar logicall commented on May 22, 2024

Hello @brian-brazil
The MIB table does not contain such data on this device.
Can I add in the configuration of Prometheus "port 0"?

before
SmgEOnePhyState{instance="192.168.20.228",job="snmp"}
SmgEOnePhyState{instance="192.168.20.228",job="snmp", port="1"}
SmgEOnePhyState{instance="192.168.20.228",job="snmp", port="2"}

after
SmgEOnePhyState{instance="192.168.20.228",job="snmp", port="0"}
SmgEOnePhyState{instance="192.168.20.228",job="snmp", port="1"}
SmgEOnePhyState{instance="192.168.20.228",job="snmp", port="2"}

If so, how?
Tell me please.
In the examples I did not understand how to do it.

from snmp_exporter.

brian-brazil avatar brian-brazil commented on May 22, 2024

Make sure you're using a recent version of the SNMP exporter, that was fixed a few months back.

from snmp_exporter.

logicall avatar logicall commented on May 22, 2024
pip list
...
snmp-exporter (0.0.5)
...

from snmp_exporter.

brian-brazil avatar brian-brazil commented on May 22, 2024

Try running at head.

from snmp_exporter.

logicall avatar logicall commented on May 22, 2024

@brian-brazil Thank you!
snmp_exporter from head its work!

from snmp_exporter.

brian-brazil avatar brian-brazil commented on May 22, 2024

Great!

from snmp_exporter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.