Rework cluster metrics dashboard to support the modern clusters

This commit is contained in:
Michael Vines
2020-03-11 10:21:53 -07:00
parent 0ef9d79056
commit 5f5824d78d
9 changed files with 58 additions and 55 deletions

View File

@ -21,7 +21,7 @@ with open(dashboard_json, 'r') as read_file:
data = json.load(read_file)
if channel == 'local':
data['title'] = 'Local Testnet Monitor'
data['title'] = 'Local Cluster Monitor'
data['uid'] = 'local'
data['links'] = []
data['templating']['list'] = [{'current': {'text': '$datasource',
@ -66,10 +66,9 @@ if channel == 'local':
'useTags': False}]
elif channel == 'stable':
# Stable dashboard only allows the user to select between the stable
# testnet databases
data['title'] = 'Testnet Monitor'
data['uid'] = 'testnet'
# Stable dashboard only allows the user to select between public clusters
data['title'] = 'Cluster Telemetry'
data['uid'] = 'monitor'
data['templating']['list'] = [{'current': {'text': '$datasource',
'value': '$datasource'},
'hide': 1,
@ -81,20 +80,26 @@ elif channel == 'stable':
'regex': '',
'type': 'datasource'},
{'allValue': None,
'current': {'text': 'testnet',
'value': 'testnet'},
'current': {'text': 'Developer Testnet',
'value': 'devnet'},
'hide': 1,
'includeAll': False,
'label': 'Testnet',
'multi': False,
'name': 'testnet',
'options': [{'selected': False,
'text': 'testnet',
'value': 'testnet'},
{'selected': True,
'text': 'testnet-perf',
'value': 'testnet-perf'}],
'query': 'testnet,testnet-perf',
'options': [{'selected': True,
'text': 'Developer Testnet',
'value': 'devnet'},
{'selected': False,
'text': 'Mainnet Beta',
'value': 'mainnet-beta'},
{'selected': False,
'text': 'Tour de SOL Testnet',
'value': 'tds'},
{'selected': False,
'text': 'Soft Launch Testnet',
'value': 'cluster'}],
'query': 'devnet,mainnet-beta,tds,cluster',
'type': 'custom'},
{'allValue': ".*",
'datasource': '$datasource',
@ -114,10 +119,9 @@ elif channel == 'stable':
'type': 'query',
'useTags': False}]
else:
# Non-stable dashboard only allows the user to select between all testnet
# databases
data['title'] = 'Testnet Monitor ({})'.format(channel)
data['uid'] = 'testnet-' + channel
# Non-stable dashboard includes all the dev clusters
data['title'] = 'Cluster Telemetry ({})'.format(channel)
data['uid'] = 'monitor-' + channel
data['templating']['list'] = [{'current': {'text': '$datasource',
'value': '$datasource'},
'hide': 1,
@ -129,8 +133,8 @@ else:
'regex': '',
'type': 'datasource'},
{'allValue': ".*",
'current': {'text': 'testnet',
'value': 'testnet'},
'current': {'text': 'Developer Testnet',
'value': 'devnet'},
'datasource': '$datasource',
'hide': 1,
'includeAll': False,
@ -140,7 +144,7 @@ else:
'options': [],
'query': 'show databases',
'refresh': 1,
'regex': 'testnet.*',
'regex': '(devnet|cluster|tds|mainnet-beta|testnet.*)',
'sort': 1,
'tagValuesQuery': '',
'tags': [],

View File

@ -27,21 +27,21 @@
"title": "Stable",
"tooltip": "",
"type": "link",
"url": "https://metrics.solana.com:3000/d/testnet/testnet-monitor"
"url": "https://metrics.solana.com:3000/d/monitor/cluster-telemetry"
},
{
"icon": "dashboard",
"tags": [],
"title": "Beta",
"type": "link",
"url": "https://metrics.solana.com:3000/d/testnet-beta/testnet-monitor-beta"
"url": "https://metrics.solana.com:3000/d/monitor-beta/cluster-telemetry-beta"
},
{
"icon": "dashboard",
"tags": [],
"title": "Edge",
"type": "link",
"url": "https://metrics.solana.com:3000/d/testnet-edge/testnet-monitor-edge"
"url": "https://metrics.solana.com:3000/d/monitor-edge/cluster-telemetry-edge"
}
],
"panels": [
@ -4618,7 +4618,7 @@
},
"yaxes": [
{
"format": "µs",
"format": "\u00b5s",
"label": null,
"logBase": 1,
"max": null,
@ -5385,7 +5385,7 @@
},
"yaxes": [
{
"format": "µs",
"format": "\u00b5s",
"label": null,
"logBase": 1,
"max": null,
@ -5752,7 +5752,7 @@
},
"yaxes": [
{
"format": "µs",
"format": "\u00b5s",
"label": null,
"logBase": 1,
"max": null,
@ -6727,7 +6727,7 @@
},
"yaxes": [
{
"format": "µs",
"format": "\u00b5s",
"label": null,
"logBase": 1,
"max": null,
@ -10181,7 +10181,6 @@
"list": [
{
"current": {
"selected": true,
"text": "$datasource",
"value": "$datasource"
},
@ -10197,9 +10196,8 @@
{
"allValue": ".*",
"current": {
"selected": false,
"text": "testnet",
"value": "testnet"
"text": "Developer Testnet",
"value": "devnet"
},
"datasource": "$datasource",
"hide": 1,
@ -10210,7 +10208,7 @@
"options": [],
"query": "show databases",
"refresh": 1,
"regex": "testnet.*",
"regex": "(devnet|cluster|tds|mainnet-beta|testnet.*)",
"sort": 1,
"tagValuesQuery": "",
"tags": [],
@ -10269,7 +10267,7 @@
]
},
"timezone": "",
"title": "Testnet Monitor (edge)",
"uid": "testnet-edge",
"title": "Cluster Telemetry (edge)",
"uid": "monitor-edge",
"version": 2
}
}

View File

@ -34,7 +34,7 @@ source lib/config.sh
if [[ ! -f lib/grafana-provisioning ]]; then
cp -va grafana-provisioning lib
./adjust-dashboard-for-channel.py \
lib/grafana-provisioning/dashboards/testnet-monitor.json local
lib/grafana-provisioning/dashboards/cluster-monitor.json local
mkdir -p lib/grafana-provisioning/datasources
cat > lib/grafana-provisioning/datasources/datasource.yml <<EOF