From 38e0bbfa13d4e3bbf1b4937a9354a4f61444d453 Mon Sep 17 00:00:00 2001 From: rleungx Date: Thu, 23 Aug 2018 20:47:29 +0800 Subject: [PATCH] alert time fallback --- roles/prometheus/files/pd.rules.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/roles/prometheus/files/pd.rules.yml b/roles/prometheus/files/pd.rules.yml index 93cdc92e1..4d92d3dda 100644 --- a/roles/prometheus/files/pd.rules.yml +++ b/roles/prometheus/files/pd.rules.yml @@ -144,3 +144,15 @@ groups: description: 'cluster: ENV_LABELS_ENV, type: {{ $labels.type }}, instance: {{ $labels.instance }}, values: {{ $value }}' value: '{{ $value }}' summary: TiKV_space_used_more_than_80% + + - alert: PD_system_time_slow + expr: changes(pd_server_tso{type="system_time_slow"}[10m]) >= 1 + for: 1m + labels: + env: ENV_LABELS_ENV + level: warning + expr: changes(pd_server_tso{type="system_time_slow"}[10m]) >= 1 + annotations: + description: 'cluster: ENV_LABELS_ENV, instance: {{ $labels.instance }}, values: {{ $value }}' + value: '{{ $value }}' + summary: PD_system_time_slow