Use of environment variables in sources yaml file #1230
-
|
Hello pgwatch community, If I understand well this line, it seems it is possible to use environment variables in the yaml file containing pgwatch sources. I try to use an environment variable for my connection string but it seems pgwatch is not able to parse it. / # cat /pgwatch/sources.yaml
- name: fakename
conn_str: $PG_CONNEXION_STRING
kind: postgres-continuous-discovery
preset_metrics: exhaustive
custom_metrics:
preset_metrics_standby:
custom_metrics_standby:
include_pattern:
exclude_pattern:
is_enabled: true
group: default I got the error below
You could wonder why I do that. Do I do something wrong or it is just not possible ? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
|
well, it's the idea behind it, yes. Just to be on a safe side, the |
Beta Was this translation helpful? Give feedback.
-
|
Fair question.
I still get on version |
Beta Was this translation helpful? Give feedback.
-
|
@pashagolub That's indeed a bug the pgwatch/internal/sources/yaml.go Lines 145 to 165 in 430bd14 |
Beta Was this translation helpful? Give feedback.
-
|
@poilade-de-coulemelle thanks for catching this, #1232 will fix it and will be available under the v5 release (coming in a few days) |
Beta Was this translation helpful? Give feedback.

@poilade-de-coulemelle thanks for catching this, #1232 will fix it and will be available under the v5 release (coming in a few days)