Add influxdb to monitor traefik

This commit is contained in:
Jake Howard 2020-08-30 15:58:03 +01:00
parent 17f0e22962
commit ec751ffa1a
Signed by: jake
GPG key ID: 57AFB45680EDD477
4 changed files with 25 additions and 0 deletions

View file

@ -0,0 +1 @@
traefik_influx_db_dir: ./influxdb

View file

@ -1 +1,3 @@
expose_ssh: true expose_ssh: true
traefik_influx_db_dir: /mnt/tank/dbs/influx/traefik

View file

@ -8,3 +8,19 @@ services:
- /var/run/docker.sock:/var/run/docker.sock:ro - /var/run/docker.sock:/var/run/docker.sock:ro
- ./traefik:/etc/traefik - ./traefik:/etc/traefik
restart: unless-stopped restart: unless-stopped
depends_on:
- influxdb
influxdb:
image: influxdb:1.8-alpine
restart: unless-stopped
volumes:
- "{{ traefik_influx_db_dir }}:/var/lib/influxdb"
ports:
- "{{ wireguard.clients[ansible_fqdn].ip }}:38089:8089/udp"
- "{{ wireguard.clients[ansible_fqdn].ip }}:38086:8086"
environment:
- INFLUXDB_DB=traefik
- INFLUXDB_HTTP_AUTH_ENABLED=
- INFLUXDB_UDP_ENABLED=true
- INFLUXDB_UDP_DATABASE=traefik

View file

@ -41,3 +41,9 @@ certificatesResolvers:
serversTransport: serversTransport:
insecureSkipVerify: true insecureSkipVerify: true
metrics:
influxDB:
address: "{{ wireguard.clients[ansible_fqdn].ip }}:38089"
database: traefik
pushInterval: 30s