From 6a6c03f279fb17791153222063b9c3fd59773133 Mon Sep 17 00:00:00 2001 From: achingbrain Date: Mon, 30 Sep 2024 15:43:31 +0100 Subject: [PATCH] chore: update config --- config/grafana/dashboards/main-dashboard.json | 2001 ++++++++++++++--- config/prometheus/prometheus.yml | 4 +- 2 files changed, 1694 insertions(+), 311 deletions(-) diff --git a/config/grafana/dashboards/main-dashboard.json b/config/grafana/dashboards/main-dashboard.json index 4141ead..f8b7fe7 100755 --- a/config/grafana/dashboards/main-dashboard.json +++ b/config/grafana/dashboards/main-dashboard.json @@ -7,24 +7,16 @@ "type": "datasource", "pluginId": "prometheus", "pluginName": "Prometheus" - }, - { - "name": "VAR_HEATMAP_BUCKETS", - "type": "constant", - "label": "heatmap_buckets", - "value": "10", - "description": "" - }, - { - "name": "VAR_AXISWIDTH", - "type": "constant", - "label": "axisWidth", - "value": "200", - "description": "" } ], "__elements": {}, "__requires": [ + { + "type": "panel", + "id": "gauge", + "name": "Gauge", + "version": "" + }, { "type": "grafana", "id": "grafana", @@ -142,7 +134,7 @@ }, "editorMode": "code", "exemplar": false, - "expr": "time() - process_start_time_seconds{job=\"js-libp2p\", instance=\"libp2p-bootstrap-js\"}", + "expr": "time() - process_start_time_seconds{job=\"$job\", instance=\"$instance\"}", "format": "time_series", "hide": false, "instant": false, @@ -158,6 +150,320 @@ "title": "Uptime", "type": "stat" }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "green", + "mode": "fixed" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 9, + "x": 3, + "y": 0 + }, + "id": 46, + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "name", + "wideLayout": true + }, + "pluginVersion": "11.2.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "libp2p_versions{job=\"$job\", instance=\"$instance\"}", + "format": "time_series", + "hide": false, + "instant": true, + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{libp2p_versions}}", + "metric": "", + "range": false, + "refId": "A", + "step": 1800 + } + ], + "title": "Versions", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "Busy state of all CPU cores together", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 1, + "mappings": [], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "orange", + "value": 85 + }, + { + "color": "red", + "value": 95 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 4, + "x": 12, + "y": 0 + }, + "id": 49, + "options": { + "minVizHeight": 75, + "minVizWidth": 75, + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true, + "sizing": "auto" + }, + "pluginVersion": "11.2.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "rate(process_cpu_user_seconds_total{instance=\"$instance\", job=\"$job\"}[$__rate_interval]) * 100", + "instant": true, + "legendFormat": "", + "range": false, + "refId": "A" + } + ], + "title": "CPU", + "type": "gauge" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "Non available RAM memory", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 1, + "mappings": [], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "orange", + "value": 85 + }, + { + "color": "red", + "value": 95 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 4, + "x": 16, + "y": 0 + }, + "id": 50, + "options": { + "minVizHeight": 75, + "minVizWidth": 75, + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true, + "sizing": "auto" + }, + "pluginVersion": "11.2.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "(process_resident_memory_bytes{instance=\"$instance\", job=\"$job\"} / nodejs_memory_total_bytes{instance=\"$instance\", job=\"$job\"}) * 100", + "hide": false, + "instant": false, + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "title": "Memory", + "type": "gauge" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "Used Root FS", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 1, + "mappings": [], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "orange", + "value": 85 + }, + { + "color": "red", + "value": 95 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 4, + "x": 20, + "y": 0 + }, + "id": 51, + "options": { + "minVizHeight": 75, + "minVizWidth": 75, + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true, + "sizing": "auto" + }, + "pluginVersion": "11.2.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "nodejs_fs_usage_bytes{instance=\"$instance\", job=\"$job\", filesystem=\"used\"}", + "hide": false, + "instant": false, + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "title": "Storage", + "type": "gauge" + }, { "collapsed": false, "gridPos": { @@ -234,7 +540,933 @@ "x": 0, "y": 6 }, - "id": 27, + "id": 27, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "11.2.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "libp2p_connection_manager_connections{job=\"$job\", instance=\"$instance\"}", + "format": "time_series", + "instant": false, + "legendFormat": "{{libp2p_connection_manager_connections}}", + "range": true, + "refId": "A" + } + ], + "title": "Connections", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": 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 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 6 + }, + "id": 39, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "libp2p_connection_transports_total{job=\"$job\", instance=\"$instance\"}", + "instant": false, + "legendFormat": "{{libp2p_connection_transports_total}}", + "range": true, + "refId": "A" + } + ], + "title": "Transports", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": 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 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 14 + }, + "id": 6, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "disableTextWrap": false, + "editorMode": "code", + "expr": "libp2p_dial_queue{job=\"$job\", instance=\"$instance\"}", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "{{libp2p_dial_queue}}", + "range": true, + "refId": "A", + "useBackend": false + } + ], + "title": "Dial queue", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": 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 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 14 + }, + "id": 40, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rate(libp2p_connection_manager_dials_total{job=\"$job\", instance=\"$instance\"}[$__rate_interval])", + "instant": false, + "legendFormat": "{{libp2p_connection_manager_dials_total}}", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rate(libp2p_connection_manager_dial_errors_total{job=\"$job\", instance=\"$instance\"}[$__rate_interval])", + "hide": false, + "instant": false, + "legendFormat": "{{libp2p_connection_manager_dial_errors_total}} (error)", + "range": true, + "refId": "B" + } + ], + "title": "Dial results", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": 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 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 22 + }, + "id": 47, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "disableTextWrap": false, + "editorMode": "code", + "expr": "libp2p_connection_encrypters_total{job=\"$job\", instance=\"$instance\"}", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "{{libp2p_connection_encrypters_total}}", + "range": true, + "refId": "A", + "useBackend": false + } + ], + "title": "Encrypters", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": 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 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 22 + }, + "id": 48, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "disableTextWrap": false, + "editorMode": "code", + "expr": "libp2p_connection_multiplexers_total{job=\"$job\", instance=\"$instance\"}", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "{{libp2p_connection_multiplexers_total}}", + "range": true, + "refId": "A", + "useBackend": false + } + ], + "title": "Multiplexers", + "type": "timeseries" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 30 + }, + "id": 38, + "panels": [], + "title": "Streams", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "fieldMinMax": false, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 31 + }, + "id": 28, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "11.2.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "libp2p_protocol_streams_total{job=\"$job\", instance=\"$instance\"}", + "format": "time_series", + "instant": false, + "legendFormat": "{{protocol}}", + "range": true, + "refId": "A" + } + ], + "title": "Streams", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": 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 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 31 + }, + "id": 23, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "11.2.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "disableTextWrap": false, + "editorMode": "code", + "expr": "rate(libp2p_data_transfer_bytes_total{job=\"$job\", instance=\"$instance\", protocol!~\"global received\", protocol=~\".* received\"}[$__interval])", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "{{protocol}}", + "range": true, + "refId": "A", + "useBackend": false + } + ], + "title": "Bytes received by protocol", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": 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": 0, + "y": 39 + }, + "id": 20, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "disableTextWrap": false, + "editorMode": "code", + "expr": "label_replace(\n rate(libp2p_data_transfer_bytes_total{job=\"$job\", instance=\"$instance\", protocol!~\"global sent\", protocol=~\".* sent\"}[$__interval]),\n \"protocol\",\n \"$1\",\n \"protocol\",\n \"(.*) sent\"\n)", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "{{protocol}}", + "range": true, + "refId": "A", + "useBackend": false + } + ], + "title": "Bytes sent by protocol", + "type": "timeseries" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 47 + }, + "id": 35, + "panels": [], + "title": "WebSockets Transport", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": 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 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 48 + }, + "id": 34, "options": { "legend": { "calcs": [], @@ -247,23 +1479,25 @@ "sort": "none" } }, - "pluginVersion": "11.2.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, + "disableTextWrap": false, "editorMode": "code", - "expr": "libp2p_connection_manager_connections{}", - "format": "time_series", + "expr": "rate(libp2p_websockets_listener_events_total{instance=\"$instance\", job=\"$job\"}[$__rate_interval])", + "fullMetaSearch": false, + "includeNullMetadata": true, "instant": false, - "legendFormat": "{{libp2p_connection_manager_connections}}", + "legendFormat": "{{address}}", "range": true, - "refId": "A" + "refId": "A", + "useBackend": false } ], - "title": "Connections", + "title": "Listener events", "type": "timeseries" }, { @@ -330,9 +1564,9 @@ "h": 8, "w": 12, "x": 12, - "y": 6 + "y": 48 }, - "id": 39, + "id": 33, "options": { "legend": { "calcs": [], @@ -351,17 +1585,34 @@ "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, + "disableTextWrap": false, "editorMode": "code", - "expr": "libp2p_connection_transports_total", - "instant": false, - "legendFormat": "{{libp2p_connection_transports_total}}", + "expr": "rate(libp2p_websockets_dialer_events_total{job=\"$job\", instance=\"$instance\"}[$__rate_interval])", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": true, + "legendFormat": "{{event}}", "range": true, - "refId": "A" + "refId": "A", + "useBackend": false } ], - "title": "Connections by transport", + "title": "Dialer events", "type": "timeseries" }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 56 + }, + "id": 30, + "panels": [], + "title": "TCP Transport", + "type": "row" + }, { "datasource": { "type": "prometheus", @@ -426,9 +1677,9 @@ "h": 8, "w": 12, "x": 0, - "y": 14 + "y": 57 }, - "id": 6, + "id": 29, "options": { "legend": { "calcs": [], @@ -448,18 +1699,19 @@ "uid": "${DS_PROMETHEUS}" }, "disableTextWrap": false, - "editorMode": "builder", - "expr": "libp2p_dial_queue", + "editorMode": "code", + "exemplar": false, + "expr": "rate(libp2p_tcp_listener_events_total{job=\"$job\", instance=\"$instance\"}[$__rate_interval])", "fullMetaSearch": false, "includeNullMetadata": true, "instant": false, - "legendFormat": "{{libp2p_dial_queue}}", + "legendFormat": "{{address}}", "range": true, "refId": "A", "useBackend": false } ], - "title": "Dial queue size", + "title": "Listener events", "type": "timeseries" }, { @@ -526,9 +1778,9 @@ "h": 8, "w": 12, "x": 12, - "y": 14 + "y": 57 }, - "id": 40, + "id": 54, "options": { "legend": { "calcs": [], @@ -547,28 +1799,19 @@ "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, + "disableTextWrap": false, "editorMode": "code", - "expr": "rate(libp2p_connection_manager_dials_total[$__rate_interval])", - "instant": false, - "legendFormat": "{{libp2p_connection_manager_dials_total}}", - "range": true, - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "expr": "rate(libp2p_connection_manager_dial_errors_total[$__rate_interval])", - "hide": false, + "expr": "rate(libp2p_tcp_listener_errors_total{instance=\"$instance\", job=\"$job\"}[$__rate_interval])", + "fullMetaSearch": false, + "includeNullMetadata": true, "instant": false, - "legendFormat": "{{libp2p_connection_manager_dial_errors_total}} (error)", + "legendFormat": "{{address}}", "range": true, - "refId": "B" + "refId": "A", + "useBackend": false } ], - "title": "Dial results", + "title": "Listener Errors", "type": "timeseries" }, { @@ -635,9 +1878,9 @@ "h": 8, "w": 12, "x": 0, - "y": 22 + "y": 65 }, - "id": 41, + "id": 1, "options": { "legend": { "calcs": [], @@ -656,30 +1899,21 @@ "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, + "disableTextWrap": false, "editorMode": "code", - "expr": "libp2p_peer_agents_total", + "expr": "rate(libp2p_tcp_dialer_events_total{job=\"$job\", instance=\"$instance\"}[$__rate_interval])", + "fullMetaSearch": false, + "includeNullMetadata": false, "instant": false, - "legendFormat": "{{libp2p_peer_agents_total}}", + "legendFormat": "{{event}}", "range": true, - "refId": "A" + "refId": "A", + "useBackend": false } ], - "title": "Peer agents", + "title": "Dialer events", "type": "timeseries" }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 30 - }, - "id": 38, - "panels": [], - "title": "Streams", - "type": "row" - }, { "datasource": { "type": "prometheus", @@ -723,7 +1957,6 @@ "mode": "off" } }, - "fieldMinMax": false, "mappings": [], "thresholds": { "mode": "absolute", @@ -731,6 +1964,10 @@ { "color": "green", "value": null + }, + { + "color": "red", + "value": 80 } ] } @@ -740,10 +1977,10 @@ "gridPos": { "h": 8, "w": 12, - "x": 0, - "y": 31 + "x": 12, + "y": 65 }, - "id": 28, + "id": 57, "options": { "legend": { "calcs": [], @@ -756,23 +1993,25 @@ "sort": "none" } }, - "pluginVersion": "11.2.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, + "disableTextWrap": false, "editorMode": "code", - "expr": "libp2p_protocol_streams_total{}", - "format": "time_series", + "expr": "rate(libp2p_tcp_dialer_errors_total{instance=\"$instance\", job=\"$job\"}[$__rate_interval])", + "fullMetaSearch": false, + "includeNullMetadata": true, "instant": false, - "legendFormat": "{{protocol}}", + "legendFormat": "{{event}}", "range": true, - "refId": "A" + "refId": "A", + "useBackend": false } ], - "title": "Streams", + "title": "Dialer errors", "type": "timeseries" }, { @@ -780,6 +2019,7 @@ "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, + "description": "The TCP listener will temporarily shut itself down if maxConnections is reached", "fieldConfig": { "defaults": { "color": { @@ -818,7 +2058,34 @@ "mode": "off" } }, - "mappings": [], + "decimals": 0, + "mappings": [ + { + "options": { + "0": { + "color": "red", + "index": 1, + "text": "Down" + }, + "1": { + "color": "green", + "index": 2, + "text": "Up" + }, + "2": { + "index": 3, + "text": "-" + }, + "-1": { + "index": 0, + "text": "-" + } + }, + "type": "value" + } + ], + "max": 2, + "min": -1, "thresholds": { "mode": "absolute", "steps": [ @@ -838,10 +2105,10 @@ "gridPos": { "h": 8, "w": 12, - "x": 12, - "y": 31 + "x": 0, + "y": 73 }, - "id": 23, + "id": 53, "options": { "legend": { "calcs": [], @@ -854,7 +2121,6 @@ "sort": "none" } }, - "pluginVersion": "11.2.0", "targets": [ { "datasource": { @@ -863,19 +2129,32 @@ }, "disableTextWrap": false, "editorMode": "code", - "expr": "rate(libp2p_data_transfer_bytes_total{protocol!~\"global received\", protocol=~\".* received\"}[$__interval])", + "expr": "libp2p_tcp_listener_status_info{instance=\"$instance\", job=\"$job\"}", "fullMetaSearch": false, "includeNullMetadata": true, "instant": false, - "legendFormat": "{{protocol}}", + "legendFormat": "{{address}}", "range": true, "refId": "A", "useBackend": false } ], - "title": "Bytes received by protocol", + "title": "Listening", "type": "timeseries" }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 81 + }, + "id": 32, + "panels": [], + "title": "Kad-DHT", + "type": "row" + }, { "datasource": { "type": "prometheus", @@ -932,8 +2211,7 @@ "value": 80 } ] - }, - "unit": "bytes" + } }, "overrides": [] }, @@ -941,9 +2219,9 @@ "h": 8, "w": 12, "x": 0, - "y": 39 + "y": 82 }, - "id": 20, + "id": 19, "options": { "legend": { "calcs": [], @@ -956,6 +2234,7 @@ "sort": "none" } }, + "pluginVersion": "11.2.0", "targets": [ { "datasource": { @@ -964,37 +2243,38 @@ }, "disableTextWrap": false, "editorMode": "code", - "expr": "label_replace(\n rate(libp2p_data_transfer_bytes_total{protocol!~\"global sent\", protocol=~\".* sent\"}[$__interval]),\n \"protocol\",\n \"$1\",\n \"protocol\",\n \"(.*) sent\"\n)", + "expr": "rate(libp2p_kad_dht_queries_total{job=\"$job\", instance=\"$instance\"}[$__rate_interval])", "fullMetaSearch": false, "includeNullMetadata": true, "instant": false, - "legendFormat": "{{protocol}}", + "legendFormat": "query", "range": true, "refId": "A", "useBackend": false + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rate(libp2p_kad_dht_query_errors_total{job=\"$job\", instance=\"$instance\"}[$__rate_interval])", + "hide": false, + "instant": false, + "legendFormat": "error", + "range": true, + "refId": "B" } ], - "title": "Bytes sent by protocol", + "title": "Running queries", "type": "timeseries" }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 47 - }, - "id": 35, - "panels": [], - "title": "WebSockets Transport", - "type": "row" - }, { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, + "description": "", "fieldConfig": { "defaults": { "color": { @@ -1046,17 +2326,18 @@ "value": 80 } ] - } + }, + "unit": "s" }, "overrides": [] }, "gridPos": { "h": 8, "w": 12, - "x": 0, - "y": 48 + "x": 12, + "y": 82 }, - "id": 34, + "id": 12, "options": { "legend": { "calcs": [], @@ -1069,6 +2350,7 @@ "sort": "none" } }, + "pluginVersion": "10.4.1", "targets": [ { "datasource": { @@ -1077,17 +2359,19 @@ }, "disableTextWrap": false, "editorMode": "code", - "expr": "rate(libp2p_websockets_listener_events_total[$__rate_interval])", + "expr": "libp2p_kad_dht_query_time_seconds{job=\"$job\", instance=\"$instance\"}", + "format": "time_series", "fullMetaSearch": false, + "hide": false, "includeNullMetadata": true, "instant": false, - "legendFormat": "{{address}}", + "legendFormat": "{{__name__}}", "range": true, - "refId": "A", + "refId": "B", "useBackend": false } ], - "title": "Listener events", + "title": "Query seconds", "type": "timeseries" }, { @@ -1153,10 +2437,10 @@ "gridPos": { "h": 8, "w": 12, - "x": 12, - "y": 48 + "x": 0, + "y": 90 }, - "id": 33, + "id": 58, "options": { "legend": { "calcs": [], @@ -1175,34 +2459,30 @@ "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, - "disableTextWrap": false, "editorMode": "code", - "expr": "rate(libp2p_websockets_dialer_events_total[$__rate_interval])", - "fullMetaSearch": false, - "includeNullMetadata": true, - "instant": true, - "legendFormat": "{{event}}", + "expr": "rate(libp2p_kad_dht_outbound_rpc_requests_total{job=\"$job\", instance=\"$instance\"}[$__rate_interval])", + "instant": false, + "legendFormat": "{{libp2p_kad_dht_outbound_rpc_requests_total}}", "range": true, - "refId": "A", - "useBackend": false + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rate(libp2p_kad_dht_outbound_rpc_errors_total{job=\"$job\", instance=\"$instance\"}[$__rate_interval])", + "hide": false, + "instant": false, + "legendFormat": "{{libp2p_kad_dht_outbound_rpc_errors_total}} (error)", + "range": true, + "refId": "B" } ], - "title": "Dialer events", + "title": "Outbound RPC requests", "type": "timeseries" }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 56 - }, - "id": 30, - "panels": [], - "title": "TCP Transport", - "type": "row" - }, { "datasource": { "type": "prometheus", @@ -1266,10 +2546,10 @@ "gridPos": { "h": 8, "w": 12, - "x": 0, - "y": 57 + "x": 12, + "y": 90 }, - "id": 29, + "id": 42, "options": { "legend": { "calcs": [], @@ -1288,20 +2568,28 @@ "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, - "disableTextWrap": false, "editorMode": "code", - "exemplar": false, - "expr": "rate(libp2p_tcp_listener_events_total[$__rate_interval])", - "fullMetaSearch": false, - "includeNullMetadata": true, + "expr": "rate(libp2p_kad_dht_inbound_rpc_requests_total{job=\"$job\", instance=\"$instance\"}[$__rate_interval])", + "instant": false, + "legendFormat": "{{libp2p_kad_dht_inbound_rpc_requests_total}}", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rate(libp2p_kad_dht_inbound_rpc_errors_total{job=\"$job\", instance=\"$instance\"}[$__rate_interval])", + "hide": false, "instant": false, - "legendFormat": "{{address}}", + "legendFormat": "{{libp2p_kad_dht_inbound_rpc_errors_total}} (error)", "range": true, - "refId": "A", - "useBackend": false + "refId": "B" } ], - "title": "Listener events", + "title": "Inbound RPC requests", "type": "timeseries" }, { @@ -1367,10 +2655,10 @@ "gridPos": { "h": 8, "w": 12, - "x": 12, - "y": 57 + "x": 0, + "y": 98 }, - "id": 1, + "id": 11, "options": { "legend": { "calcs": [], @@ -1383,6 +2671,7 @@ "sort": "none" } }, + "pluginVersion": "10.4.1", "targets": [ { "datasource": { @@ -1391,32 +2680,19 @@ }, "disableTextWrap": false, "editorMode": "code", - "expr": "rate(libp2p_tcp_dialer_events_total[$__rate_interval])", + "expr": "libp2p_kad_dht_ping_queue{job=\"$job\", instance=\"$instance\"}", "fullMetaSearch": false, - "includeNullMetadata": false, - "instant": true, - "legendFormat": "{{event}}", + "includeNullMetadata": true, + "instant": false, + "legendFormat": "{{libp2p_kad_dht_ping_queue}}", "range": true, "refId": "A", "useBackend": false } ], - "title": "Dialer events", + "title": "Ping queue", "type": "timeseries" }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 65 - }, - "id": 32, - "panels": [], - "title": "Kad-DHT", - "type": "row" - }, { "datasource": { "type": "prometheus", @@ -1480,10 +2756,10 @@ "gridPos": { "h": 8, "w": 12, - "x": 0, - "y": 66 + "x": 12, + "y": 98 }, - "id": 19, + "id": 56, "options": { "legend": { "calcs": [], @@ -1496,7 +2772,6 @@ "sort": "none" } }, - "pluginVersion": "11.2.0", "targets": [ { "datasource": { @@ -1505,17 +2780,17 @@ }, "disableTextWrap": false, "editorMode": "code", - "expr": "libp2p_kad_dht_running_queries", + "expr": "rate(libp2p_kad_dht_kad_bucket_events{instance=\"$instance\", job=\"$job\"}[$__rate_interval])", "fullMetaSearch": false, "includeNullMetadata": true, "instant": false, - "legendFormat": "__auto", + "legendFormat": "{{libp2p_kad_dht_kad_bucket_events}}", "range": true, "refId": "A", "useBackend": false } ], - "title": "Running queries", + "title": "Bucket events", "type": "timeseries" }, { @@ -1523,7 +2798,6 @@ "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, - "description": "", "fieldConfig": { "defaults": { "color": { @@ -1575,18 +2849,17 @@ "value": 80 } ] - }, - "unit": "s" + } }, "overrides": [] }, "gridPos": { "h": 8, "w": 12, - "x": 12, - "y": 66 + "x": 0, + "y": 106 }, - "id": 12, + "id": 55, "options": { "legend": { "calcs": [], @@ -1599,7 +2872,6 @@ "sort": "none" } }, - "pluginVersion": "10.4.1", "targets": [ { "datasource": { @@ -1608,13 +2880,29 @@ }, "disableTextWrap": false, "editorMode": "code", - "expr": "libp2p_kad_dht_query_time_seconds", - "format": "time_series", + "expr": "libp2p_kad_dht_routing_table_size{job=\"$job\", instance=\"$instance\"}", "fullMetaSearch": false, "hide": false, "includeNullMetadata": true, "instant": false, - "legendFormat": "{{__name__}}", + "legendFormat": "peer count", + "range": true, + "refId": "A", + "useBackend": false + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "disableTextWrap": false, + "editorMode": "code", + "expr": "libp2p_kad_dht_routing_table_kad_bucket_total{job=\"$job\", instance=\"$instance\"}", + "fullMetaSearch": false, + "hide": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "bucket count", "range": true, "refId": "B", "useBackend": false @@ -1625,21 +2913,51 @@ "uid": "${DS_PROMETHEUS}" }, "disableTextWrap": false, - "editorMode": "builder", - "expr": "libp2p_kad_dht_query_time:1m_range", + "editorMode": "code", + "expr": "libp2p_kad_dht_routing_table_kad_bucket_max_depth{job=\"$job\", instance=\"$instance\"}", "fullMetaSearch": false, - "hide": true, + "hide": false, "includeNullMetadata": true, "instant": false, - "legendFormat": "1min \"bucket\"", + "legendFormat": "max depth", "range": true, "refId": "C", "useBackend": false + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "disableTextWrap": false, + "editorMode": "code", + "expr": "libp2p_kad_dht_routing_table_kad_bucket_average_occupancy{job=\"$job\", instance=\"$instance\"}", + "fullMetaSearch": false, + "hide": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "average occupancy", + "range": true, + "refId": "D", + "useBackend": false } ], - "title": "Query seconds", + "title": "Routing table", "type": "timeseries" }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 114 + }, + "id": 43, + "panels": [], + "title": "Circuit Relay Server", + "type": "row" + }, { "datasource": { "type": "prometheus", @@ -1704,9 +3022,9 @@ "h": 8, "w": 12, "x": 0, - "y": 74 + "y": 115 }, - "id": 11, + "id": 44, "options": { "legend": { "calcs": [], @@ -1719,7 +3037,6 @@ "sort": "none" } }, - "pluginVersion": "10.4.1", "targets": [ { "datasource": { @@ -1728,19 +3045,32 @@ }, "disableTextWrap": false, "editorMode": "code", - "expr": "libp2p_kad_dht_ping_queue", + "expr": "libp2p_circuit_relay_server_reservations_total{job=\"$job\", instance=\"$instance\"}", "fullMetaSearch": false, "includeNullMetadata": true, "instant": false, - "legendFormat": "{{libp2p_kad_dht_ping_queue}}", + "legendFormat": "reservations", "range": true, "refId": "A", "useBackend": false } ], - "title": "Ping queue", + "title": "Reservations", "type": "timeseries" }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 123 + }, + "id": 26, + "panels": [], + "title": "NodeJS", + "type": "row" + }, { "datasource": { "type": "prometheus", @@ -1797,17 +3127,18 @@ "value": 80 } ] - } + }, + "unit": "percent" }, "overrides": [] }, "gridPos": { "h": 8, "w": 12, - "x": 12, - "y": 74 + "x": 0, + "y": 124 }, - "id": 42, + "id": 52, "options": { "legend": { "calcs": [], @@ -1827,11 +3158,12 @@ "uid": "${DS_PROMETHEUS}" }, "editorMode": "code", - "expr": "rate(libp2p_kad_dht_inbound_rpc_requests_total[$__rate_interval])", + "expr": "rate(process_cpu_system_seconds_total{instance=\"$instance\", job=\"$job\"}[$__rate_interval]) * 100", + "hide": false, "instant": false, - "legendFormat": "{{libp2p_kad_dht_inbound_rpc_requests_total}}", + "legendFormat": "system", "range": true, - "refId": "A" + "refId": "B" }, { "datasource": { @@ -1839,30 +3171,17 @@ "uid": "${DS_PROMETHEUS}" }, "editorMode": "code", - "expr": "rate(libp2p_kad_dht_inbound_rpc_errors_total[$__rate_interval])", + "expr": "rate(process_cpu_user_seconds_total{instance=\"$instance\", job=\"$job\"}[$__rate_interval]) * 100", "hide": false, "instant": false, - "legendFormat": "{{libp2p_kad_dht_inbound_rpc_errors_total}} (error)", + "legendFormat": "user", "range": true, - "refId": "B" + "refId": "C" } ], - "title": "Inbound RPC requests", + "title": "CPU", "type": "timeseries" }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 82 - }, - "id": 43, - "panels": [], - "title": "Circuit Relay Server", - "type": "row" - }, { "datasource": { "type": "prometheus", @@ -1919,17 +3238,18 @@ "value": 80 } ] - } + }, + "unit": "bytes" }, "overrides": [] }, "gridPos": { "h": 8, "w": 12, - "x": 0, - "y": 83 + "x": 12, + "y": 124 }, - "id": 44, + "id": 13, "options": { "legend": { "calcs": [], @@ -1949,33 +3269,20 @@ "uid": "${DS_PROMETHEUS}" }, "disableTextWrap": false, - "editorMode": "builder", - "expr": "libp2p_circuit_relay_server_reservations_total", + "editorMode": "code", + "expr": "nodejs_memory_usage_bytes{job=\"$job\", instance=\"$instance\"}", "fullMetaSearch": false, "includeNullMetadata": true, "instant": false, - "legendFormat": "reservations", + "legendFormat": "{{memory}}", "range": true, "refId": "A", "useBackend": false } ], - "title": "Reservations", + "title": "Memory", "type": "timeseries" }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 91 - }, - "id": 26, - "panels": [], - "title": "NodeJS", - "type": "row" - }, { "datasource": { "type": "prometheus", @@ -2040,7 +3347,7 @@ "h": 8, "w": 12, "x": 0, - "y": 92 + "y": 132 }, "id": 3, "options": { @@ -2063,7 +3370,7 @@ }, "disableTextWrap": false, "editorMode": "code", - "expr": "nodejs_active_resources", + "expr": "nodejs_active_resources{job=\"$job\", instance=\"$instance\"}", "fullMetaSearch": false, "includeNullMetadata": true, "instant": false, @@ -2132,8 +3439,7 @@ "value": 80 } ] - }, - "unit": "bytes" + } }, "overrides": [] }, @@ -2141,9 +3447,9 @@ "h": 8, "w": 12, "x": 12, - "y": 92 + "y": 132 }, - "id": 13, + "id": 4, "options": { "legend": { "calcs": [], @@ -2164,17 +3470,19 @@ }, "disableTextWrap": false, "editorMode": "code", - "expr": "nodejs_memory_usage_bytes", + "exemplar": false, + "expr": "nodejs_active_handles{job=\"$job\", instance=\"$instance\"}", + "format": "time_series", "fullMetaSearch": false, "includeNullMetadata": true, "instant": false, - "legendFormat": "{{memory}}", + "legendFormat": "{{type}}", "range": true, "refId": "A", "useBackend": false } ], - "title": "Memory usage", + "title": "Active handles", "type": "timeseries" }, { @@ -2233,7 +3541,8 @@ "value": 80 } ] - } + }, + "unit": "ms" }, "overrides": [] }, @@ -2241,9 +3550,9 @@ "h": 8, "w": 12, "x": 0, - "y": 100 + "y": 140 }, - "id": 4, + "id": 45, "options": { "legend": { "calcs": [], @@ -2264,19 +3573,68 @@ }, "disableTextWrap": false, "editorMode": "code", - "exemplar": false, - "expr": "nodejs_active_handles", - "format": "time_series", + "expr": "nodejs_eventloop_lag_seconds{job=\"$job\", instance=\"$instance\"}", "fullMetaSearch": false, "includeNullMetadata": true, "instant": false, - "legendFormat": "{{type}}", + "legendFormat": "seconds", "range": true, "refId": "A", "useBackend": false + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "disableTextWrap": false, + "editorMode": "code", + "expr": "nodejs_eventloop_lag_max_seconds{job=\"$job\", instance=\"$instance\"}", + "fullMetaSearch": false, + "hide": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "max", + "range": true, + "refId": "B", + "useBackend": false + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "disableTextWrap": false, + "editorMode": "code", + "expr": "nodejs_eventloop_lag_min_seconds{job=\"$job\", instance=\"$instance\"}", + "fullMetaSearch": false, + "hide": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "min", + "range": true, + "refId": "C", + "useBackend": false + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "disableTextWrap": false, + "editorMode": "code", + "expr": "nodejs_eventloop_lag_mean_seconds{job=\"$job\", instance=\"$instance\"}", + "fullMetaSearch": false, + "hide": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "mean", + "range": true, + "refId": "D", + "useBackend": false } ], - "title": "Active handles", + "title": "Event loop lag", "type": "timeseries" }, { @@ -2344,7 +3702,7 @@ "h": 8, "w": 12, "x": 12, - "y": 100 + "y": 140 }, "id": 9, "options": { @@ -2366,8 +3724,8 @@ "uid": "${DS_PROMETHEUS}" }, "disableTextWrap": false, - "editorMode": "builder", - "expr": "rate(nodejs_gc_duration_seconds_count[$__interval])", + "editorMode": "code", + "expr": "rate(nodejs_gc_duration_seconds_count{job=\"$job\", instance=\"$instance\"}[$__interval])", "fullMetaSearch": false, "includeNullMetadata": true, "instant": false, @@ -2387,54 +3745,79 @@ "templating": { "list": [ { - "hide": 2, - "name": "heatmap_buckets", - "query": "${VAR_HEATMAP_BUCKETS}", + "datasource": { + "default": true, + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "filters": [], + "hide": 0, + "name": "Filters", "skipUrlSync": false, - "type": "constant", - "current": { - "value": "${VAR_HEATMAP_BUCKETS}", - "text": "${VAR_HEATMAP_BUCKETS}", - "selected": false - }, - "options": [ - { - "value": "${VAR_HEATMAP_BUCKETS}", - "text": "${VAR_HEATMAP_BUCKETS}", - "selected": false - } - ] + "type": "adhoc" }, { - "hide": 2, - "name": "axisWidth", - "query": "${VAR_AXISWIDTH}", + "current": {}, + "hide": 0, + "includeAll": false, + "label": "Datasource", + "multi": false, + "name": "datasource", + "options": [], + "query": "prometheus", + "queryValue": "", + "refresh": 1, + "regex": "", "skipUrlSync": false, - "type": "constant", - "current": { - "value": "${VAR_AXISWIDTH}", - "text": "${VAR_AXISWIDTH}", - "selected": false - }, - "options": [ - { - "value": "${VAR_AXISWIDTH}", - "text": "${VAR_AXISWIDTH}", - "selected": false - } - ] + "type": "datasource" }, { + "current": {}, "datasource": { - "default": true, "type": "prometheus", - "uid": "PBFA97CFB590B2093" + "uid": "${datasource}" }, - "filters": [], + "definition": "label_values(host)", "hide": 0, - "name": "Filters", + "includeAll": false, + "label": "Instance", + "multi": false, + "name": "instance", + "options": [], + "query": { + "qryType": 1, + "query": "label_values(host)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + }, + "refresh": 1, + "regex": "", "skipUrlSync": false, - "type": "adhoc" + "sort": 0, + "type": "query" + }, + { + "current": {}, + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "definition": "label_values({instance=\"$instance\"},job)", + "hide": 0, + "includeAll": false, + "label": "Job", + "multi": false, + "name": "job", + "options": [], + "query": { + "qryType": 1, + "query": "label_values({instance=\"$instance\"},job)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" } ] }, @@ -2446,6 +3829,6 @@ "timezone": "browser", "title": "js-libp2p bootstrapper default dashboard", "uid": "js-libp2p-bootstrapper", - "version": 51, + "version": 99, "weekStart": "" -} +} \ No newline at end of file diff --git a/config/prometheus/prometheus.yml b/config/prometheus/prometheus.yml index b1c9531..f7daa03 100644 --- a/config/prometheus/prometheus.yml +++ b/config/prometheus/prometheus.yml @@ -10,7 +10,7 @@ scrape_configs: - job_name: docker static_configs: - - targets: ["host.docker.internal:9323"] + - targets: ['host.docker.internal:9323'] rule_files: - - "rules/*.yml" # This line tells Prometheus where to find the rule files. + - 'rules/*.yml' # This line tells Prometheus where to find the rule files.