feat: database metrics (#1870)

This commit is contained in:
Bjerg
2023-03-20 21:50:32 +01:00
committed by GitHub
parent c110ede505
commit aaf73fd679
6 changed files with 405 additions and 54 deletions

View File

@ -35,6 +35,12 @@
"name": "Heatmap",
"version": ""
},
{
"type": "panel",
"id": "piechart",
"name": "Pie chart",
"version": ""
},
{
"type": "datasource",
"id": "prometheus",
@ -509,13 +515,248 @@
"title": "Commit time heatmap",
"type": "heatmap"
},
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"description": "The size of tables in the database",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
}
},
"mappings": [],
"unit": "bytes"
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 17
},
"id": 48,
"options": {
"displayLabels": [
"name"
],
"legend": {
"displayMode": "table",
"placement": "right",
"showLegend": true,
"values": [
"value"
]
},
"pieType": "pie",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "9.3.6",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "builder",
"expr": "reth_db_table_size",
"interval": "",
"legendFormat": "{{table}}",
"range": true,
"refId": "A"
}
],
"title": "Database tables",
"type": "piechart"
},
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"description": "The size of the database over time",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "bytes"
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 17
},
"id": 52,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "sum by (job) ( reth_db_table_size )",
"legendFormat": "Size ({{job}})",
"range": true,
"refId": "A"
}
],
"title": "Database growth",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"description": "The type of the pages in the database:\n\n- **Leaf** pages contain KV pairs.\n- **Branch** pages contain information about keys in the leaf pages\n- **Overflow** pages store large values and should generally be avoided if possible",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
}
},
"mappings": [],
"unit": "short"
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 25
},
"id": 50,
"options": {
"legend": {
"displayMode": "table",
"placement": "right",
"showLegend": true,
"values": [
"value"
]
},
"pieType": "pie",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "builder",
"expr": "sum by (type) ( reth_db_table_pages )",
"legendFormat": "__auto",
"range": true,
"refId": "A"
}
],
"title": "Database pages",
"type": "piechart"
},
{
"collapsed": false,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 17
"y": 33
},
"id": 46,
"panels": [],
@ -581,7 +822,7 @@
"h": 8,
"w": 12,
"x": 0,
"y": 18
"y": 34
},
"id": 44,
"options": {
@ -618,7 +859,7 @@
"h": 1,
"w": 24,
"x": 0,
"y": 26
"y": 42
},
"id": 6,
"panels": [],
@ -687,7 +928,7 @@
"h": 8,
"w": 8,
"x": 0,
"y": 27
"y": 43
},
"id": 18,
"options": {
@ -780,7 +1021,7 @@
"h": 8,
"w": 8,
"x": 8,
"y": 27
"y": 43
},
"id": 16,
"options": {
@ -898,7 +1139,7 @@
"h": 8,
"w": 8,
"x": 16,
"y": 27
"y": 43
},
"id": 8,
"options": {
@ -959,7 +1200,7 @@
"h": 1,
"w": 24,
"x": 0,
"y": 35
"y": 51
},
"id": 24,
"panels": [],
@ -1011,7 +1252,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@ -1051,7 +1293,7 @@
"h": 8,
"w": 12,
"x": 0,
"y": 36
"y": 52
},
"id": 26,
"options": {
@ -1165,7 +1407,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@ -1180,7 +1423,7 @@
"h": 8,
"w": 12,
"x": 12,
"y": 36
"y": 52
},
"id": 33,
"options": {
@ -1281,7 +1524,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@ -1296,7 +1540,7 @@
"h": 8,
"w": 12,
"x": 0,
"y": 44
"y": 60
},
"id": 36,
"options": {
@ -1345,7 +1589,7 @@
"h": 1,
"w": 24,
"x": 0,
"y": 52
"y": 68
},
"id": 32,
"panels": [],
@ -1398,7 +1642,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@ -1438,7 +1683,7 @@
"h": 8,
"w": 12,
"x": 0,
"y": 53
"y": 69
},
"id": 30,
"options": {
@ -1564,7 +1809,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
}
]
}
@ -1575,7 +1821,7 @@
"h": 8,
"w": 12,
"x": 12,
"y": 53
"y": 69
},
"id": 28,
"options": {
@ -1655,7 +1901,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@ -1670,7 +1917,7 @@
"h": 8,
"w": 12,
"x": 0,
"y": 61
"y": 77
},
"id": 35,
"options": {
@ -1722,13 +1969,13 @@
"list": []
},
"time": {
"from": "now-6h",
"from": "now-1h",
"to": "now"
},
"timepicker": {},
"timezone": "",
"title": "reth",
"uid": "2k8BXz24k",
"version": 2,
"version": 5,
"weekStart": ""
}