From 0497d33f447c995b22ec0873cc66765a5ffd3723 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauri=20V=C3=B5sandi?= Date: Sat, 16 Oct 2021 08:49:25 +0300 Subject: [PATCH] Update README --- README.md | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index ecc9d9d..e3d13be 100644 --- a/README.md +++ b/README.md @@ -5,10 +5,19 @@ This is Prometheus exporter for Mikrotik routers and switches. # Usage -Supply `MIKROTIK_USER`, `MIKROTIK_PASSWORD` and comma separated `TARGETS` -as environment variables via `.env` file. -Optionally configure `PROMETHEUS_BEARER_TOKEN` for securing the -metrics endpoint. +Supply `MIKROTIK_USER`, `MIKROTIK_PASSWORD` using `.env` file. +Spin up the containers: + +```bash +docker-compose up --build +``` + +Wait for targets to be scraped, open up Prometheus to run queries: + +* [rate(mikrotik_interface_rx_bytes[1m])](http://localhost:9090/graph?g0.expr=rate(mikrotik_interface_rx_bytes%5B1m%5D)&g0.tab=0) +* [rate(mikrotik_interface_tx_bytes[1m])](http://localhost:9090/graph?g0.expr=rate(mikrotik_interface_tx_bytes%5B1m%5D)&g0.tab=0) +* [rate(mikrotik_interface_rx_packets[1m])](http://localhost:9090/graph?g0.expr=rate(mikrotik_interface_rx_packets%5B1m%5D)&g0.tab=0) +* [rate(mikrotik_interface_tx_packets[1m])](http://localhost:9090/graph?g0.expr=rate(mikrotik_interface_tx_packets%5B1m%5D)&g0.tab=0) # Why not SNMP