Skip to content

Commit 48af211

Browse files
use internal network to connect grafana with db monitor in composes
1 parent be6e698 commit 48af211

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

aggregation_mode/docker-compose.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ x-node: &node
1414
PG_AUTOCTL_MONITOR: "postgresql://autoctl_node@monitor/pg_auto_failover"
1515
expose:
1616
- 5432
17+
networks:
18+
- aligned-network
1719

1820
volumes:
1921
postgres_data:
@@ -60,6 +62,8 @@ services:
6062
- "5436:5432"
6163
command: |
6264
pg_autoctl create monitor --auth trust --run
65+
networks:
66+
- aligned-network
6367

6468
node1:
6569
<<: *node

metrics-docker-compose.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ services:
2828
- POSTGRES_USER=postgres
2929
- POSTGRES_PASSWORD=postgres
3030
- PROMETHEUS_URL=http://prometheus:9090
31-
- MONITOR_DB_HOST=host.docker.internal
32-
- MONITOR_DB_PORT=5436
31+
- MONITOR_DB_HOST=monitor
32+
- MONITOR_DB_PORT=5432
3333
- MONITOR_DB_DB=pg_auto_failover
3434
- MONITOR_DB_USER=autoctl_node
3535
extra_hosts:

0 commit comments

Comments
 (0)