adds latency monitoring

This commit is contained in:
Leon Morten Richter 2023-02-26 13:32:53 +01:00
parent 7cb70f316f
commit 190c82b021
No known key found for this signature in database
GPG key ID: DC00D426A10A6E2B
5 changed files with 578 additions and 119 deletions

View file

@ -6,6 +6,7 @@ Over the past years I replaced all my networking gear with Mikrotik devices. I a
- [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)
## Setup
@ -96,6 +97,16 @@ You may need to adjust the following configuration files and add your own creden
Done. You should now be able to open the Grafana dashboard on Port 3000 of your Raspberry Pi.
## Latency Monitoring
This projects uses a [smokeping prober](https://github.com/SuperQ/smokeping_prober) to measure network latency and packet loss. By default three targets are configured:
- 1.1.1.1 (Cloudflare)
- 8.8.8.8 (Google)
- 9.9.9.9 (IBM)
You may adjust **smokeping/smokeping.yml** according to your needs.
## Multiple Nodes
It is possible to monitor multiple (Mikrotik) devices. Just change add as many devices to `mktxp/mktxp.conf` as you want.

View file

@ -70,3 +70,14 @@ 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
command: --config.file=/etc/smokeping/smokeping.yml
volumes:
- ./smokeping/smokeping.yml:/etc/smokeping/smokeping.yml
networks:
- default
restart: unless-stopped

File diff suppressed because it is too large Load diff

View file

@ -7,7 +7,7 @@ global:
# Attach these labels to any time series or alerts when communicating with
# external systems (federation, remote storage, Alertmanager).
external_labels:
monitor: 'my-project'
monitor: 'mikrotik-monitoring'
# Load and evaluate rules in this file every 'evaluation_interval' seconds.
rule_files:
@ -31,3 +31,4 @@ scrape_configs:
- targets:
- 'mikrotik_exporter:9436'
- 'mktxp:49090'
- 'smokeping:9374'

10
smokeping/smokeping.yml Normal file
View file

@ -0,0 +1,10 @@
---
targets:
- hosts:
- 1.1.1.1
- 8.8.8.8
- 9.9.9.9
interval: 10s # Duration, Default 1s.
network: ip4 # One of ip, ip4, ip6. Default: ip (automatic IPv4/IPv6)
protocol: icmp # One of icmp, udp. Default: icmp (Requires privileged operation)
size: 56 # Packet data size in bytes. Default 56 (Range: 24 - 65535)