From b9d760343bc3678829344d0f14a8e7e931e3251b Mon Sep 17 00:00:00 2001 From: "StarsL.cn" Date: Thu, 25 Aug 2022 10:23:32 +0800 Subject: [PATCH] Update gen_config.py --- flask-consul/units/gen_config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flask-consul/units/gen_config.py b/flask-consul/units/gen_config.py index f9aef97..5d2778b 100644 --- a/flask-consul/units/gen_config.py +++ b/flask-consul/units/gen_config.py @@ -62,7 +62,7 @@ groups: description: "{{ $labels.name }}:内存使用率{{ $value | humanize }}%\\n> {{ $labels.group }}-{{ $labels.instance }}" - alert: CPU使用率 - expr: 100 - (avg by(instance,name,group,account) (irate(node_cpu_seconds_total[5m])) * 100) > 92 + expr: 100 - (avg by(instance,name,group,account) (irate(node_cpu_seconds_total{mode="idle"}[5m])) * 100) > 92 for: 5m labels: alertype: system