diff options
author | Georg Pfuetzenreuter | 2023-01-15 09:45:04 +0100 |
---|---|---|
committer | Georg Pfuetzenreuter | 2023-01-15 09:45:04 +0100 |
commit | 2b40942a442a0f15b2d75289d4977a114cd81e72 (patch) | |
tree | f82a2d89b523fd9f323297f4b67384b9a722aa77 /salt/profile/node_exporter | |
parent | f1a4b0514c148d9b5477f5c2b11938445e4438b1 (diff) | |
download | salt-2b40942a442a0f15b2d75289d4977a114cd81e72.tar.gz salt-2b40942a442a0f15b2d75289d4977a114cd81e72.tar.bz2 salt-2b40942a442a0f15b2d75289d4977a114cd81e72.zip |
Import profiles/roles from salt-devel
- + renaming baseline to common
Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
Diffstat (limited to 'salt/profile/node_exporter')
-rw-r--r-- | salt/profile/node_exporter/init.sls | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/salt/profile/node_exporter/init.sls b/salt/profile/node_exporter/init.sls new file mode 100644 index 0000000..1e46b3d --- /dev/null +++ b/salt/profile/node_exporter/init.sls @@ -0,0 +1,36 @@ +{%- set header = salt['pillar.get']('managed_header_pound') -%} +{%- set sysconfig = '/etc/sysconfig/prometheus-node_exporter' -%} + +node_exporter_packages: + pkg.installed: + - pkgs: + - golang-github-prometheus-node_exporter + +node_exporter_sysconfig_header: + file.prepend: + - name: {{ sysconfig }} + - text: '{{ header }}' + - require: + - pkg: node_exporter_packages + +node_exporter_sysconfig: + file.replace: + - name: {{ sysconfig }} + - pattern: | + ^ARGS=.*$ + - repl: | + ARGS="--web.listen-address=:9200 --collector.filesystem.fs-types-exclude='^(fuse.s3fs|fuse.cryfs|tmpfscgroup2?|debugfs|devpts|devtmpfs|fusectl|overlay|proc|procfs|pstore)\$' --no-collector.zfs --no-collector.thermal_zone --no-collector.powersupplyclass" + - require: + - pkg: node_exporter_packages + - file: node_exporter_sysconfig_header + +node_exporter_service: + service.running: + - name: prometheus-node_exporter.service + - enable: True + - full_restart: True + - require: + - pkg: node_exporter_packages + - file: node_exporter_sysconfig + - watch: + - file: node_exporter_sysconfig |