Giter VIP home page Giter VIP logo

Comments (5)

rwgrony avatar rwgrony commented on August 30, 2024

CISCO-IETF-IPMROUTE-MIB.txt
I added the MIB file because the resource is unavailable.

from snmp_exporter.

SuperQ avatar SuperQ commented on August 30, 2024

Try with the latest (0.26.0) generator, it has improved error handling in the MIB parser.

from snmp_exporter.

rwgrony avatar rwgrony commented on August 30, 2024

I updated the SNMP exporter to version 0.26.0, but now I see errors related to Go

snmp_exporter/0.26/snmp_exporter/generator$ make generate
MIBDIRS='mibs' ./generator --fail-on-parse-errors --log.level=debug generate 
ts=2024-07-19T08:59:29.556Z caller=net_snmp.go:175 level=info msg="Loading MIBs" from=mibs
ts=2024-07-19T08:59:30.361Z caller=main.go:58 level=info msg="Generating config for module" module=cisco_asr_module
panic: runtime error: slice bounds out of range [:-1]

goroutine 1 [running]:
main.generateConfigModule.func2(0xc000ce2ee0)
        /mnt/c/Ubuntu/testing/go/snmp_exporter/0.26/snmp_exporter/generator/tree.go:390 +0x16f8
main.walkNode(0xc000ce2ee0, 0xc001211a40)
        /mnt/c/Ubuntu/testing/go/snmp_exporter/0.26/snmp_exporter/generator/tree.go:40 +0x22
main.generateConfigModule(0xc000123c20, 0xc000eeb420, 0xc001211ce8, {0x73f360, 0xc0000a4140})
        /mnt/c/Ubuntu/testing/go/snmp_exporter/0.26/snmp_exporter/generator/tree.go:339 +0xadb
main.generateConfig(0xc0000ec1c0, 0x73f360?, {0x73f360, 0xc0000a4140})
        /mnt/c/Ubuntu/testing/go/snmp_exporter/0.26/snmp_exporter/generator/main.go:67 +0x479
main.main()
        /mnt/c/Ubuntu/testing/go/snmp_exporter/0.26/snmp_exporter/generator/main.go:137 +0x3a7
make: *** [Makefile:90: generate] Error 2

I also tried generating snmp.yml without the following metrics:

  • cIpMRouteEntryCount
  • cIpMRouteGroup
  • cIpMRouteHCPkts
  • cIpMRouteHCOctets

and everything works as expected. However, I can't understand why there are issues specifically with these metrics. All the necessary MIB files are present (CISCO-IETF-IPMROUTE-MIB, SNMPv2-SMI, SNMPv2-CONF, SNMPv2-TC, SNMP-FRAMEWORK-MIB, IF-MIB, HCNUM-TC, INET-ADDRESS-MIB, IANA-RTPROTO-MIB, IPMROUTE-STD-MIB, CISCO-SMI).

from snmp_exporter.

rwgrony avatar rwgrony commented on August 30, 2024

I also tried enabling debug mode(--log.level=debug), but I'm not sure if it's working.

from snmp_exporter.

SuperQ avatar SuperQ commented on August 30, 2024

Interesting, I am able to reproduce the error. I had to find the MIB on another site as circitor.fr is down. I'll have to spend some time to figure out where the problem is. This definitely seems like a bug in how this MIB is being handled. There may be something wrong with it. But the generator should handle this gracefully.

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.