Skip to content

Commit 262e61b

Browse files
committed
Fix disconnect of postgres querry exporter
1 parent 038be52 commit 262e61b

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

services/monitoring/docker-compose.yml.j2

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ services:
301301
- prometheus-port=9400
302302

303303
pgsql-query-exporter:
304-
image: ghcr.io/albertodonato/query-exporter:sha-a1d908e
304+
image: ghcr.io/albertodonato/query-exporter:sha-685d8ed
305305
volumes: []
306306
dns:
307307
- 8.8.8.8
@@ -311,6 +311,9 @@ services:
311311
networks:
312312
- monitored
313313
- public
314+
environment:
315+
- POSTGRES_HOST=${POSTGRES_HOST}
316+
- POSTGRES_PORT=${POSTGRES_PORT}
314317
extra_hosts: []
315318
deploy:
316319
labels:
@@ -326,6 +329,13 @@ services:
326329
reservations:
327330
memory: 64M
328331
cpus: "0.1"
332+
healthcheck:
333+
test: ["CMD", "bash", "-c", "timeout 3 bash -c '</dev/tcp/$POSTGRES_HOST/$POSTGRES_PORT'"]
334+
timeout: 5s
335+
retries: 3
336+
interval: 10s
337+
start_period: 40s
338+
329339
postgres-exporter:
330340
image: bitnami/postgres-exporter:0.17.1
331341
networks:

0 commit comments

Comments
 (0)