From a30bbb62cc9a0d2977387460060f21682bf85883 Mon Sep 17 00:00:00 2001 From: BhasherBEL Date: Thu, 25 May 2023 14:33:42 +0200 Subject: [PATCH] Mikrotik monitoring + planka kanban --- bxl-rpi/apps/docker-compose.planka.yaml | 31 ++++++++++++++ bxl-rpi/config/dashy/config.yml | 10 ++--- bxl-rpi/config/monitoring/mikrotik.yaml | 42 +++++++++++++++++++ bxl-rpi/config/monitoring/prometheus.yaml | 5 +++ bxl-rpi/system/docker-compose.monitoring.yaml | 21 ++++++++++ 5 files changed, 104 insertions(+), 5 deletions(-) create mode 100644 bxl-rpi/apps/docker-compose.planka.yaml create mode 100644 bxl-rpi/config/monitoring/mikrotik.yaml diff --git a/bxl-rpi/apps/docker-compose.planka.yaml b/bxl-rpi/apps/docker-compose.planka.yaml new file mode 100644 index 0000000..9d84b8e --- /dev/null +++ b/bxl-rpi/apps/docker-compose.planka.yaml @@ -0,0 +1,31 @@ +services: + planka: + container_name: planka + image: ghcr.io/plankanban/planka:latest + restart: unless-stopped + volumes: + - $DATA/planka/user-avatars:/app/public/user-avatars:rw + - $DATA/planka/project-background-images:/app/public/project-background-images:rw + - $DATA/planka/attachments:/app/private/attachments:rw + environment: + - BASE_URL=https://planka.bhasher.com + - TRUST_PROXY=1 + - DATABASE_URL=${PLANKA_DATABASE_URL} + - SECRET_KEY=${PLANKA_SECRET_KEY} + networks: + labels: + - "traefik.enable=true" + - "traefik.http.routers.planka.rule=Host(`planka.bhasher.com`)" + - "traefik.http.services.planka.loadbalancer.server.port=1337" + - "traefik.http.routers.planka.tls=true" + - "traefik.http.routers.planka.tls.certresolver=http" + - "traefik.http.routers.planka.entrypoints=internalsecure" + networks: + - storage + - external + +networks: + storage: + external: true + external: + external: true diff --git a/bxl-rpi/config/dashy/config.yml b/bxl-rpi/config/dashy/config.yml index b45d7ce..6745025 100644 --- a/bxl-rpi/config/dashy/config.yml +++ b/bxl-rpi/config/dashy/config.yml @@ -84,11 +84,11 @@ sections: url: https://transmission.bhasher.com statusCheckUrl: http://transmission:9091 id: 4_1631_transmission - - title: Jackett - icon: hl-jackett - url: https://jacket.bhasher.com - statusCheckUrl: http://jackett:9117 - id: 5_1631_jackett + - title: Prowlarr + icon: hl-prowlarr + url: https://prowlarr.bhasher.com + statusCheckUrl: http://prowlarr:9696 + id: 5_1631_prowlarr - title: Grafana icon: hl-grafana url: https://grafana.bhasher.com diff --git a/bxl-rpi/config/monitoring/mikrotik.yaml b/bxl-rpi/config/monitoring/mikrotik.yaml new file mode 100644 index 0000000..faa77fc --- /dev/null +++ b/bxl-rpi/config/monitoring/mikrotik.yaml @@ -0,0 +1,42 @@ +devices: + - name: router + address: 192.168.1.1 + username: prometheus + password: ck1Jm25pcgW4IbnrHa3VCkxVR5H19fbO + features: + bgp: true # + dhcp: true + dhcpv6: true # + dhcpl: true + dhcp_leases: true + routes: true # + pools: true # + optics: true # + wlansta: true + wlanif: true + ipsec: true # + ipsec-peers: true # + monitor: true + health: true + conntrack: true + pool: true # + resource: true + +features: + bgp: true # + dhcp: true + dhcpv6: true # + dhcpl: true + dhcp_leases: true + routes: true # + pools: true # + optics: true # + wlansta: true + wlanif: true + ipsec: true # + ipsec-peers: true # + monitor: true + health: true + conntrack: true + pool: true # + resource: true diff --git a/bxl-rpi/config/monitoring/prometheus.yaml b/bxl-rpi/config/monitoring/prometheus.yaml index 9e14f82..5d97955 100644 --- a/bxl-rpi/config/monitoring/prometheus.yaml +++ b/bxl-rpi/config/monitoring/prometheus.yaml @@ -33,3 +33,8 @@ scrape_configs: - job_name: 'authelia' static_configs: - targets: ['authelia:9959'] + + - job_name: 'mikrotik' + static_configs: + - targets: ['mikrotik:9436'] + diff --git a/bxl-rpi/system/docker-compose.monitoring.yaml b/bxl-rpi/system/docker-compose.monitoring.yaml index 424aa3a..7fa6951 100644 --- a/bxl-rpi/system/docker-compose.monitoring.yaml +++ b/bxl-rpi/system/docker-compose.monitoring.yaml @@ -17,6 +17,7 @@ services: volumes: - $CONFIG/monitoring/prometheus.yaml:/etc/prometheus/prometheus.yml:ro - $DATA/monitoring/prometheus:/prometheus + - /etc/localtime:/etc/localtime:ro networks: - monitoring - external @@ -61,6 +62,7 @@ services: - GF_AUTH_GENERIC_OAUTH_ALLOWED_GROUPS=admin volumes: - $DATA/monitoring/grafana:/var/lib/grafana + - /etc/localtime:/etc/localtime:ro networks: - external - monitoring @@ -73,6 +75,7 @@ services: - /var/run:/var/run:rw - /sys:/sys:ro - /var/lib/docker/:/var/lib/docker:ro + - /etc/localtime:/etc/localtime:ro restart: always command: - "--housekeeping_interval=60s" @@ -96,6 +99,7 @@ services: - /sys:/host/sys:ro - /:/rootfs:ro - /:/host:ro,rslave + - /etc/localtime:/etc/localtime:ro command: - '--path.rootfs=/host' - '--path.procfs=/host/proc' @@ -106,6 +110,23 @@ services: networks: - monitoring + mikrotik: + container_name: mikrotik + image: ogi4i/mikrotik-exporter:latest + #image: nshttpd/mikrotik-exporter-linux-arm64:1.0.12-DEVEL + command: + - -config-file + - /config.yaml + restart: unless-stopped + environment: + - CONFIG_FILE=/config.yaml + volumes: + - $CONFIG/monitoring/mikrotik.yaml:/config.yaml:ro + - /etc/localtime:/etc/localtime:ro + networks: + - monitoring + + networks: monitoring: name: monitoring