From 8b5ebd9f386c236aa53614ac53ec3adc7d347fc8 Mon Sep 17 00:00:00 2001 From: slievrly Date: Mon, 9 Feb 2026 00:59:43 +0800 Subject: [PATCH] optimize: add grafana json --- script/server/grafana/panel.json | 651 +++++++++++++++++++++++++++++++ 1 file changed, 651 insertions(+) create mode 100644 script/server/grafana/panel.json diff --git a/script/server/grafana/panel.json b/script/server/grafana/panel.json new file mode 100644 index 00000000000..35b2f352419 --- /dev/null +++ b/script/server/grafana/panel.json @@ -0,0 +1,651 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": 707, + "links": [], + "liveNow": false, + "panels": [ + { + "aliasColors": {}, + "breakPoint": "50%", + "combine": { + "label": "Others", + "threshold": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "hJ8_mPCnk" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + } + }, + "mappings": [] + }, + "overrides": [] + }, + "fontSize": "80%", + "format": "locale", + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 0 + }, + "id": 2, + "legend": { + "header": "事务状态", + "percentage": false, + "show": true, + "sideWidth": 200, + "values": true + }, + "legendType": "Right side", + "links": [], + "nullPointMode": "connected", + "options": { + "legend": { + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "pieType": "pie", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pieType": "pie", + "pluginVersion": "7.4.0-pre", + "strokeWidth": "1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "hJ8_mPCnk" + }, + "expr": "sum(seata_transaction{kubeone_ali_appinstance_name=\"$instance\",group=~\"$group\",meter=\"counter\",pod=\"$pod\"}) by (status)", + "interval": "", + "legendFormat": "{{status}}", + "queryType": "randomWalk", + "refId": "A" + } + ], + "title": "事务总量统计", + "type": "piechart", + "valueName": "current" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "hJ8_mPCnk" + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 0 + }, + "hiddenSeries": false, + "id": 4, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "10.0.9", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "hJ8_mPCnk" + }, + "expr": "avg(seata_transaction{kubeone_ali_appinstance_name=\"$instance\",group=~\"$group\",meter=\"timer\",statistic=\"average\",pod=\"$pod\"}) by (status)", + "interval": "", + "legendFormat": "{{status}}", + "queryType": "randomWalk", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "事务耗时(含业务时间)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:217", + "format": "short", + "logBase": 1, + "show": true + }, + { + "$$hashKey": "object:218", + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "hJ8_mPCnk" + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 8 + }, + "hiddenSeries": false, + "id": 6, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "10.0.9", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "hJ8_mPCnk" + }, + "expr": "sum(seata_transaction{kubeone_ali_appinstance_name=\"$instance\",group=~\"$group\",meter=\"summary\",statistic=\"count\",status=~\"committed|rollbacked\",pod=\"$pod\"}) by (status)", + "interval": "", + "legendFormat": "{{status}}", + "queryType": "randomWalk", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "正常事务统计", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:345", + "format": "short", + "logBase": 1, + "show": true + }, + { + "$$hashKey": "object:346", + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "hJ8_mPCnk" + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 8 + }, + "hiddenSeries": false, + "id": 8, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "10.0.9", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "hJ8_mPCnk" + }, + "expr": "sum(seata_transaction{kubeone_ali_appinstance_name=\"$instance\",group=~\"$group\",meter=\"summary\",statistic=\"count\",status=~\"unretry|timeout\",pod=\"$pod\"}) by (status)", + "interval": "", + "legendFormat": "{{status}}", + "queryType": "randomWalk", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "异常事务统计", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:434", + "format": "short", + "logBase": 1, + "show": true + }, + { + "$$hashKey": "object:435", + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "hJ8_mPCnk" + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 16 + }, + "hiddenSeries": false, + "id": 10, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "10.0.9", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "hJ8_mPCnk" + }, + "expr": "sum(seata_transaction{kubeone_ali_appinstance_name=\"$instance\",group=~\"$group\",meter=\"summary\",statistic=\"tps\",pod=\"$pod\"}) by (status)", + "interval": "", + "legendFormat": "{{status}}", + "queryType": "randomWalk", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "事务TPS(按状态)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:524", + "format": "short", + "logBase": 1, + "show": true + }, + { + "$$hashKey": "object:525", + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "hJ8_mPCnk" + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 16 + }, + "hiddenSeries": false, + "id": 12, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "10.0.9", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "hJ8_mPCnk" + }, + "expr": "sum(rate(seata_transaction{kubeone_ali_appinstance_name=\"$instance\",group=~\"$group\",meter=\"counter\",pod=\"$pod\",status=~\"committed|rollbacked\"}[1m])) by (kubeone_ali_appinstance_name)", + "interval": "", + "legendFormat": "{{kubeone_ali_appinstance_name}}{{pod}}", + "queryType": "randomWalk", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "事务TPS(按容器)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:613", + "format": "short", + "logBase": 1, + "show": true + }, + { + "$$hashKey": "object:614", + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + } + ], + "refresh": "", + "schemaVersion": 38, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "current": { + "isNone": true, + "selected": false, + "text": "None", + "value": "" + }, + "datasource": { + "type": "prometheus", + "uid": "hJ8_mPCnk" + }, + "definition": "label_values(seata_transaction,kubeone_ali_appinstance_name)", + "hide": 0, + "includeAll": false, + "label": "instance", + "multi": false, + "name": "instance", + "options": [], + "query": "label_values(seata_transaction,kubeone_ali_appinstance_name)", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "current": { + "selected": false, + "text": "All", + "value": "$__all" + }, + "datasource": { + "type": "prometheus", + "uid": "hJ8_mPCnk" + }, + "definition": "label_values(seata_transaction,group)", + "hide": 0, + "includeAll": true, + "label": "group", + "multi": true, + "name": "group", + "options": [], + "query": "label_values(seata_transaction,group)", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "current": { + "selected": false, + "text": "All", + "value": "$__all" + }, + "datasource": { + "type": "prometheus", + "uid": "hJ8_mPCnk" + }, + "definition": "label_values(seata_transaction {kubeone_ali_appinstance_name=\"$instance\"}, pod)", + "hide": 0, + "includeAll": true, + "label": "pod", + "multi": true, + "name": "pod", + "options": [], + "query": "label_values(seata_transaction {kubeone_ali_appinstance_name=\"$instance\"}, pod)", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-6h", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "Seata业务大盘", + "uid": "2PUPlT_7k", + "version": 1, + "weekStart": "" +} \ No newline at end of file