Cannot find module (IF-MIB)

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

# Inet interface
      oid = "IF-MIB::ifTable"
        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?

Can be deleted, missed a crutial part

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


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

# Based on
   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 ${DEBIAN_RELEASE} main contrib non-free"  >> /etc/apt/sources.list && \
       echo "deb ${DEBIAN_RELEASE}-updates main contrib non-free"  >> /etc/apt/sources.list && \
       echo "deb ${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/*

Have you tried with an older version of container ?


No just build a custom one, solves my problem.

1 Like