From 300931b456983e77a76aabeb518618bf2f23f9e7 Mon Sep 17 00:00:00 2001 From: Alex Sharov Date: Wed, 15 Nov 2023 15:00:25 +0700 Subject: [PATCH] grafana board: fix cpu chart (#8733) --- cmd/prometheus/dashboards/erigon.json | 47 ++--- .../dashboards/erigon_internals.json | 186 +++++++++++++++--- docker-compose.yml | 4 +- 3 files changed, 177 insertions(+), 60 deletions(-) diff --git a/cmd/prometheus/dashboards/erigon.json b/cmd/prometheus/dashboards/erigon.json index c994303d0..ac97e232f 100644 --- a/cmd/prometheus/dashboards/erigon.json +++ b/cmd/prometheus/dashboards/erigon.json @@ -75,6 +75,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -184,6 +185,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -307,6 +309,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -355,7 +358,7 @@ "mean", "lastNotNull" ], - "displayMode": "table", + "displayMode": "list", "placement": "bottom", "showLegend": true }, @@ -370,25 +373,15 @@ "datasource": { "type": "prometheus" }, + "editorMode": "code", "exemplar": true, - "expr": "increase(process_cpu_seconds_system_total{instance=~\"$instance\"}[1m])", + "expr": "increase(process_cpu_seconds_total{instance=~\"$instance\"}[1m])", "format": "time_series", "interval": "", "intervalFactor": 1, - "legendFormat": "system: {{instance}}", + "legendFormat": "__auto", + "range": true, "refId": "A" - }, - { - "datasource": { - "type": "prometheus" - }, - "exemplar": true, - "expr": "increase(process_cpu_seconds_user_total{instance=~\"$instance\"}[1m])", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "iowait: {{instance}}", - "refId": "B" } ], "title": "CPU", @@ -418,6 +411,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -594,6 +588,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineStyle": { "fill": "solid" @@ -692,6 +687,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -813,6 +809,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -924,6 +921,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -1034,6 +1032,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -1184,8 +1183,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -1290,8 +1288,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -1385,8 +1382,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -1513,8 +1509,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -1757,10 +1752,10 @@ "current": { "selected": true, "text": [ - "mainnet2-1:6061" + "mumbai3-2:6061" ], "value": [ - "mainnet2-1:6061" + "mumbai3-2:6061" ] }, "datasource": { @@ -1894,6 +1889,6 @@ "timezone": "", "title": "Erigon", "uid": "FPpjH6Hik", - "version": 3, + "version": 7, "weekStart": "" } \ No newline at end of file diff --git a/cmd/prometheus/dashboards/erigon_internals.json b/cmd/prometheus/dashboards/erigon_internals.json index df8bcf8cf..e2a279cec 100644 --- a/cmd/prometheus/dashboards/erigon_internals.json +++ b/cmd/prometheus/dashboards/erigon_internals.json @@ -73,6 +73,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineStyle": { "fill": "solid" @@ -171,6 +172,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -270,6 +272,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -370,6 +373,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -513,6 +517,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -628,6 +633,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -726,6 +732,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineStyle": { "fill": "solid" @@ -761,7 +768,32 @@ }, "unit": "ops" }, - "overrides": [] + "overrides": [ + { + "__systemRef": "hideSeriesFrom", + "matcher": { + "id": "byNames", + "options": { + "mode": "exclude", + "names": [ + "keys committed: mainnet-dev-awskii:6061" + ], + "prefix": "All except:", + "readOnly": true + } + }, + "properties": [ + { + "id": "custom.hideFrom", + "value": { + "legend": false, + "tooltip": false, + "viz": true + } + } + ] + } + ] }, "gridPos": { "h": 5, @@ -811,7 +843,7 @@ "type": "prometheus" }, "editorMode": "code", - "expr": "irate(domain_commitment_keys{instance=~\"$instance\"}[$rate_interval])", + "expr": "sum(rate(domain_commitment_keys[$rate_interval])) by (instance)", "hide": false, "legendFormat": "keys committed: {{instance}}", "range": true, @@ -877,6 +909,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "smooth", "lineWidth": 1, "pointSize": 5, @@ -972,6 +1005,30 @@ "legendFormat": "running commitment: {{instance}}", "range": true, "refId": "D" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "expr": "domain_running_files_building{instance=~\"$instance\"}", + "hide": false, + "instant": false, + "legendFormat": "running files building: {{instance}}", + "range": true, + "refId": "E" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "expr": "domain_wal_flushes{instance=~\"$instance\"}", + "hide": false, + "instant": false, + "legendFormat": "WAL flushes {{instance}}", + "range": true, + "refId": "F" } ], "title": "Running Collations / Merges / Prunes", @@ -1024,6 +1081,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -1120,6 +1178,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 2, @@ -1372,6 +1431,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -1475,6 +1535,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -1496,7 +1557,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", @@ -1737,6 +1799,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -1758,7 +1821,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", @@ -1843,6 +1907,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -1984,6 +2049,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -2086,6 +2152,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -2379,7 +2446,7 @@ }, "textMode": "auto" }, - "pluginVersion": "10.0.3", + "pluginVersion": "10.1.4", "targets": [ { "datasource": { @@ -2548,6 +2615,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -2659,6 +2727,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -2754,6 +2823,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -2860,6 +2930,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -2964,6 +3035,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -3135,6 +3207,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -3229,6 +3302,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -3386,6 +3460,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -3497,6 +3572,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -3556,25 +3632,15 @@ "datasource": { "type": "prometheus" }, + "editorMode": "code", "exemplar": true, - "expr": "increase(process_cpu_seconds_system_total{instance=~\"$instance\"}[1m])", + "expr": "increase(process_cpu_seconds_total{instance=~\"$instance\"}[1m])", "format": "time_series", "interval": "", "intervalFactor": 1, "legendFormat": "system: {{instance}}", + "range": true, "refId": "A" - }, - { - "datasource": { - "type": "prometheus" - }, - "exemplar": true, - "expr": "increase(process_cpu_seconds_user_total{instance=~\"$instance\"}[1m])", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "iowait: {{instance}}", - "refId": "B" } ], "title": "CPU", @@ -3627,6 +3693,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -3776,6 +3843,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -3875,6 +3943,19 @@ "interval": "", "legendFormat": "pool_write_to_db_count: {{ instance }}", "refId": "D" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(pool_p2p_out{instance=~\"$instance\"}[$rate_interval])", + "hide": false, + "interval": "", + "legendFormat": "__auto", + "range": true, + "refId": "E" } ], "title": "RPS", @@ -3904,6 +3985,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -3997,6 +4079,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -4101,6 +4184,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -4206,6 +4290,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -4324,6 +4409,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -4429,6 +4515,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -4523,6 +4610,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -4617,6 +4705,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -4718,6 +4807,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -4845,6 +4935,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -4975,6 +5066,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -5006,10 +5098,35 @@ }, "unit": "Bps" }, - "overrides": [] + "overrides": [ + { + "__systemRef": "hideSeriesFrom", + "matcher": { + "id": "byNames", + "options": { + "mode": "exclude", + "names": [ + "egress: mainnet2-1:6061" + ], + "prefix": "All except:", + "readOnly": true + } + }, + "properties": [ + { + "id": "custom.hideFrom", + "value": { + "legend": false, + "tooltip": false, + "viz": true + } + } + ] + } + ] }, "gridPos": { - "h": 6, + "h": 9, "w": 12, "x": 0, "y": 126 @@ -5024,7 +5141,7 @@ "max", "min" ], - "displayMode": "table", + "displayMode": "list", "placement": "bottom", "showLegend": true }, @@ -5039,25 +5156,29 @@ "datasource": { "type": "prometheus" }, + "editorMode": "code", "exemplar": true, "expr": "rate(p2p_ingress{instance=~\"$instance\"}[$rate_interval])", "format": "time_series", "interval": "", "intervalFactor": 1, "legendFormat": "ingress: {{instance}}", + "range": true, "refId": "B" }, { "datasource": { "type": "prometheus" }, + "editorMode": "code", "exemplar": true, "expr": "rate(p2p_egress{instance=~\"$instance\"}[$rate_interval])", "format": "time_series", - "hide": true, + "hide": false, "interval": "", "intervalFactor": 1, "legendFormat": "egress: {{instance}}", + "range": true, "refId": "C" } ], @@ -5087,6 +5208,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -5121,7 +5243,7 @@ "overrides": [] }, "gridPos": { - "h": 6, + "h": 9, "w": 12, "x": 12, "y": 126 @@ -5136,7 +5258,7 @@ "max", "min" ], - "displayMode": "table", + "displayMode": "list", "placement": "bottom", "showLegend": true }, @@ -5185,7 +5307,7 @@ "type": "timeseries" } ], - "refresh": "30s", + "refresh": "", "revision": 1, "schemaVersion": 38, "style": "dark", @@ -5248,10 +5370,10 @@ "current": { "selected": true, "text": [ - "All" + "mainnet-dev-awskii:6061" ], "value": [ - "$__all" + "mainnet-dev-awskii:6061" ] }, "datasource": { @@ -5283,20 +5405,20 @@ "auto_min": "10s", "current": { "selected": false, - "text": "10m", - "value": "10m" + "text": "1m", + "value": "1m" }, "hide": 0, "label": "Rate Interval", "name": "rate_interval", "options": [ { - "selected": false, + "selected": true, "text": "1m", "value": "1m" }, { - "selected": true, + "selected": false, "text": "10m", "value": "10m" }, @@ -5385,6 +5507,6 @@ "timezone": "", "title": "Erigon Internals", "uid": "b42a61d7-02b1-416c-8ab4-b9c864356174", - "version": 5, + "version": 14, "weekStart": "" } \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 287099809..e1a5be919 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -72,7 +72,7 @@ services: prometheus: - image: prom/prometheus:v2.47.0 + image: prom/prometheus:v2.47.2 user: ${DOCKER_UID:-1000}:${DOCKER_GID:-1000} # Uses erigon user from Dockerfile command: --log.level=warn --config.file=/etc/prometheus/prometheus.yml --storage.tsdb.path=/prometheus --storage.tsdb.retention.time=150d --web.console.libraries=/usr/share/prometheus/console_libraries --web.console.templates=/usr/share/prometheus/consoles ports: [ "9090:9090" ] @@ -82,7 +82,7 @@ services: restart: unless-stopped grafana: - image: grafana/grafana:10.1.2 + image: grafana/grafana:10.2.1 user: "472:0" # required for grafana version >= 7.3 ports: [ "3000:3000" ] volumes: