From 31a33c96ff4baf9285d1671a53da63021b660406 Mon Sep 17 00:00:00 2001 From: Ulric Qin Date: Thu, 5 May 2022 12:18:57 +0800 Subject: [PATCH] add alerts.json and dashboard.json for netresponse plugin --- inputs/netresponse/alerts.json | 30 ++++++++++++++++++++++++++++++ inputs/netresponse/dashboard.json | 19 +++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 inputs/netresponse/alerts.json create mode 100644 inputs/netresponse/dashboard.json diff --git a/inputs/netresponse/alerts.json b/inputs/netresponse/alerts.json new file mode 100644 index 0000000..611a1cd --- /dev/null +++ b/inputs/netresponse/alerts.json @@ -0,0 +1,30 @@ +[ + { + "name": "网络地址探活失败", + "note": "", + "severity": 2, + "disabled": 0, + "prom_for_duration": 60, + "prom_ql": "netresponse_result_code != 0", + "prom_eval_interval": 15, + "enable_stime": "00:00", + "enable_etime": "23:59", + "enable_days_of_week": [ + "1", + "2", + "3", + "4", + "5", + "6", + "0" + ], + "enable_in_bg": 0, + "notify_recovered": 1, + "notify_channels": [], + "notify_repeat_step": 60, + "recover_duration": 0, + "callbacks": [], + "runbook_url": "", + "append_tags": [] + } + ] \ No newline at end of file diff --git a/inputs/netresponse/dashboard.json b/inputs/netresponse/dashboard.json new file mode 100644 index 0000000..8b5007c --- /dev/null +++ b/inputs/netresponse/dashboard.json @@ -0,0 +1,19 @@ +[ + { + "name": "TCP探测", + "tags": "", + "configs": "", + "chart_groups": [ + { + "name": "Default chart group", + "weight": 0, + "charts": [ + { + "configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"max(netresponse_result_code) by (target)\",\"legend\":\"UP?\"},{\"expr\":\"max(netresponse_response_time) by (target)\",\"refId\":\"C\",\"legend\":\"latency(s)\"}],\"name\":\"Targets\",\"custom\":{\"showHeader\":true,\"calc\":\"lastNotNull\",\"displayMode\":\"labelValuesToRows\",\"aggrDimension\":\"target\"},\"options\":{\"valueMappings\":[],\"standardOptions\":{}},\"overrides\":[{\"properties\":{\"valueMappings\":[{\"type\":\"special\",\"match\":{\"special\":0},\"result\":{\"text\":\"UP\",\"color\":\"#417505\"}},{\"type\":\"range\",\"match\":{\"special\":1,\"from\":1},\"result\":{\"text\":\"DOWN\",\"color\":\"#e90f0f\"}}],\"standardOptions\":{}},\"matcher\":{\"value\":\"A\"}}],\"version\":\"2.0.0\",\"type\":\"table\",\"layout\":{\"h\":4,\"w\":24,\"x\":0,\"y\":0,\"i\":\"0\"}}", + "weight": 0 + } + ] + } + ] + } + ] \ No newline at end of file