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

generator: Cannot find oid 'ifXTable' to walk #421

Closed
simonszu opened this issue Jun 5, 2019 · 3 comments
Closed

generator: Cannot find oid 'ifXTable' to walk #421

simonszu opened this issue Jun 5, 2019 · 3 comments

Comments

@simonszu
Copy link

simonszu commented Jun 5, 2019

Host operating system: output of uname -a

Linux naugol 4.9.0-9-amd64 #1 SMP Debian 4.9.168-1+deb9u2 (2019-05-13) x86_64 GNU/Linux
running with docker

snmp_exporter version: output of snmp_exporter -version

No error in smp_exporter, but in generator. Latest generator commit is a622a79.

What device/snmpwalk OID are you using?

Default IF-MIB interfaces table with ifIndex. Tried with the buildin MIB, and with http://www.net-snmp.org/docs/mibs/IF-MIB.txt

What did you do that produced an error?

generator.yml:

modules:
  # Default IF-MIB interfaces table with ifIndex.
  if_mib:
    walk: [sysUpTime, interfaces, ifXTable]
    lookups:
      - source_indexes: [ifIndex]
        lookup: ifAlias
      - source_indexes: [ifIndex]
        lookup: ifDescr
      - source_indexes: [ifIndex]
        # Use OID to avoid conflict with Netscaler NS-ROOT-MIB.
        lookup: 1.3.6.1.2.1.31.1.1.1.1 # ifName
    overrides:
      ifAlias:
        ignore: true # Lookup metric
      ifDescr:
        ignore: true # Lookup metric
      ifName:
        ignore: true # Lookup metric
      ifType:
        type: EnumAsInfo

(as copied from the example generator.yml)

Run the generator with the following command:

$ docker pull prom/snmp-generator
$ docker run -ti \                                                                                                                                           
-v /data/snmp-exporter/mibs:/root/.snmp/mibs \
-v /data/snmp-exporter/exporter:/opt/ \
snmp-generator generate 

What did you expect to see?

Generator runs and creates snmp_exporter config.

What did you see instead?

INFO[0000] Loading MIBs from mibs                        source="net_snmp.go:141"
WARN[0000] NetSNMP reported 1 parse error(s)             source="main.go:104"
INFO[0000] Generating config for module if_mib           source="main.go:49"
WARN[0000] Could not find metric 'ifType' to override type  source="tree.go:264"
FATA[0000] Cannot find oid 'ifXTable' to walk            source="tree.go:290"

Since i was unsure if the builtin snmp binaries did provide these MIBs, i downloaded them separately from the URL specified above and mounted the host directory containing the MIBs to /root/.snmp/mibs with the same result.

@brian-brazil
Copy link
Contributor

It makes more sense to ask questions like this on the prometheus-users mailing list rather than in a GitHub issue. On the mailing list, more people are available to potentially respond to your question, and the whole community can benefit from the answers provided.

@ainiml
Copy link

ainiml commented Jul 16, 2020

I solved my issue by generating all the OID name aliases from the MIB files instead

see, https://github.com/TheShellLand/docker-smidump/blob/master/mibs/generator.yml

@motiejus
Copy link

motiejus commented Sep 5, 2023

I solved my issue by generating all the OID name aliases from the MIB files instead

see, https://github.com/TheShellLand/docker-smidump/blob/master/mibs/generator.yml

The link no longer exists, and I have exactly the same issue. Could you elaborate in a bit more detail how did you generate the OID aliases from the MIB files?

@prometheus prometheus locked as resolved and limited conversation to collaborators Sep 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants