From 59a94acba455e986066af0ba24a1deabd5cd03ca Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Fri, 31 Dec 2021 01:58:23 +0100 Subject: prometheus/node: fix error reporiting in systemd units of textfile collectors --- .../exporter/node/templates/textfile-collector-scripts/apt.service.j2 | 2 +- .../node/templates/textfile-collector-scripts/chrony.service.j2 | 2 +- .../templates/textfile-collector-scripts/deleted-libraries.service.j2 | 2 +- .../node/templates/textfile-collector-scripts/sensors.service.j2 | 2 +- .../node/templates/textfile-collector-scripts/smartmon.service.j2 | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) (limited to 'roles/monitoring/prometheus/exporter/node') 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 -- cgit v1.2.3