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