diff --git a/README.md b/README.md index e5087df..dd20300 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,7 @@ Use Grafana & Prometheus to monitor Mikrotik devices. This projects serves as a ## Installation ## Mikrotik Router -At first you need to prepare your router. +At first you need to prepare your router. Create a group on the device that has API and read-only access: @@ -99,7 +99,7 @@ Install Docker + Docker-compose (reboot required) ```bash curl -sSL https://get.docker.com | sh sudo usermod -aG docker ubuntu -sudo pip3 install docker-compose +sudo apt install docker-compose sudo systemctl enable docker sudo reboot ``` @@ -159,7 +159,7 @@ You may adjust **blackbox/blackbox.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. +It is possible to monitor multiple (Mikrotik) devices. Just change add as many devices to `mktxp/mktxp.conf` as you want. ## HTTPS @@ -186,7 +186,7 @@ server { include ssl/self-signed.conf; location / { - proxy_set_header Host $http_host; + proxy_set_header Host $http_host; proxy_pass http://grafana:3000/; } } diff --git a/docker-compose.yml b/docker-compose.yml index 34b37c4..a75c3f9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,14 +1,14 @@ version: "3.9" volumes: - prometheus_data: {} - grafana_data: {} + prometheus_data: {} + grafana_data: {} services: # Prometheus # https://github.com/stefanprodan/dockprom prometheus: - image: prom/prometheus:v2.42.0 + image: prom/prometheus:v2.45.3 container_name: mikrotik-prometheus volumes: - ./prometheus:/etc/prometheus @@ -16,7 +16,7 @@ services: command: - '--config.file=/etc/prometheus/prometheus.yml' - '--storage.tsdb.path=/prometheus' - - '--storage.tsdb.retention.time=1y' # <= adjust the storage retention period of Prometheus + - '--storage.tsdb.retention.time=1y' # <= adjust the storage retention period of Prometheus restart: unless-stopped networks: - default @@ -26,7 +26,7 @@ services: # Grafana # https://github.com/stefanprodan/dockprom grafana: - image: grafana/grafana:9.3.6 + image: grafana/grafana:10.3.1 container_name: mikrotik-grafana volumes: - grafana_data:/var/lib/grafana @@ -47,7 +47,7 @@ services: # MKTXP # https://github.com/akpw/mktxp mktxp: - image: ghcr.io/akpw/mktxp:gha-5421251592 + image: ghcr.io/akpw/mktxp:gha-7614306238 container_name: mikrotik-mktxp volumes: # Since Version v0.37 mktxp runs as single user @@ -66,7 +66,7 @@ services: - ./nginx/nginx-selfsigned.crt:/etc/nginx/ssl/nginx-selfsigned.crt - ./nginx/self-signed.conf:/etc/nginx/ssl/self-signed.conf ports: - - 80:80 # You may adjust to some unprivileged ports + - 80:80 # You may adjust to some unprivileged ports - 443:443 networks: - default diff --git a/mktxp/mktxp.conf b/mktxp/mktxp.conf index 161816b..7166d8c 100644 --- a/mktxp/mktxp.conf +++ b/mktxp/mktxp.conf @@ -13,27 +13,27 @@ [Sample-Router] enabled = False # turns metrics collection for this RouterOS device on / off - + hostname = localhost # RouterOS IP address port = 8728 # RouterOS IP Port - + username = username # RouterOS user, needs to have 'read' and 'api' permissions password = password - + use_ssl = False # enables connection via API-SSL servis no_ssl_certificate = False # enables API_SSL connect without router SSL certificate - ssl_certificate_verify = False # turns SSL certificate verification on / off + ssl_certificate_verify = False # turns SSL certificate verification on / off installed_packages = True # Installed packages dhcp = True # DHCP general metrics dhcp_lease = True # DHCP lease metrics connections = True # IP connections metrics - connection_stats = False # Open IP connections metrics + connection_stats = False # Open IP connections metrics pool = True # Pool metrics interface = True # Interfaces traffic metrics - + firewall = True # IPv4 Firewall rules traffic metrics ipv6_firewall = False # IPv6 Firewall rules traffic metrics ipv6_neighbor = False # Reachable IPv6 Neighbors @@ -46,11 +46,15 @@ wireless = True # WLAN general metrics wireless_clients = True # WLAN clients metrics capsman = True # CAPsMAN general metrics - capsman_clients = True # CAPsMAN clients metrics + capsman_clients = True # CAPsMAN clients metrics + + kid_control_devices = False # Kid Control metrics user = True # Active Users metrics queue = True # Queues metrics - + remote_dhcp_entry = None # An MKTXP entry for remote DHCP info resolution (capsman/wireless) - use_comments_over_names = True # when available, forces using comments over the interfaces names + use_comments_over_names = True # when available, forces using comments over the interfaces names + + check_for_updates = False # check for available ROS updates diff --git a/prometheus/prometheus.yml b/prometheus/prometheus.yml index 7e1b580..83a58c7 100644 --- a/prometheus/prometheus.yml +++ b/prometheus/prometheus.yml @@ -29,9 +29,8 @@ scrape_configs: static_configs: - targets: - - 'mikrotik_exporter:9436' - 'mktxp:49090' - + - job_name: 'blackbox' scrape_interval: 1s metrics_path: /probe