diff --git a/README.md b/README.md index b2e0637..9e4dd9e 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,54 @@ # Monitor your Mikrotik router with Prometheus and Grafana -Over the past years I replaced all my networking gear with Mikrotik devices. I absolutely love WinBox for management, but sometimes I miss some fancy charts and graphs. Luckily, RouterOS comes with a REST-API that can be used to query arbitrary data from the device. After some research I found some useful tools and blog posts that solved similar problems. Namely: +Use Grafana & Prometheus to monitor Mikrotik devices. This projects serves as a ready to use blueprint for monitoring based on Docker. It is designed and tested to be run on Raspberry Pis. -- [A blog post by Devin Smith that first got me interested](https://blog.devinsmith.co.za/home-internet-grafana-lockdown/) -- [A somewhat useable Grafana Dashboard](https://grafana.com/grafana/dashboards/10950) -- [A Prometheus exporter for Mikrotik devices written in Python](https://github.com/akpw/mktxp). -- [A Prometheus exporter for Mikrotik devices written in Go](https://github.com/nshttpd/mikrotik-exporter) -- [Smokeping](https://github.com/SuperQ/smokeping_prober) +## Features + +- System Health Monitoring + - disk usage + - CPU load + - memory usage + - public IP address (IPv4 & IPv6) + - system uptime + - temperature + - voltage monitoring +- Interface Monitoring + - traffic (bit/s) + - traffic (packets/s) + - per interface graphs +- Latency Monitoring + - customizable ICMP and/or UDP pings + - packet loss +- DHCP Monitoring + - active leases + - MAC addresses, host names, addresses +- Network Monitoring + - routes + - interfaces errors + - interface states + - PoE states +- Firewall Monitoring + - rules traffic + - logged rules traffic + - Ipv4 & IPv6 + - bandwidth + - active users +- Wireless Monitoring + - noise floor + - TxCCQ + - client devices + - number of clients + - traffic + - signal strength + - signal to noise ratio +- Netwatch +- CAPsMAN Monitoring + - remote CAPS + - registrations + - clients + - frequencies + - signal strength + - traffic ## Setup @@ -16,10 +58,18 @@ Over the past years I replaced all my networking gear with Mikrotik devices. I a ## Demo pictures -![General system stats](https://github.com/M0r13n/mikrotik_monitoring/blob/main/doc/pic_2.png) -![Firewall stats](https://github.com/M0r13n/mikrotik_monitoring/blob/main/doc/pic_3.png) -![CAPsMAN stats](https://github.com/M0r13n/mikrotik_monitoring/blob/main/doc/pic_5.png) -![Interface overview](https://github.com/M0r13n/mikrotik_monitoring/blob/main/doc/pic_6.png) +![General system stats](./doc/system.png) + +
Show more images + +![Network](./doc/network.png) +![Latency](./doc/latency.png) +![Netwatch](./doc/netwatch.png) +![Firewall](./doc/firewall.png) +![WiFi](./doc/wifi.png) +![Interfaces](./doc/interfaces.png) + +
## Installation @@ -153,6 +203,14 @@ apparmor_parser -r -W /etc/apparmor.d/docker-armor docker-compose -f docker-compose-armored.yml up -d ``` +## Resources + +- [A blog post by Devin Smith that first got me interested](https://blog.devinsmith.co.za/home-internet-grafana-lockdown/) +- [A somewhat useable Grafana Dashboard](https://grafana.com/grafana/dashboards/10950) +- [A Prometheus exporter for Mikrotik devices written in Python](https://github.com/akpw/mktxp). +- [A Prometheus exporter for Mikrotik devices written in Go](https://github.com/nshttpd/mikrotik-exporter) +- [Smokeping](https://github.com/SuperQ/smokeping_prober) + ## FAQ ### Why are my graphs empty? diff --git a/doc/firewall.png b/doc/firewall.png new file mode 100644 index 0000000..e209574 Binary files /dev/null and b/doc/firewall.png differ diff --git a/doc/interfaces.png b/doc/interfaces.png new file mode 100644 index 0000000..74e3add Binary files /dev/null and b/doc/interfaces.png differ diff --git a/doc/latency.png b/doc/latency.png new file mode 100644 index 0000000..c96e6ef Binary files /dev/null and b/doc/latency.png differ diff --git a/doc/netwatch.png b/doc/netwatch.png new file mode 100644 index 0000000..269b051 Binary files /dev/null and b/doc/netwatch.png differ diff --git a/doc/network.png b/doc/network.png new file mode 100644 index 0000000..7d9c923 Binary files /dev/null and b/doc/network.png differ diff --git a/doc/pic_2.png b/doc/pic_2.png deleted file mode 100644 index 4a6bb02..0000000 Binary files a/doc/pic_2.png and /dev/null differ diff --git a/doc/pic_3.png b/doc/pic_3.png deleted file mode 100644 index 0a25b81..0000000 Binary files a/doc/pic_3.png and /dev/null differ diff --git a/doc/pic_4.png b/doc/pic_4.png deleted file mode 100644 index 12cedba..0000000 Binary files a/doc/pic_4.png and /dev/null differ diff --git a/doc/pic_5.png b/doc/pic_5.png deleted file mode 100644 index 31852ea..0000000 Binary files a/doc/pic_5.png and /dev/null differ diff --git a/doc/pic_6.png b/doc/pic_6.png deleted file mode 100644 index 85e4e63..0000000 Binary files a/doc/pic_6.png and /dev/null differ diff --git a/doc/system.png b/doc/system.png new file mode 100644 index 0000000..af4ed5c Binary files /dev/null and b/doc/system.png differ diff --git a/doc/wifi.png b/doc/wifi.png new file mode 100644 index 0000000..785d298 Binary files /dev/null and b/doc/wifi.png differ diff --git a/docker-compose-armored.yml b/docker-compose-armored.yml index 6f61efd..42905f2 100644 --- a/docker-compose-armored.yml +++ b/docker-compose-armored.yml @@ -77,3 +77,16 @@ services: networks: - default restart: unless-stopped + + # https://github.com/SuperQ/smokeping_prober + smokeping: + image: quay.io/superq/smokeping-prober:latest + container_name: mikrotik-smokeping-prober + security_opt: + - apparmor:docker-mikrotik-monitoring + command: --config.file=/etc/smokeping/smokeping.yml + volumes: + - ./smokeping/smokeping.yml:/etc/smokeping/smokeping.yml + networks: + - default + restart: unless-stopped