Skip to content

Commit

Permalink
Lint fix dashboards automatically (#5068)
Browse files Browse the repository at this point in the history
* Validate grafana script fixes dashboards

* Run validate grafana dashboards with linter style

* diff on dashboards dir only
  • Loading branch information
dapplion authored Jan 27, 2023
1 parent 222958e commit 63355c1
Show file tree
Hide file tree
Showing 20 changed files with 877 additions and 326 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:

# Misc sanity checks
- name: Lint Grafana dashboards
run: node scripts/validate-grafana-dashboard.mjs ./dashboards
run: scripts/validate-grafana-dashboards.sh
- name: Test root binary exists
run: ./lodestar --version
- name: Reject yarn.lock changes
Expand Down
38 changes: 28 additions & 10 deletions dashboards/libp2p.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@
"icon": "external link",
"includeVars": true,
"keepTime": true,
"tags": ["lodestar"],
"tags": [
"lodestar"
],
"targetBlank": false,
"title": "Lodestar dashboards",
"tooltip": "",
Expand Down Expand Up @@ -684,10 +686,12 @@
"type": "timeseries"
}
],
"refresh": "30s",
"refresh": "10s",
"schemaVersion": 35,
"style": "dark",
"tags": ["lodestar"],
"tags": [
"lodestar"
],
"templating": {
"list": [
{
Expand All @@ -703,6 +707,7 @@
"name": "DS_PROMETHEUS",
"options": [],
"query": "prometheus",
"queryValue": "",
"refresh": 1,
"regex": "",
"skipUrlSync": false,
Expand All @@ -714,8 +719,8 @@
"auto_min": "10s",
"current": {
"selected": false,
"text": "auto",
"value": "$__auto_interval_rate_interval"
"text": "1h",
"value": "1h"
},
"hide": 0,
"label": "rate() interval",
Expand All @@ -737,12 +742,12 @@
"value": "10m"
},
{
"selected": true,
"selected": false,
"text": "30m",
"value": "30m"
},
{
"selected": false,
"selected": true,
"text": "1h",
"value": "1h"
},
Expand Down Expand Up @@ -807,10 +812,23 @@
"from": "now-24h",
"to": "now"
},
"timepicker": {},
"timezone": "",
"timepicker": {
"refresh_intervals": [
"5s",
"10s",
"30s",
"1m",
"5m",
"15m",
"30m",
"1h",
"2h",
"1d"
]
},
"timezone": "utc",
"title": "Libp2p",
"uid": "C5u1rHZVk",
"version": 6,
"weekStart": ""
"weekStart": "monday"
}
33 changes: 24 additions & 9 deletions dashboards/lodestar_block_processor.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@
"icon": "external link",
"includeVars": true,
"keepTime": true,
"tags": ["lodestar"],
"tags": [
"lodestar"
],
"targetBlank": false,
"title": "Lodestar dashboards",
"tooltip": "",
Expand Down Expand Up @@ -3066,7 +3068,9 @@
"refresh": "10s",
"schemaVersion": 35,
"style": "dark",
"tags": ["lodestar"],
"tags": [
"lodestar"
],
"templating": {
"list": [
{
Expand Down Expand Up @@ -3094,8 +3098,8 @@
"auto_min": "10s",
"current": {
"selected": false,
"text": "30m",
"value": "30m"
"text": "1h",
"value": "1h"
},
"hide": 0,
"label": "rate() interval",
Expand All @@ -3117,12 +3121,12 @@
"value": "10m"
},
{
"selected": true,
"selected": false,
"text": "30m",
"value": "30m"
},
{
"selected": false,
"selected": true,
"text": "1h",
"value": "1h"
},
Expand Down Expand Up @@ -3188,11 +3192,22 @@
"to": "now"
},
"timepicker": {
"refresh_intervals": ["5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"]
"refresh_intervals": [
"5s",
"10s",
"30s",
"1m",
"5m",
"15m",
"30m",
"1h",
"2h",
"1d"
]
},
"timezone": "",
"timezone": "utc",
"title": "Lodestar - block processor",
"uid": "lodestar_block_processor",
"version": 2,
"weekStart": ""
"weekStart": "monday"
}
12 changes: 6 additions & 6 deletions dashboards/lodestar_block_production.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "prometheus_local"
"uid": "${DS_PROMETHEUS}"
},
"refId": "A"
}
Expand Down Expand Up @@ -436,7 +436,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "prometheus_local"
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "rate(lodestar_api_rest_errors_total{operationId=~\"produceBlockV2|produceBlindedBlock|publishBlock|publishBlindedBlock\"}[$rate_interval])",
Expand Down Expand Up @@ -1036,7 +1036,7 @@
"condition": "",
"key": "instance",
"operator": "=",
"value": "hetzner-lido-prod-bn-1"
"value": "unstable-lg1k-hzax41"
}
],
"hide": 0,
Expand Down Expand Up @@ -1064,9 +1064,9 @@
"1d"
]
},
"timezone": "",
"timezone": "utc",
"title": "Lodestar - block production",
"uid": "lodestar_block_production",
"version": 5,
"weekStart": ""
}
"weekStart": "monday"
}
33 changes: 24 additions & 9 deletions dashboards/lodestar_bls_thread_pool.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@
"icon": "external link",
"includeVars": true,
"keepTime": true,
"tags": ["lodestar"],
"tags": [
"lodestar"
],
"targetBlank": false,
"title": "Lodestar dashboards",
"tooltip": "",
Expand Down Expand Up @@ -1114,7 +1116,9 @@
"refresh": "10s",
"schemaVersion": 35,
"style": "dark",
"tags": ["lodestar"],
"tags": [
"lodestar"
],
"templating": {
"list": [
{
Expand Down Expand Up @@ -1142,8 +1146,8 @@
"auto_min": "10s",
"current": {
"selected": false,
"text": "30m",
"value": "30m"
"text": "1h",
"value": "1h"
},
"hide": 0,
"label": "rate() interval",
Expand All @@ -1165,12 +1169,12 @@
"value": "10m"
},
{
"selected": true,
"selected": false,
"text": "30m",
"value": "30m"
},
{
"selected": false,
"selected": true,
"text": "1h",
"value": "1h"
},
Expand Down Expand Up @@ -1236,11 +1240,22 @@
"to": "now"
},
"timepicker": {
"refresh_intervals": ["5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"]
"refresh_intervals": [
"5s",
"10s",
"30s",
"1m",
"5m",
"15m",
"30m",
"1h",
"2h",
"1d"
]
},
"timezone": "",
"timezone": "utc",
"title": "Lodestar - BLS thread pool",
"uid": "lodestar_bls_thread_pool",
"version": 2,
"weekStart": ""
"weekStart": "monday"
}
Loading

0 comments on commit 63355c1

Please sign in to comment.