diff --git a/homelab/server/config/monitoring/docker-compose.yml b/homelab/server/config/monitoring/docker-compose.yml index c515f787..dc880ad4 100644 --- a/homelab/server/config/monitoring/docker-compose.yml +++ b/homelab/server/config/monitoring/docker-compose.yml @@ -16,6 +16,8 @@ services: - monitoring - web user: "0" + env_file: + - monitoring.env volumes: - ${DOCKER_DATA}/grafana:/var/lib/grafana - ./custom.ini:/etc/grafana/grafana.ini @@ -41,6 +43,8 @@ services: - web ports: - 9090:9090 + env_file: + - monitoring.env volumes: - ./prometheus.yml:/etc/prometheus/prometheus.yml - ${DOCKER_DATA}/prometheus:/prometheus @@ -69,6 +73,8 @@ services: - web ports: - "3100:3100" + env_file: + - monitoring.env volumes: - ${DOCKER_DATA}/loki-logs:/loki-logs - ./loki-config.yml:/etc/loki/loki-config.yml # not sure if this works. If not, just edit the config within the data volume @@ -108,11 +114,8 @@ services: restart: "no" networks: - monitoring - environment: - - PIHOLE_HOSTNAME=pihole - - PIHOLE_PROTOCOL=http - - INTERVAL=15s - - PORT=9617 # port on which the metrics should be available to be scraped by prometheus + env_file: + - exporter-pihole.env labels: - traefik.enable=false @@ -132,8 +135,8 @@ services: networks: - monitoring - mc-router - environment: - EXPORT_SERVERS: e6-056,vanilla,bmcp,e6,e6-dev,fan,e8 + env_file: + - exporter-minecraft.env labels: - traefik.enable=false @@ -172,9 +175,9 @@ services: restart: "no" networks: - monitoring - environment: - - SABNZBD_BASEURLS=https://sabnzbd.jafner.net:443 - - SABNZBD_APIKEYS=***REMOVED*** + env_file: + - exporter-sabnzbd.env + - exporter-sabnzbd_secrets.env exporter-ping: image: czerwonk/ping_exporter @@ -215,9 +218,8 @@ services: exporter-qbittorrent: image: esanchezm/prometheus-qbittorrent-exporter container_name: monitoring_exporter-qbittorrent - environment: - - QBITTORRENT_HOST=http://qbittorrent - - QBITTORRENT_PORT=8080 + env_file: + - exporter-qbittorrent.env logging: driver: loki options: diff --git a/homelab/server/config/monitoring/exporter-minecraft.env b/homelab/server/config/monitoring/exporter-minecraft.env new file mode 100644 index 00000000..705dea9e --- /dev/null +++ b/homelab/server/config/monitoring/exporter-minecraft.env @@ -0,0 +1 @@ +EXPORT_SERVERS=e6-056,vanilla,bmcp,e6,e6-dev,fan,e8 \ No newline at end of file diff --git a/homelab/server/config/monitoring/exporter-pihole.env b/homelab/server/config/monitoring/exporter-pihole.env new file mode 100644 index 00000000..141e24ca --- /dev/null +++ b/homelab/server/config/monitoring/exporter-pihole.env @@ -0,0 +1,4 @@ +PIHOLE_HOSTNAME=pihole +PIHOLE_PROTOCOL=http +INTERVAL=15s +PORT=9617 # port on which the metrics should be available to be scraped by prometheus \ No newline at end of file diff --git a/homelab/server/config/monitoring/exporter-qbittorrent.env b/homelab/server/config/monitoring/exporter-qbittorrent.env new file mode 100644 index 00000000..1b15d27b --- /dev/null +++ b/homelab/server/config/monitoring/exporter-qbittorrent.env @@ -0,0 +1,2 @@ +QBITTORRENT_HOST=http://qbittorrent +QBITTORRENT_PORT=8080 \ No newline at end of file diff --git a/homelab/server/config/monitoring/exporter-sabnzbd.env b/homelab/server/config/monitoring/exporter-sabnzbd.env new file mode 100644 index 00000000..d6de2d60 --- /dev/null +++ b/homelab/server/config/monitoring/exporter-sabnzbd.env @@ -0,0 +1 @@ +SABNZBD_BASEURLS=https://sabnzbd.jafner.net:443 \ No newline at end of file diff --git a/homelab/server/config/monitoring/exporter-sabnzbd_secrets.env b/homelab/server/config/monitoring/exporter-sabnzbd_secrets.env new file mode 100644 index 00000000..07482049 --- /dev/null +++ b/homelab/server/config/monitoring/exporter-sabnzbd_secrets.env @@ -0,0 +1 @@ +SABNZBD_APIKEYS=***REMOVED*** \ No newline at end of file diff --git a/homelab/server/config/monitoring/.env b/homelab/server/config/monitoring/monitoring.env similarity index 79% rename from homelab/server/config/monitoring/.env rename to homelab/server/config/monitoring/monitoring.env index 32c75a00..049d22de 100644 --- a/homelab/server/config/monitoring/.env +++ b/homelab/server/config/monitoring/monitoring.env @@ -1 +1,2 @@ +# Volumes DOCKER_DATA=/home/joey/data/monitoring \ No newline at end of file diff --git a/homelab/server/config/monitoring/project.env b/homelab/server/config/monitoring/project.env deleted file mode 100644 index e69de29b..00000000