Cannot find module (IF-MIB)


#1

I want to setup a telegraf to monitor my synology, the following config:

# Inet interface
    [[inputs.snmp.table]]
      oid = "IF-MIB::ifTable"
      [[inputs.snmp.table.field]]
        is_tag = true
      oid = "IF-MIB::ifDescr"

Is resulting in this error:

! Error in plugin [inputs.snmp]: initializing table : translating: exit status 2: MIB search path: /root/.snmp/mibs:/usr/share/snmp/mibs:/usr/share/snmp/mibs/iana:/usr/share/snmp/mibs/ietf:/usr/share/mibs/site:/usr/share/snmp/mibs:/usr/share/mibs/iana:/usr/share/mibs/ietf:/usr/share/mibs/netsnmp
Cannot find module (IF-MIB): At line 0 in (none)
IF-MIB::ifTable: Unknown Object Identifier

I’m using the docker container.

What i’m missing?


#2

Can be deleted, missed a crutial part


#3

it’s happening to me too.
Telegraf 1.5.3 Docker container.

Thanks
E.


#4

I created a custom docker build see below, which solve the problels.

# Based on https://github.com/weldpua2008/docker-net-snmp
   FROM telegraf
  
   RUN export  DEBIAN_FRONTEND=noninteractive && \
        export DEBIAN_RELEASE=$(awk -F'[" ]' '/VERSION=/{print $3}'  /etc/os-release | tr -cd '[[:alnum:]]._-' ) && \
        echo "remove main from /etc/apt/sources.list" && \
        sed -i '/main/d' /etc/apt/sources.list && \
        echo "remove contrib from /etc/apt/sources.list" && \
        sed -i '/contrib/d' /etc/apt/sources.list && \
       echo "remove non-free from /etc/apt/sources.list" && \
       sed -i '/non-free/d' /etc/apt/sources.list && \
       echo "deb http://httpredir.debian.org/debian ${DEBIAN_RELEASE} main contrib non-free"  >> /etc/apt/sources.list && \
       echo "deb http://httpredir.debian.org/debian ${DEBIAN_RELEASE}-updates main contrib non-free"  >> /etc/apt/sources.list && \
       echo "deb http://security.debian.org ${DEBIAN_RELEASE}/updates main contrib non-free"  >> /etc/apt/sources.list && \
      set -x &&\
      apt-get update && \
      apt-get -y install snmp snmpd snmp-mibs-downloader && \
      rm -r /var/lib/apt/lists/*

#5

Have you tried with an older version of container ?

43


#6

No just build a custom one, solves my problem.