From 47a854653e0bc1a8326b9fd6f69e2c6ad3d3fe7f Mon Sep 17 00:00:00 2001 From: Kazuhiro MUSASHI Date: Sat, 24 Oct 2020 13:07:04 +0900 Subject: [PATCH] Change monitoring condition for Context Switch. --- .../files/etc/prometheus.d/alerts/node_exporter.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cookbooks/prometheus/files/etc/prometheus.d/alerts/node_exporter.yml b/cookbooks/prometheus/files/etc/prometheus.d/alerts/node_exporter.yml index a6477a6..587a999 100644 --- a/cookbooks/prometheus/files/etc/prometheus.d/alerts/node_exporter.yml +++ b/cookbooks/prometheus/files/etc/prometheus.d/alerts/node_exporter.yml @@ -113,13 +113,13 @@ groups: # Alert threshold depends on nature of application. # Please read: https://github.com/samber/awesome-prometheus-alerts/issues/58 - alert: HostContextSwitching - expr: (rate(node_context_switches_total[5m])) / (count without(cpu, mode) (node_cpu_seconds_total{mode="idle"})) > 4000 + expr: (rate(node_context_switches_total[5m])) / (count without(cpu, mode) (node_cpu_seconds_total{mode="idle"})) > 4500 for: 5m labels: severity: warning annotations: summary: "Host context switching (instance {{ $labels.instance }})" - description: "Context switching is growing on node (> 4000 / s)\n VALUE = {{ $value }}\n LABELS: {{ $labels }}" + description: "Context switching is growing on node (> 4500 / s)\n VALUE = {{ $value }}\n LABELS: {{ $labels }}" - alert: HostSwapIsFillingUp expr: (1 - (node_memory_SwapFree_bytes / node_memory_SwapTotal_bytes)) * 100 > 80