This scrapes all possible interfaces for a device and sends the data to the configured InfluxDB.

The idea was born, because Telegraf Docker container was too big to run on a Mikrotik CCR2004-1G-12S+2XS (it has only 128mb flash). Also the approach is to be able to cut off inbound internet access to the Mikrotik completely and just send metrics via HTTPS to InFluxDb.

Also the idea is to scrape multiple devices from the Mikrotik and just upload all this data without the need to install the container on every device.

Container size

REPOSITORY                           TAG               IMAGE ID       CREATED             SIZE
scraper                              latest            2861ced8e846   About an hour ago   55.8MB

Example Dashboard
Screenshot 2021-09-25 at 18 13 19

Disk usage after install

Screenshot 2021-09-25 at 18 36 00


default_community: public
  - hostname: testhost01
    community: public
  uri: testinflux
  username: testuser
  password: testpw
  database: nicedb

RouterOS Setup

Select and export a corresponding docker image like this:

docker pull
docker save snmp-to-influx-python:latest > snmp.tar 


  • Working container package and veth pairs on the Mikrotik device
  • You uploaded the snmp.tar to the rootfs
  • You created a directory config on part0 and added a scraper.yaml

/container/mounts/add name=scraper src=config dst=/config
/container/envs/add list=snmp name=SNMP_TO_INFLUX_CONFIG_FILE value=/config/scraper.yaml
/container/add file=snmp.tar interface=veth1 root-dir=snmp mounts=scraper logging=yes envlist=snmp
/container/start <insert_container_number_here>

When everything works you should see an output like this

[admin@MikroTik] > /container/print 
 0 file=snmp.tar name="a1f6ef78-bdcb-4fc8-8bc4-4eac98743ff0" tag="scraper:latest" os="linux" arch="arm64" interface=veth1 envlist="snmp" root-dir=snmp mounts=scraper dns="" logging=yes status=running 
[admin@MikroTik] >

Logs can be found in /log/print


All pre-build containers can be downloaded here