Skip to content

Commit f8a2c1a

Browse files
committed
fix postgresql exporter envvars to connect to a DB
This fix is to allow passwords with special chars without problem. In this case a '#' breaks the DATA_SOURCE_NAME structure
1 parent 7e800d4 commit f8a2c1a

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

templates/monitoring-docker-compose.yml.j2

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,7 @@ services:
3939
network_mode: host
4040
restart: always
4141
environment:
42-
DATA_SOURCE_NAME: postgresql://{{ monitoring_postgres_exporter_pg_user }}:{{ monitoring_postgres_exporter_pg_password | replace('$','$$')}}@localhost:{{ monitoring_postgres_exporter_pg_port }}/postgres?sslmode=disable
42+
DATA_SOURCE_URI: localhost:{{ monitoring_postgres_exporter_pg_port }}/postgres?sslmode=disable
43+
DATA_SOURCE_USER: {{ monitoring_postgres_exporter_pg_user }}
44+
DATA_SOURCE_PASSWORD: {{ monitoring_postgres_exporter_pg_password | replace('$','$$')}}
4345
{% endif %}

0 commit comments

Comments
 (0)