Added defaults for data_source_name

This commit is contained in:
Eric Renfro 2019-05-13 15:16:12 -04:00
parent f3f7f504b0
commit 4ac8c4f4a7
Signed by: psi-jack
GPG key ID: 14977F3A50D9A5BF
3 changed files with 6 additions and 0 deletions

View file

@ -63,5 +63,7 @@ prometheus:
source_hash: sha256=c34d61bb4deba8efae06fd3c9979b96dae3f3c757698ce3384c80fff586c667b source_hash: sha256=c34d61bb4deba8efae06fd3c9979b96dae3f3c757698ce3384c80fff586c667b
args: args:
url: https://github.com/wrouesnel/postgres_exporter url: https://github.com/wrouesnel/postgres_exporter
user: postgres
group: postgres
service_args: [] service_args: []

View file

@ -27,6 +27,8 @@ postgres_exporter_defaults:
- name: /etc/default/postgres_exporter - name: /etc/default/postgres_exporter
- source: salt://prometheus/files/default-postgres_exporter.jinja - source: salt://prometheus/files/default-postgres_exporter.jinja
- template: jinja - template: jinja
- defaults:
data_source_name: {{ prometheus.exporter.postgres.args.get('data_source_name', "") }}
postgres_exporter_service_unit: postgres_exporter_service_unit:
file.managed: file.managed:

View file

@ -1,6 +1,8 @@
# Set the command-line arguments to pass to the postgres_exporter service. # Set the command-line arguments to pass to the postgres_exporter service.
ARGS="" ARGS=""
DATA_SOURCE_NAME="{{ data_source_name }}"
# postgres exporter supports the following options: # postgres exporter supports the following options:
# -web.listen-address # -web.listen-address
# -web.telemetry-path # -web.telemetry-path