Skip to content
This repository has been archived by the owner on Dec 14, 2023. It is now read-only.

Add downtime recording rules for moving time windows #31

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 38 additions & 7 deletions charts/connectivity-exporter/dashboards/uptime-overview.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"targets": [
{
"exemplar": true,
"expr": "count(count(downtime{sni=~\".*$sni.*\"}) by (sni))",
"expr": "count(count(downtime{interval=\"$interval\", in=\"$in\", sni=~\".*$sni.*\"}) by (sni))",
"instant": true,
"interval": "",
"legendFormat": "",
Expand Down Expand Up @@ -123,7 +123,7 @@
"targets": [
{
"exemplar": true,
"expr": "count(((1-downtime{in=~\"$in\",kind=\"active_failed\",sni=~\".*$sni.*\"})*100) > 99.95)",
"expr": "count(((1-downtime{interval=\"$interval\", in=\"$in\", kind=\"active_failed\", sni=~\".*$sni.*\"})*100) > 99.95)",
"instant": true,
"interval": "",
"legendFormat": "",
Expand Down Expand Up @@ -185,7 +185,7 @@
"targets": [
{
"exemplar": true,
"expr": "count(((1-downtime{in=~\"$in\",kind=\"active_failed\", sni=~\".*$sni.*\"})*100) < 99.95)",
"expr": "count(((1-downtime{interval=\"$interval\", in=\"$in\", kind=\"active_failed\", sni=~\".*$sni.*\"})*100) < 99.95)",
"instant": true,
"interval": "",
"legendFormat": "",
Expand Down Expand Up @@ -300,7 +300,7 @@
"targets": [
{
"exemplar": true,
"expr": "(1 - topk(10,downtime{in=~\"$in\", kind=\"active_failed\", sni=~\".*$sni.*\"})) * 100",
"expr": "(1 - topk(10,downtime{interval=\"$interval\", in=\"$in\", kind=\"active_failed\", sni=~\".*$sni.*\"})) * 100",
"instant": true,
"interval": "",
"legendFormat": "{{sni}}",
Expand Down Expand Up @@ -432,7 +432,7 @@
"targets": [
{
"exemplar": true,
"expr": "topk(10,((1-downtime{in=~\"$in\", kind=\"active_failed\", sni=~\".*$sni.*\"}) * 100) < 100)",
"expr": "topk(10,((1-downtime{interval=\"$interval\", in=\"$in\", kind=\"active_failed\", sni=~\".*$sni.*\"}) * 100) < 100)",
"instant": true,
"interval": "",
"legendFormat": "{{sni}}",
Expand Down Expand Up @@ -465,6 +465,37 @@
"tags": [],
"templating": {
"list": [
{
"allValue": null,
"current": {
"selected": false,
"text": "anchored",
"value": "anchored"
},
"datasource": null,
"definition": "label_values(downtime:interval, interval)",
"description": null,
"error": null,
"hide": 0,
"includeAll": false,
"label": null,
"multi": false,
"name": "interval",
"options": [],
"query": {
"query": "label_values(downtime:interval, interval)",
"refId": "StandardVariableQuery"
},
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 0,
"tagValuesQuery": "",
"tags": [],
"tagsQuery": "",
"type": "query",
"useTags": false
},
{
"allValue": null,
"current": {
Expand All @@ -473,7 +504,7 @@
"value": "week"
},
"datasource": null,
"definition": "label_values(downtime:in, in)",
"definition": "label_values(downtime:in{interval=\"$interval\"}, in)",
"description": null,
"error": null,
"hide": 0,
Expand All @@ -483,7 +514,7 @@
"name": "in",
"options": [],
"query": {
"query": "label_values(downtime:in, in)",
"query": "label_values(downtime:in{interval=\"$interval\"}, in)",
"refId": "StandardVariableQuery"
},
"refresh": 1,
Expand Down
34 changes: 17 additions & 17 deletions charts/connectivity-exporter/dashboards/uptime.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
"targets": [
{
"exemplar": false,
"expr": "(1-downtime{in=\"hour\", sni=~\"$sni\", kind=\"active_failed\"}) * 100",
"expr": "(1-downtime{interval=\"anchored\", in=\"hour\", sni=~\"$sni\", kind=\"active_failed\"}) * 100",
"instant": true,
"interval": "",
"legendFormat": "",
Expand Down Expand Up @@ -154,7 +154,7 @@
"targets": [
{
"exemplar": false,
"expr": "(1-downtime{in=\"day\", sni=~\"$sni\", kind=\"active_failed\"}) * 100",
"expr": "(1-downtime{interval=\"anchored\", in=\"day\", sni=~\"$sni\", kind=\"active_failed\"}) * 100",
"instant": true,
"interval": "",
"legendFormat": "",
Expand Down Expand Up @@ -228,7 +228,7 @@
"targets": [
{
"exemplar": false,
"expr": "(1-downtime{in=\"week\", sni=~\"$sni\", kind=\"active_failed\"}) * 100",
"expr": "(1-downtime{interval=\"anchored\", in=\"week\", sni=~\"$sni\", kind=\"active_failed\"}) * 100",
"instant": true,
"interval": "",
"legendFormat": "",
Expand Down Expand Up @@ -302,7 +302,7 @@
"targets": [
{
"exemplar": false,
"expr": "(1-downtime{in=\"calendarmonth\", sni=~\"$sni\", kind=\"active_failed\"}) * 100",
"expr": "(1-downtime{interval=\"anchored\", in=\"calendarmonth\", sni=~\"$sni\", kind=\"active_failed\"}) * 100",
"instant": true,
"interval": "",
"legendFormat": "",
Expand Down Expand Up @@ -364,7 +364,7 @@
"targets": [
{
"exemplar": false,
"expr": "floor(downtime{in=\"hour\", sni=~\"$sni\", kind=\"active_failed\"} * 60 * 60)",
"expr": "floor(downtime{interval=\"anchored\", in=\"hour\", sni=~\"$sni\", kind=\"active_failed\"} * 60 * 60)",
"interval": "",
"legendFormat": "{{sni}}",
"refId": "A"
Expand Down Expand Up @@ -463,7 +463,7 @@
"targets": [
{
"exemplar": false,
"expr": "floor(downtime{in=\"day\", sni=~\"$sni\", kind=\"active_failed\"} * 60 * 60 * 24)",
"expr": "floor(downtime{interval=\"anchored\", in=\"day\", sni=~\"$sni\", kind=\"active_failed\"} * 60 * 60 * 24)",
"interval": "",
"legendFormat": "{{sni}}",
"refId": "A"
Expand Down Expand Up @@ -562,7 +562,7 @@
"targets": [
{
"exemplar": false,
"expr": "floor(downtime{in=\"week\", sni=~\"$sni\", kind=\"active_failed\"} * 60 * 60 * 24 * 7)",
"expr": "floor(downtime{interval=\"anchored\", in=\"week\", sni=~\"$sni\", kind=\"active_failed\"} * 60 * 60 * 24 * 7)",
"interval": "",
"legendFormat": "{{sni}}",
"refId": "A"
Expand Down Expand Up @@ -661,7 +661,7 @@
"targets": [
{
"exemplar": false,
"expr": "floor(downtime{in=\"calendarmonth\", sni=~\"$sni\", kind=\"active_failed\"} * 60 * 60 * 24 * scalar(days_in_month(month())))",
"expr": "floor(downtime{interval=\"anchored\", in=\"calendarmonth\", sni=~\"$sni\", kind=\"active_failed\"} * 60 * 60 * 24 * scalar(days_in_month(month())))",
"interval": "",
"legendFormat": "{{sni}}",
"refId": "A"
Expand Down Expand Up @@ -760,7 +760,7 @@
"targets": [
{
"exemplar": false,
"expr": "(1-downtime{in=\"hour\", sni=~\"$sni\", kind=\"active_failed\"}) * 100",
"expr": "(1-downtime{interval=\"anchored\", in=\"hour\", sni=~\"$sni\", kind=\"active_failed\"}) * 100",
"interval": "",
"legendFormat": "{{sni}}",
"refId": "A"
Expand Down Expand Up @@ -886,7 +886,7 @@
"targets": [
{
"exemplar": false,
"expr": "(1-downtime{in=\"day\", sni=~\"$sni\", kind=\"active_failed\"}) * 100",
"expr": "(1-downtime{interval=\"anchored\", in=\"day\", sni=~\"$sni\", kind=\"active_failed\"}) * 100",
"interval": "",
"legendFormat": "{{sni}}",
"refId": "A"
Expand Down Expand Up @@ -1012,7 +1012,7 @@
"targets": [
{
"exemplar": false,
"expr": "(1-downtime{in=\"week\", sni=~\"$sni\", kind=\"active_failed\"}) * 100",
"expr": "(1-downtime{interval=\"anchored\", in=\"week\", sni=~\"$sni\", kind=\"active_failed\"}) * 100",
"interval": "",
"legendFormat": "{{sni}}",
"refId": "A"
Expand Down Expand Up @@ -1138,7 +1138,7 @@
"targets": [
{
"exemplar": false,
"expr": "(1-downtime{in=\"calendarmonth\", sni=~\"$sni\", kind=\"active_failed\"}) * 100",
"expr": "(1-downtime{interval=\"anchored\", in=\"calendarmonth\", sni=~\"$sni\", kind=\"active_failed\"}) * 100",
"interval": "",
"legendFormat": "{{sni}}",
"refId": "A"
Expand Down Expand Up @@ -1278,7 +1278,7 @@
"targets": [
{
"exemplar": false,
"expr": "(1-downtime{in=\"day\", sni=~\"$sni\", kind=\"active_failed\"}) * 100",
"expr": "(1-downtime{interval=\"anchored\", in=\"day\", sni=~\"$sni\", kind=\"active_failed\"}) * 100",
"interval": "",
"legendFormat": "{{sni}}:{{in}}",
"refId": "A"
Expand Down Expand Up @@ -1384,7 +1384,7 @@
"h": 9,
"w": 24,
"x": 0,
"y": 26
"y": 34
},
"hiddenSeries": false,
"id": 15,
Expand Down Expand Up @@ -1453,7 +1453,7 @@
{
"$$hashKey": "object:61",
"format": "short",
"label": null,
"label": "foo",
"logBase": 1,
"max": null,
"min": null,
Expand All @@ -1479,7 +1479,7 @@
{
"allValue": "(.+)",
"datasource": null,
"definition": "label_values(downtime{}, sni)",
"definition": "label_values(downtime:sni{}, sni)",
"description": null,
"error": null,
"hide": 0,
Expand All @@ -1489,7 +1489,7 @@
"name": "sni",
"options": [],
"query": {
"query": "label_values(downtime{}, sni)",
"query": "label_values(downtime:sni{}, sni)",
"refId": "StandardVariableQuery"
},
"refresh": 1,
Expand Down
Loading