summaryrefslogtreecommitdiff
path: root/roles/monitoring/prometheus
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2021-12-31 01:58:23 +0100
committerChristian Pointner <equinox@spreadspace.org>2021-12-31 01:58:23 +0100
commit59a94acba455e986066af0ba24a1deabd5cd03ca (patch)
treebe00804cc04278aa1108f9f54490755a8132259a /roles/monitoring/prometheus
parentprometheus/node: add textfile collector sensors (WIP cont'd) (diff)
prometheus/node: fix error reporiting in systemd units of textfile collectors
Diffstat (limited to 'roles/monitoring/prometheus')
-rw-r--r--roles/monitoring/prometheus/exporter/node/templates/textfile-collector-scripts/apt.service.j22
-rw-r--r--roles/monitoring/prometheus/exporter/node/templates/textfile-collector-scripts/chrony.service.j22
-rw-r--r--roles/monitoring/prometheus/exporter/node/templates/textfile-collector-scripts/deleted-libraries.service.j22
-rw-r--r--roles/monitoring/prometheus/exporter/node/templates/textfile-collector-scripts/sensors.service.j22
-rw-r--r--roles/monitoring/prometheus/exporter/node/templates/textfile-collector-scripts/smartmon.service.j22
5 files changed, 5 insertions, 5 deletions
diff --git a/roles/monitoring/prometheus/exporter/node/templates/textfile-collector-scripts/apt.service.j2 b/roles/monitoring/prometheus/exporter/node/templates/textfile-collector-scripts/apt.service.j2
index e624dfc3..c60439c4 100644
--- a/roles/monitoring/prometheus/exporter/node/templates/textfile-collector-scripts/apt.service.j2
+++ b/roles/monitoring/prometheus/exporter/node/templates/textfile-collector-scripts/apt.service.j2
@@ -4,7 +4,7 @@ Description=Promethues node exporter textfile collector apt
[Service]
Type=oneshot
Environment=TMPDIR=/var/lib/prometheus-node-exporter/textfile-collector
-ExecStart=bash -c "/usr/local/share/prometheus-node-exporter/apt | sponge /var/lib/prometheus-node-exporter/textfile-collector/apt.prom"
+ExecStart=bash -o pipefail -c "/usr/local/share/prometheus-node-exporter/apt | sponge /var/lib/prometheus-node-exporter/textfile-collector/apt.prom"
TimeoutStartSec=30s
# systemd hardening-options
diff --git a/roles/monitoring/prometheus/exporter/node/templates/textfile-collector-scripts/chrony.service.j2 b/roles/monitoring/prometheus/exporter/node/templates/textfile-collector-scripts/chrony.service.j2
index bd96daf4..49b15185 100644
--- a/roles/monitoring/prometheus/exporter/node/templates/textfile-collector-scripts/chrony.service.j2
+++ b/roles/monitoring/prometheus/exporter/node/templates/textfile-collector-scripts/chrony.service.j2
@@ -4,7 +4,7 @@ Description=Promethues node exporter textfile collector chrony
[Service]
Type=oneshot
Environment=TMPDIR=/var/lib/prometheus-node-exporter/textfile-collector
-ExecStart=bash -c "/usr/local/share/prometheus-node-exporter/chrony | sponge /var/lib/prometheus-node-exporter/textfile-collector/chrony.prom"
+ExecStart=bash -o pipefail -c "/usr/local/share/prometheus-node-exporter/chrony | sponge /var/lib/prometheus-node-exporter/textfile-collector/chrony.prom"
TimeoutStartSec=30s
# systemd hardening-options
diff --git a/roles/monitoring/prometheus/exporter/node/templates/textfile-collector-scripts/deleted-libraries.service.j2 b/roles/monitoring/prometheus/exporter/node/templates/textfile-collector-scripts/deleted-libraries.service.j2
index c37936ac..a37ace87 100644
--- a/roles/monitoring/prometheus/exporter/node/templates/textfile-collector-scripts/deleted-libraries.service.j2
+++ b/roles/monitoring/prometheus/exporter/node/templates/textfile-collector-scripts/deleted-libraries.service.j2
@@ -4,7 +4,7 @@ Description=Promethues node exporter textfile collector deleted-libraries
[Service]
Type=oneshot
Environment=TMPDIR=/var/lib/prometheus-node-exporter/textfile-collector
-ExecStart=bash -c "/usr/local/share/prometheus-node-exporter/deleted-libraries | sponge /var/lib/prometheus-node-exporter/textfile-collector/deleted-libraries.prom"
+ExecStart=bash -o pipefail -c "/usr/local/share/prometheus-node-exporter/deleted-libraries | sponge /var/lib/prometheus-node-exporter/textfile-collector/deleted-libraries.prom"
TimeoutStartSec=30s
# systemd hardening-options
diff --git a/roles/monitoring/prometheus/exporter/node/templates/textfile-collector-scripts/sensors.service.j2 b/roles/monitoring/prometheus/exporter/node/templates/textfile-collector-scripts/sensors.service.j2
index a9f2a8fb..3f713eb2 100644
--- a/roles/monitoring/prometheus/exporter/node/templates/textfile-collector-scripts/sensors.service.j2
+++ b/roles/monitoring/prometheus/exporter/node/templates/textfile-collector-scripts/sensors.service.j2
@@ -5,7 +5,7 @@ Description=Promethues node exporter textfile collector sensors
Type=oneshot
Environment=TMPDIR=/var/lib/prometheus-node-exporter/textfile-collector
Environment=LC_NUMERIC=C
-ExecStart=bash -c "/usr/local/share/prometheus-node-exporter/sensors | sponge /var/lib/prometheus-node-exporter/textfile-collector/sensors.prom"
+ExecStart=bash -o pipefail -c "/usr/local/share/prometheus-node-exporter/sensors | sponge /var/lib/prometheus-node-exporter/textfile-collector/sensors.prom"
TimeoutStartSec=30s
# systemd hardening-options
diff --git a/roles/monitoring/prometheus/exporter/node/templates/textfile-collector-scripts/smartmon.service.j2 b/roles/monitoring/prometheus/exporter/node/templates/textfile-collector-scripts/smartmon.service.j2
index 58792417..a630088c 100644
--- a/roles/monitoring/prometheus/exporter/node/templates/textfile-collector-scripts/smartmon.service.j2
+++ b/roles/monitoring/prometheus/exporter/node/templates/textfile-collector-scripts/smartmon.service.j2
@@ -5,7 +5,7 @@ Description=Promethues node exporter textfile collector smartmon
Type=oneshot
Environment=TMPDIR=/var/lib/prometheus-node-exporter/textfile-collector
Environment=LC_NUMERIC=C
-ExecStart=bash -c "/usr/local/share/prometheus-node-exporter/smartmon | sponge /var/lib/prometheus-node-exporter/textfile-collector/smartmon.prom"
+ExecStart=bash -o pipefail -c "/usr/local/share/prometheus-node-exporter/smartmon | sponge /var/lib/prometheus-node-exporter/textfile-collector/smartmon.prom"
TimeoutStartSec=30s
# systemd hardening-options