From fbdd033d4b18126870cba977a4785032537bb507 Mon Sep 17 00:00:00 2001 From: Kazuhiro MUSASHI Date: Sat, 13 May 2023 15:11:55 +0900 Subject: [PATCH] Add `prometheus` monitoring config for `vault`. --- .../files/etc/prometheus.d/alerts/services.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cookbooks/prometheus/files/etc/prometheus.d/alerts/services.yml b/cookbooks/prometheus/files/etc/prometheus.d/alerts/services.yml index 343ee73..12bca52 100644 --- a/cookbooks/prometheus/files/etc/prometheus.d/alerts/services.yml +++ b/cookbooks/prometheus/files/etc/prometheus.d/alerts/services.yml @@ -90,3 +90,12 @@ groups: annotations: summary: "vector-prometheus is not running: {{ $labels.instance }}." description: "vector-prometheus is not running: {{ $labels.instance }}." + + - alert: vault + expr: node_systemd_unit_state{name="vault.service", state="active"} != 1 + for: 5m + labels: + severity: error + annotations: + summary: "vault is not running: {{ $labels.instance }}." + description: "vault is not running: {{ $labels.instance }}."