🔰 Grafana dashboard for Mikrotik/routerOS [Prometheus, SNMP]
Find a file
Yovko Yovkov e275c46fbd
better ifname regexp
Before regexp for isolating interface names was relying on the the next tag in query to be exactly "instance", which were generating few issues:
  - if there is another tag starting with the word "interface"
  - if the next tag is not "interface"
then the interface name extracted are not valid.

The proposed regexp is solving that issues
2022-10-09 16:13:56 +03:00
.github/workflows fix actions 2022-07-27 16:22:04 +03:00
grafana/provisioning better ifname regexp 2022-10-09 16:13:56 +03:00
prometheus small improvements 2022-06-21 21:09:02 +03:00
readme added 60GHz monitoring 2022-01-31 19:28:07 +03:00
snmp Added Dockerfile 2021-07-31 23:13:48 +03:00
.env cosmetic refactoring 2022-06-21 17:12:24 +03:00
.grafana cosmetic refactoring 2022-06-21 17:12:24 +03:00
.prometheus cosmetic refactoring 2022-06-21 17:12:24 +03:00
docker-compose.yml updated grafana version 2022-07-27 15:53:18 +03:00
LICENSE Create LICENSE 2021-10-08 03:06:49 +03:00
Mikrotik-snmp-prometheus.json updated grafana version 2022-07-27 15:53:18 +03:00
README.md updated grafana version 2022-07-27 15:53:18 +03:00
run.sh small improvements 2022-06-21 21:09:02 +03:00

Grafana-Mikrotik

logo

visitors example branch parameter mikrotikOS Grafana Prometheus snmp_exporter

Donate using Liberapay


🐳 Deploy with docker-compose

Deploy with bash script

curl -fsSL https://raw.githubusercontent.com/IgorKha/Grafana-Mikrotik/master/run.sh | bash -s -- --config
  You can also pass some arguments to script to set some these options:

    --config: change the user and password to grafana and specify the mikrotik IP address

    --stop: stop docker containers

    --help

For example:

    bash run.sh --config

asciicast

deploy with docker-compose manual

1.Change targets ip (192.168.88.1) into file prometheus/prometheus.yml

2.Run

docker-compose up -d

3.Open localhost:3000

  • Grafana login: admin

  • Password: mikrotik

If you want to change the credentials, then edit the ".env" file


Manual deploy

1.add into prometheus.yml

  - job_name: Mikrotik
    static_configs:
      - targets:
        - 192.168.88.1  # SNMP device IP.
    metrics_path: /snmp
    params:
      module: [mikrotik]
    relabel_configs:
      - source_labels: [__address__]
        target_label: __param_target
      - source_labels: [__param_target]
        target_label: instance
      - target_label: __address__
        replacement: localhost:9116  # The SNMP exporter's real hostname:port.

2.Configure Prometheus and run /snmp/snmp_exporter

3.Add dashboard https://grafana.com/grafana/dashboards/14420


Docker snmp_exporter

Docker Pulls

amd64-linux container

sudo docker run -d -p 9116:9116 mashinkopochinko/snmp_exporter_mikrotik:latest

img1