Skip to content
This repository was archived by the owner on Feb 23, 2023. It is now read-only.

Commit a8de95f

Browse files
DustinBragglmprice
authored andcommitted
Reworked system failure collection
Retain failure history Annotations for both failure discovery as well as failure resolution
1 parent 5fd52fb commit a8de95f

File tree

5 files changed

+231
-62
lines changed

5 files changed

+231
-62
lines changed

ansible/dashboards/Disk View Dashboard.json

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,43 @@
11
{
22
"dashboard": {
33
"annotations": {
4-
"list": [
5-
{
4+
"list": [
5+
{
66
"builtIn": 1,
77
"datasource": "-- Grafana --",
88
"enable": true,
99
"hide": true,
1010
"iconColor": "rgba(0, 211, 255, 1)",
1111
"name": "Annotations & Alerts",
1212
"type": "dashboard"
13+
},
14+
{
15+
"datasource": "WSP",
16+
"enable": true,
17+
"hide": false,
18+
"iconColor": "#C4162A",
19+
"limit": 100,
20+
"name": "Failure Discovered",
21+
"query": "SELECT name_of,type_of FROM (SELECT name_of,type_of,active FROM \"failures\" WHERE (\"sys_name\" =~ /^$System$/) AND $timeFilter GROUP BY \"sys_name\", \"failure_type\", \"object_type\" LIMIT 25) WHERE (\"active\" = 'True')",
22+
"showIn": 0,
23+
"tags": [],
24+
"tagsColumn": "type_of",
25+
"textColumn": "name_of",
26+
"type": "tags"
27+
},
28+
{
29+
"datasource": "WSP",
30+
"enable": true,
31+
"hide": false,
32+
"iconColor": "#56A64B",
33+
"limit": 100,
34+
"name": "Failure Resolved",
35+
"query": "SELECT name_of,type_of FROM (SELECT name_of,type_of,active FROM \"failures\" WHERE (\"sys_name\" =~ /^$System$/) AND $timeFilter GROUP BY \"sys_name\", \"failure_type\", \"object_type\" LIMIT 25) WHERE (\"active\" = 'False')",
36+
"showIn": 0,
37+
"tags": [],
38+
"tagsColumn": "type_of",
39+
"textColumn": "name_of",
40+
"type": "tags"
1341
}
1442
]
1543
},

ansible/dashboards/System View Dashboard.json

Lines changed: 59 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,43 @@
11
{
22
"dashboard": {
33
"annotations": {
4-
"list": [
5-
{
4+
"list": [
5+
{
66
"builtIn": 1,
77
"datasource": "-- Grafana --",
88
"enable": true,
99
"hide": true,
1010
"iconColor": "rgba(0, 211, 255, 1)",
1111
"name": "Annotations & Alerts",
1212
"type": "dashboard"
13+
},
14+
{
15+
"datasource": "WSP",
16+
"enable": true,
17+
"hide": false,
18+
"iconColor": "#C4162A",
19+
"limit": 100,
20+
"name": "Failure Discovered",
21+
"query": "SELECT name_of,type_of FROM (SELECT name_of,type_of,active FROM \"failures\" WHERE (\"sys_name\" =~ /^$System$/) AND $timeFilter GROUP BY \"sys_name\", \"failure_type\", \"object_type\" LIMIT 25) WHERE (\"active\" = 'True')",
22+
"showIn": 0,
23+
"tags": [],
24+
"tagsColumn": "type_of",
25+
"textColumn": "name_of",
26+
"type": "tags"
27+
},
28+
{
29+
"datasource": "WSP",
30+
"enable": true,
31+
"hide": false,
32+
"iconColor": "#56A64B",
33+
"limit": 100,
34+
"name": "Failure Resolved",
35+
"query": "SELECT name_of,type_of FROM (SELECT name_of,type_of,active FROM \"failures\" WHERE (\"sys_name\" =~ /^$System$/) AND $timeFilter GROUP BY \"sys_name\", \"failure_type\", \"object_type\" LIMIT 25) WHERE (\"active\" = 'False')",
36+
"showIn": 0,
37+
"tags": [],
38+
"tagsColumn": "type_of",
39+
"textColumn": "name_of",
40+
"type": "tags"
1341
}
1442
]
1543
},
@@ -1561,7 +1589,7 @@
15611589
"h": 10,
15621590
"w": 9,
15631591
"x": 15,
1564-
"y": 29
1592+
"y": 26
15651593
},
15661594
"id": 24,
15671595
"links": [],
@@ -1575,7 +1603,7 @@
15751603
},
15761604
"styles": [
15771605
{
1578-
"alias": "Pull Time",
1606+
"alias": "Discovery Time",
15791607
"colorMode": null,
15801608
"colors": [
15811609
"rgba(245, 54, 54, 0.9)",
@@ -1661,6 +1689,22 @@
16611689
"thresholds": [],
16621690
"type": "hidden",
16631691
"unit": "short"
1692+
},
1693+
{
1694+
"alias": "",
1695+
"colorMode": null,
1696+
"colors": [
1697+
"rgba(245, 54, 54, 0.9)",
1698+
"rgba(237, 129, 40, 0.89)",
1699+
"rgba(50, 172, 45, 0.97)"
1700+
],
1701+
"dateFormat": "YYYY-MM-DD HH:mm:ss",
1702+
"decimals": 2,
1703+
"mappingType": 1,
1704+
"pattern": "active",
1705+
"thresholds": [],
1706+
"type": "hidden",
1707+
"unit": "short"
16641708
}
16651709
],
16661710
"targets": [
@@ -1688,15 +1732,15 @@
16881732
"measurement": "failures",
16891733
"orderByTime": "ASC",
16901734
"policy": "default",
1691-
"query": "SELECT \"id\", \"location\", \"description\" FROM \"major_event_log\" WHERE (\"sys_name\" =~ /^$System$/) GROUP BY \"sys_name\"",
1692-
"rawQuery": false,
1735+
"query": "SELECT * FROM (SELECT last(\"name_of\"),active FROM \"failures\" WHERE (\"sys_name\" =~ /^$System$/) AND $timeFilter GROUP BY \"sys_name\", \"failure_type\", \"object_type\") WHERE (\"active\" = 'True')",
1736+
"rawQuery": true,
16931737
"refId": "A",
16941738
"resultFormat": "table",
16951739
"select": [
16961740
[
16971741
{
16981742
"params": [
1699-
"value"
1743+
"name_of"
17001744
],
17011745
"type": "field"
17021746
},
@@ -1711,6 +1755,12 @@
17111755
"key": "sys_name",
17121756
"operator": "=~",
17131757
"value": "/^$System$/"
1758+
},
1759+
{
1760+
"condition": "AND",
1761+
"key": "active",
1762+
"operator": "=",
1763+
"value": "True"
17141764
}
17151765
]
17161766
}
@@ -1740,14 +1790,14 @@
17401790
]
17411791
},
17421792
"datasource": "WSP",
1743-
"definition": "SHOW TAG VALUES FROM \"major_event_log\" WITH KEY = \"sys_name\"",
1793+
"definition": "SHOW TAG VALUES FROM \"disks\" WITH KEY = \"sys_name\"",
17441794
"hide": 0,
17451795
"includeAll": false,
17461796
"label": null,
17471797
"multi": true,
17481798
"name": "System",
17491799
"options": [],
1750-
"query": "SHOW TAG VALUES FROM \"major_event_log\" WITH KEY = \"sys_name\"",
1800+
"query": "SHOW TAG VALUES FROM \"disks\" WITH KEY = \"sys_name\"",
17511801
"refresh": 2,
17521802
"regex": "",
17531803
"skipUrlSync": false,

ansible/dashboards/Volume View Dashboard.json

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,43 @@
11
{
22
"dashboard": {
33
"annotations": {
4-
"list": [
5-
{
4+
"list": [
5+
{
66
"builtIn": 1,
77
"datasource": "-- Grafana --",
88
"enable": true,
99
"hide": true,
1010
"iconColor": "rgba(0, 211, 255, 1)",
1111
"name": "Annotations & Alerts",
1212
"type": "dashboard"
13+
},
14+
{
15+
"datasource": "WSP",
16+
"enable": true,
17+
"hide": false,
18+
"iconColor": "#C4162A",
19+
"limit": 100,
20+
"name": "Failure Discovered",
21+
"query": "SELECT name_of,type_of FROM (SELECT name_of,type_of,active FROM \"failures\" WHERE (\"sys_name\" =~ /^$System$/) AND $timeFilter GROUP BY \"sys_name\", \"failure_type\", \"object_type\" LIMIT 25) WHERE (\"active\" = 'True')",
22+
"showIn": 0,
23+
"tags": [],
24+
"tagsColumn": "type_of",
25+
"textColumn": "name_of",
26+
"type": "tags"
27+
},
28+
{
29+
"datasource": "WSP",
30+
"enable": true,
31+
"hide": false,
32+
"iconColor": "#56A64B",
33+
"limit": 100,
34+
"name": "Failure Resolved",
35+
"query": "SELECT name_of,type_of FROM (SELECT name_of,type_of,active FROM \"failures\" WHERE (\"sys_name\" =~ /^$System$/) AND $timeFilter GROUP BY \"sys_name\", \"failure_type\", \"object_type\" LIMIT 25) WHERE (\"active\" = 'False')",
36+
"showIn": 0,
37+
"tags": [],
38+
"tagsColumn": "type_of",
39+
"textColumn": "name_of",
40+
"type": "tags"
1341
}
1442
]
1543
},

0 commit comments

Comments
 (0)