Browse Source

Added defaults for data_source_name

master
Eric Renfro 3 years ago
parent
commit
4ac8c4f4a7
Signed by: psi-jack GPG Key ID: 14977F3A50D9A5BF
  1. 2
      prometheus/defaults.yaml
  2. 2
      prometheus/exporter/postgres.sls
  3. 2
      prometheus/files/default-postgres_exporter.jinja

2
prometheus/defaults.yaml

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

2
prometheus/exporter/postgres.sls

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

2
prometheus/files/default-postgres_exporter.jinja

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

Loading…
Cancel
Save