From 383e730fcc3fd41ebf22eaa83fded47e2e17ea3a Mon Sep 17 00:00:00 2001 From: Tarjei Huse Date: Sun, 8 May 2016 12:21:41 +0200 Subject: [PATCH 1/3] Systemd does not see all shutdowns as failures See here for a discussion on some of the issues: https://github.com/hashicorp/consul/issues/1688#issuecomment-192064600 I got this problem running Centos 7 with Prom 0.18.0. --- templates/prometheus.systemd.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/prometheus.systemd.erb b/templates/prometheus.systemd.erb index b64cfa9b8..3fe0d2dba 100644 --- a/templates/prometheus.systemd.erb +++ b/templates/prometheus.systemd.erb @@ -11,7 +11,7 @@ ExecStart=<%= scope.lookupvar('prometheus::bin_dir') %>/prometheus \ -storage.local.path=<%= scope.lookupvar('prometheus::localstorage')%> <%= scope.lookupvar('prometheus::extra_options') %> ExecReload=/bin/kill -HUP $MAINPID KillMode=process -Restart=on-failure +Restart=always RestartSec=42s [Install] From 4ea145db41b542d85fe27a3627ba880b0bd93c48 Mon Sep 17 00:00:00 2001 From: Tarjei Huse Date: Sun, 8 May 2016 12:30:10 +0200 Subject: [PATCH 2/3] Systemd does not see all shutdowns as failures --- templates/alert_manager.systemd.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/alert_manager.systemd.erb b/templates/alert_manager.systemd.erb index aa79e5582..dfe916f2e 100644 --- a/templates/alert_manager.systemd.erb +++ b/templates/alert_manager.systemd.erb @@ -11,7 +11,7 @@ ExecStart=<%= scope.lookupvar('prometheus::alert_manager::bin_dir') %>/alert_man -storage.path=<%= scope.lookupvar('prometheus::alert_manager::storage_path') %> <%= scope.lookupvar('prometheus::alert_manager::extra_options') %> ExecReload=/bin/kill -HUP $MAINPID KillMode=process -Restart=on-failure +Restart=always RestartSec=42s [Install] From b5b9b1ca6aa5f7ab3693f6944fa60ae7cc76dfa4 Mon Sep 17 00:00:00 2001 From: Tarjei Huse Date: Sun, 8 May 2016 12:30:31 +0200 Subject: [PATCH 3/3] Systemd does not see all shutdowns as failures --- templates/node_exporter.systemd.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/node_exporter.systemd.erb b/templates/node_exporter.systemd.erb index ade5d9c8c..47970e7dd 100644 --- a/templates/node_exporter.systemd.erb +++ b/templates/node_exporter.systemd.erb @@ -10,7 +10,7 @@ ExecStart=<%= scope.lookupvar('prometheus::node_exporter::bin_dir') %>/node_expo -collectors.enabled=<%= scope.lookupvar('prometheus::node_exporter::collectors').join(',') %> <%= scope.lookupvar('prometheus::node_exporter::extra_options') %> ExecReload=/bin/kill -HUP $MAINPID KillMode=process -Restart=on-failure +Restart=always RestartSec=42s [Install]