Browse Source

set hostname in PROM_URL as variable

toastie89 2 months ago
parent
commit
ba84dbd11c
2 changed files with 3 additions and 2 deletions
  1. 2 1
      .env.template
  2. 1 1
      docker-compose.yml

+ 2 - 1
.env.template

@@ -12,7 +12,8 @@ TZ=Europe/Berlin
 
 # Prometheus URL where to sent metric to,
 # no metrics will be sent if empty
-PROM_URL=http://192.168.10.10:9090/push/metrics/job/borg/host/examplehost
+ä# hostname will be appended to the URL in docker-compose.yml
+PROM_URL=http://pushgateway:9091/push/metrics/job/borg/host/
 
 # Hostname used in the archive name 
 BORG_HOSTNAME=examplehost

+ 1 - 1
docker-compose.yml

@@ -18,7 +18,7 @@ services:
       - ./scripts:/opt/scripts                  # scripts run by cron and helper 
     environment:
       - TZ=${TZ}
-      - PROM_URL=${PROM_URL}
+      - PROM_URL=${PROM_URL}${BORG_HOSTNAME}
       - BORG_HOSTNAME=${BORG_HOSTNAME}
       - BORG_PASSPHRASE=${BORG_PASSPHRASE}
       - BORG_REPO=${BORG_REPO}