Skip to content

Commit

Permalink
Fix grafana dashboard lint script (#5221)
Browse files Browse the repository at this point in the history
* Fix grafana dashboard lint script

- Nested dashboard panels are now recursively checked
- Panel datasource must point to the datasource variable

* Run scripts/validate-grafana-dashboards.sh script
  • Loading branch information
nflaig authored Mar 2, 2023
1 parent 3951287 commit 9b6cab1
Show file tree
Hide file tree
Showing 8 changed files with 158 additions and 140 deletions.
12 changes: 6 additions & 6 deletions dashboards/libp2p.json
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "prometheus_local"
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": {
"defaults": {
Expand Down Expand Up @@ -775,7 +775,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "prometheus_local"
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "rate(libp2p_tcp_listener_events_total[$rate_interval])",
Expand All @@ -790,7 +790,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "prometheus_local"
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": {
"defaults": {
Expand Down Expand Up @@ -867,7 +867,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "prometheus_local"
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "rate(libp2p_tcp_listener_errors_total[$rate_interval])",
Expand All @@ -882,7 +882,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "prometheus_local"
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": {
"defaults": {
Expand Down Expand Up @@ -977,7 +977,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "prometheus_local"
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "libp2p_tcp_listener_status_info",
Expand Down
4 changes: 2 additions & 2 deletions dashboards/lodestar_block_production.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"collapsed": false,
"datasource": {
"type": "prometheus",
"uid": "prometheus_local"
"uid": "${DS_PROMETHEUS}"
},
"gridPos": {
"h": 1,
Expand Down Expand Up @@ -359,7 +359,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "prometheus_local"
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": {
"defaults": {
Expand Down
50 changes: 25 additions & 25 deletions dashboards/lodestar_debug_gossipsub.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
"collapsed": false,
"datasource": {
"type": "prometheus",
"uid": "prometheus_local"
"uid": "${DS_PROMETHEUS}"
},
"gridPos": {
"h": 1,
Expand Down Expand Up @@ -236,7 +236,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "prometheus_local"
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": {
"defaults": {
Expand Down Expand Up @@ -295,7 +295,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "prometheus_local"
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": {
"defaults": {
Expand Down Expand Up @@ -372,7 +372,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "prometheus_local"
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": {
"defaults": {
Expand Down Expand Up @@ -439,7 +439,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "prometheus_local"
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": {
"defaults": {
Expand Down Expand Up @@ -499,7 +499,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "prometheus_local"
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": {
"defaults": {
Expand Down Expand Up @@ -789,7 +789,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "prometheus_local"
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": {
"defaults": {
Expand Down Expand Up @@ -1059,7 +1059,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "prometheus_local"
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": {
"defaults": {
Expand Down Expand Up @@ -1152,7 +1152,7 @@
"dashes": false,
"datasource": {
"type": "prometheus",
"uid": "prometheus_local"
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": {
"defaults": {
Expand Down Expand Up @@ -1240,7 +1240,7 @@
"collapsed": true,
"datasource": {
"type": "prometheus",
"uid": "prometheus_local"
"uid": "${DS_PROMETHEUS}"
},
"gridPos": {
"h": 1,
Expand All @@ -1257,7 +1257,7 @@
"dashes": false,
"datasource": {
"type": "prometheus",
"uid": "prometheus_local"
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": {
"defaults": {
Expand Down Expand Up @@ -1303,7 +1303,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "prometheus_local"
"uid": "${DS_PROMETHEUS}"
},
"expr": "delta(lodestar_gossip_validation_queue_job_wait_time_seconds_sum[$rate_interval])/delta(lodestar_gossip_validation_queue_job_wait_time_seconds_count[$rate_interval])",
"format": "time_series",
Expand Down Expand Up @@ -1345,7 +1345,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "prometheus_local"
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": {
"defaults": {
Expand Down Expand Up @@ -1423,7 +1423,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "prometheus_local"
"uid": "${DS_PROMETHEUS}"
},
"expr": "delta(lodestar_gossip_validation_queue_dropped_jobs_total[$rate_interval])/(delta(lodestar_gossip_validation_queue_job_time_seconds_count[$rate_interval])+delta(lodestar_gossip_validation_queue_dropped_jobs_total[$rate_interval]))",
"interval": "",
Expand Down Expand Up @@ -1545,7 +1545,7 @@
"dashes": false,
"datasource": {
"type": "prometheus",
"uid": "prometheus_local"
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": {
"defaults": {
Expand Down Expand Up @@ -1591,7 +1591,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "prometheus_local"
"uid": "${DS_PROMETHEUS}"
},
"expr": "lodestar_gossip_validation_queue_length",
"interval": "",
Expand Down Expand Up @@ -1646,7 +1646,7 @@
"collapsed": true,
"datasource": {
"type": "prometheus",
"uid": "prometheus_local"
"uid": "${DS_PROMETHEUS}"
},
"gridPos": {
"h": 1,
Expand Down Expand Up @@ -2055,7 +2055,7 @@
"collapsed": true,
"datasource": {
"type": "prometheus",
"uid": "prometheus_local"
"uid": "${DS_PROMETHEUS}"
},
"gridPos": {
"h": 1,
Expand Down Expand Up @@ -2820,7 +2820,7 @@
"collapsed": true,
"datasource": {
"type": "prometheus",
"uid": "prometheus_local"
"uid": "${DS_PROMETHEUS}"
},
"gridPos": {
"h": 1,
Expand Down Expand Up @@ -3402,7 +3402,7 @@
"collapsed": true,
"datasource": {
"type": "prometheus",
"uid": "prometheus_local"
"uid": "${DS_PROMETHEUS}"
},
"gridPos": {
"h": 1,
Expand Down Expand Up @@ -4231,7 +4231,7 @@
"collapsed": true,
"datasource": {
"type": "prometheus",
"uid": "prometheus_local"
"uid": "${DS_PROMETHEUS}"
},
"gridPos": {
"h": 1,
Expand Down Expand Up @@ -4972,7 +4972,7 @@
"collapsed": true,
"datasource": {
"type": "prometheus",
"uid": "prometheus_local"
"uid": "${DS_PROMETHEUS}"
},
"gridPos": {
"h": 1,
Expand Down Expand Up @@ -6867,7 +6867,7 @@
"collapsed": true,
"datasource": {
"type": "prometheus",
"uid": "prometheus_local"
"uid": "${DS_PROMETHEUS}"
},
"gridPos": {
"h": 1,
Expand Down Expand Up @@ -7537,7 +7537,7 @@
"collapsed": true,
"datasource": {
"type": "prometheus",
"uid": "prometheus_local"
"uid": "${DS_PROMETHEUS}"
},
"gridPos": {
"h": 1,
Expand Down Expand Up @@ -8210,7 +8210,7 @@
"collapsed": true,
"datasource": {
"type": "prometheus",
"uid": "prometheus_local"
"uid": "${DS_PROMETHEUS}"
},
"gridPos": {
"h": 1,
Expand Down
Loading

0 comments on commit 9b6cab1

Please sign in to comment.