fix: revert to use of macro.jinja for arg handling

The previous additions to environ.sh.jinja were fixing something that wasnt broken.
This commit is contained in:
BlueWolf 2021-06-24 17:25:35 +01:00
parent eea5b407fa
commit 696bee0522
5 changed files with 25 additions and 20 deletions

View File

@ -9,6 +9,7 @@ driver:
run_command: /lib/systemd/systemd
forward:
- 9090:9090
- 9110:9110
platforms:
## SALT `tiamat`

View File

@ -33,7 +33,7 @@ prometheus-config-install-{{ name }}-environ_file:
#- contents: |
# command_args="{{ concat_args(args) }}"
- context:
args: {{ args }}
args: {{ concat_args(args) }}
- watch_in:
- service: prometheus-service-running-{{ name }}
- require:

View File

@ -44,7 +44,7 @@ prometheus:
version: v0.21.0
config_file: /etc/prometheus/alertmanager.yml
config: {}
environ_file: /etc/default/prometheus-alertmanager.sh
environ_file: /etc/default/prometheus-alertmanager
environ: {}
service:
args:
@ -131,7 +131,7 @@ prometheus:
- tcp/9207
node_exporter:
version: v1.0.1
environ_file: /etc/default/prometheus-node-exporter.sh
environ_file: /etc/default/prometheus-node-exporter
environ: {}
config_file: /etc/prometheus/node_exporter.yml
config: {}
@ -170,7 +170,7 @@ prometheus:
- tcp/9090
pushgateway:
version: v1.3.0
environ_file: /etc/default/prometheus-pushgateway.sh
environ_file: /etc/default/prometheus-pushgateway
environ: {}
config_file: /etc/prometheus/pushgateway.yml
config: {}

View File

@ -2,8 +2,8 @@
# File managed by Salt at <{{ source }}>.
# Your changes may be overwritten.
########################################################################
# Set the command-line arguments to pass to the server.
ARGS="{%- for arg, value in args.items() %}--{{ arg }}={{ value }}{{ " " if not loop.last else "" }}{% endfor %}"
# Set the command-line arguments to pass to the server.%}"
ARGS="{{ args }}"

View File

@ -20,20 +20,20 @@ prometheus:
# - mysqld_exporter
# - memcached_exporter # not in upstream repo, only archive
exporters:
node_exporter:
textfile_collectors_dependencies: []
textfile_collectors:
ipmitool:
enable: false
remove: false
pkg: ipmitool
smartmon:
enable: false
remove: false
pkg: smartmontools
bash_pkg: bash
smartctl: /usr/sbin/smartctl
# exporters:
# node_exporter:
# textfile_collectors_dependencies: []
# textfile_collectors:
# ipmitool:
# enable: false
# remove: false
# pkg: ipmitool
# smartmon:
# enable: false
# remove: false
# pkg: smartmontools
# bash_pkg: bash
# smartctl: /usr/sbin/smartctl
pkg:
use_upstream_repo: false
# Changed to use non archive install as default (the archive includes a bespoke
@ -87,6 +87,10 @@ prometheus:
- to: 'team-X+alerts@example.org'
node_exporter:
environ:
args:
collector.systemd: true
web.listen-address: ":9110"
service:
args:
collector.systemd: null