File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed
Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -17,9 +17,6 @@ services:
1717 command : -c 'shared_preload_libraries=pg_stat_statements'
1818 environment :
1919 POSTGRES_PASSWORD : pgpass-replica
20- PGUSER : postgres
21- PGPASSWORD : pgpass
22- PGHOST : postgres
2320 ports :
2421 - " 5433:5432"
2522 volumes :
@@ -43,16 +40,18 @@ services:
4340 environment :
4441 DATA_SOURCE_NAME : postgresql://postgres:pgpass@postgres:5432/postgres?sslmode=disable
4542 PG_EXPORTER_EXTEND_QUERY_PATH : /mnt/queries.yaml
43+ PG_EXPORTER_AUTO_DISCOVER_DATABASES : " true"
4644 ports :
4745 - " 9187:9187"
48- # volumes:
49- # - ./queries.yaml:/mnt/queries.yaml
46+ volumes :
47+ - ./queries.yaml:/mnt/queries.yaml
5048
5149 exporter-replica :
5250 image : prometheuscommunity/postgres-exporter:v0.10.1
5351 environment :
5452 DATA_SOURCE_NAME : postgresql://postgres:pgpass@replica:5432/postgres?sslmode=disable
5553 PG_EXPORTER_EXTEND_QUERY_PATH : /mnt/queries.yaml
54+ PG_EXPORTER_AUTO_DISCOVER_DATABASES : " true"
5655 ports :
5756 - " 9188:9187"
5857 volumes :
@@ -75,6 +74,7 @@ services:
7574 cpu_count : 1
7675 volumes :
7776 - ./prometheus.yml:/etc/prometheus/prometheus.yml:ro
77+ - ./rules.yml:/etc/prometheus/rules.yml:ro
7878 - prometheus:/prometheus
7979 ports :
8080 - " 9090:9090"
Original file line number Diff line number Diff line change 11#! /bin/bash
22
3+ export PGUSER=postgres
4+ export PGPASSWORD=pgpass
5+ export PGHOST=postgres
6+
37while [ $( pg_isready -q; echo $? ) != 0 ]; do
48 echo " Waiting for primary..."
59 sleep 1
You can’t perform that action at this time.
0 commit comments