From f6221c9f91c017cb8dae64e48a2971c615177189 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E5=82=85=E5=93=A5?= <184172133@qq.com> Date: Sun, 26 Nov 2023 09:24:41 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E7=9B=91=E6=8E=A7=E9=9D=A2?= =?UTF-8?q?=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../README.md" | 1 + .../grafana.json" | 591 ++++++++++++++++++ 2 files changed, 592 insertions(+) create mode 100644 "dev-ops/Grafana\347\233\221\346\216\247\351\235\242\346\235\277\351\205\215\347\275\256/README.md" create mode 100644 "dev-ops/Grafana\347\233\221\346\216\247\351\235\242\346\235\277\351\205\215\347\275\256/grafana.json" diff --git "a/dev-ops/Grafana\347\233\221\346\216\247\351\235\242\346\235\277\351\205\215\347\275\256/README.md" "b/dev-ops/Grafana\347\233\221\346\216\247\351\235\242\346\235\277\351\205\215\347\275\256/README.md" new file mode 100644 index 0000000..b542f3d --- /dev/null +++ "b/dev-ops/Grafana\347\233\221\346\216\247\351\235\242\346\235\277\351\205\215\347\275\256/README.md" @@ -0,0 +1 @@ +在 Grafana 面板中,用json方式导入即可 \ No newline at end of file diff --git "a/dev-ops/Grafana\347\233\221\346\216\247\351\235\242\346\235\277\351\205\215\347\275\256/grafana.json" "b/dev-ops/Grafana\347\233\221\346\216\247\351\235\242\346\235\277\351\205\215\347\275\256/grafana.json" new file mode 100644 index 0000000..88d006b --- /dev/null +++ "b/dev-ops/Grafana\347\233\221\346\216\247\351\235\242\346\235\277\351\205\215\347\275\256/grafana.json" @@ -0,0 +1,591 @@ +{ +"annotations": { +"list": [ +{ +"builtIn": 1, +"datasource": { +"type": "grafana", +"uid": "-- Grafana --" +}, +"enable": true, +"hide": true, +"iconColor": "rgba(0, 211, 255, 1)", +"name": "Annotations & Alerts", +"type": "dashboard" +} +] +}, +"editable": true, +"fiscalYearStartMonth": 0, +"graphTooltip": 0, +"id": 1, +"links": [], +"liveNow": false, +"panels": [ +{ +"datasource": { +"type": "prometheus", +"uid": "PBFA97CFB590B2093" +}, +"fieldConfig": { +"defaults": { +"color": { +"mode": "thresholds" +}, +"mappings": [], +"thresholds": { +"mode": "absolute", +"steps": [ +{ +"color": "green", +"value": null +}, +{ +"color": "red", +"value": 80 +} +] +} +}, +"overrides": [] +}, +"gridPos": { +"h": 7, +"w": 4, +"x": 0, +"y": 0 +}, +"id": 1, +"options": { +"colorMode": "value", +"graphMode": "area", +"justifyMode": "auto", +"orientation": "auto", +"reduceOptions": { +"calcs": [ +"lastNotNull" +], +"fields": "", +"values": false +}, +"textMode": "auto" +}, +"pluginVersion": "10.2.0", +"targets": [ +{ +"datasource": { +"type": "prometheus", +"uid": "PBFA97CFB590B2093" +}, +"disableTextWrap": false, +"editorMode": "builder", +"expr": "tomcat_threads_config_max_threads{job=\"xfg-dev-tech\"}", +"fullMetaSearch": false, +"includeNullMetadata": true, +"instant": false, +"legendFormat": "__auto", +"range": true, +"refId": "A", +"useBackend": false +} +], +"title": "Tomcat - 最大连接数", +"type": "stat" +}, +{ +"datasource": { +"type": "prometheus", +"uid": "PBFA97CFB590B2093" +}, +"fieldConfig": { +"defaults": { +"color": { +"mode": "palette-classic" +}, +"custom": { +"axisBorderShow": false, +"axisCenteredZero": false, +"axisColorMode": "text", +"axisLabel": "", +"axisPlacement": "auto", +"barAlignment": 0, +"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": 7, +"w": 20, +"x": 4, +"y": 0 +}, +"id": 2, +"options": { +"legend": { +"calcs": [], +"displayMode": "list", +"placement": "bottom", +"showLegend": true +}, +"tooltip": { +"mode": "single", +"sort": "none" +} +}, +"targets": [ +{ +"datasource": { +"type": "prometheus", +"uid": "PBFA97CFB590B2093" +}, +"editorMode": "code", +"expr": "tomcat_connections_current_connections{job=\"xfg-dev-tech\"}", +"instant": false, +"legendFormat": "__auto", +"range": true, +"refId": "A" +} +], +"title": "Tomcat - 实时连接数", +"type": "timeseries" +}, +{ +"datasource": { +"type": "prometheus", +"uid": "PBFA97CFB590B2093" +}, +"fieldConfig": { +"defaults": { +"color": { +"mode": "palette-classic" +}, +"custom": { +"axisBorderShow": false, +"axisCenteredZero": false, +"axisColorMode": "text", +"axisLabel": "", +"axisPlacement": "auto", +"barAlignment": 0, +"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": 6, +"w": 12, +"x": 0, +"y": 7 +}, +"id": 3, +"options": { +"legend": { +"calcs": [], +"displayMode": "list", +"placement": "bottom", +"showLegend": true +}, +"tooltip": { +"mode": "single", +"sort": "none" +} +}, +"targets": [ +{ +"datasource": { +"type": "prometheus", +"uid": "PBFA97CFB590B2093" +}, +"editorMode": "code", +"expr": "sum by(uri, exception, job) (increase(http_server_requests_seconds_count{uri=~\"/api/hystrix/query_order_info\", method=\"GET\"}[5m]))", +"instant": false, +"legendFormat": "__auto", +"range": true, +"refId": "A" +} +], +"title": "压测 - 查询订单信息", +"type": "timeseries" +}, +{ +"datasource": { +"type": "prometheus", +"uid": "PBFA97CFB590B2093" +}, +"fieldConfig": { +"defaults": { +"color": { +"mode": "palette-classic" +}, +"custom": { +"axisBorderShow": false, +"axisCenteredZero": false, +"axisColorMode": "text", +"axisLabel": "", +"axisPlacement": "auto", +"barAlignment": 0, +"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": 6, +"w": 12, +"x": 12, +"y": 7 +}, +"id": 4, +"options": { +"legend": { +"calcs": [], +"displayMode": "list", +"placement": "bottom", +"showLegend": true +}, +"tooltip": { +"mode": "single", +"sort": "none" +} +}, +"targets": [ +{ +"datasource": { +"type": "prometheus", +"uid": "PBFA97CFB590B2093" +}, +"disableTextWrap": false, +"editorMode": "builder", +"expr": "sum by(uri, exception) (increase(http_server_requests_seconds_count{uri=~\"/api/hystrix/stream\", method=\"GET\"}[5m]))", +"fullMetaSearch": false, +"includeNullMetadata": true, +"instant": false, +"legendFormat": "__auto", +"range": true, +"refId": "A", +"useBackend": false +} +], +"title": "压测 - 异步请求并发", +"type": "timeseries" +}, +{ +"datasource": { +"type": "prometheus", +"uid": "PBFA97CFB590B2093" +}, +"fieldConfig": { +"defaults": { +"color": { +"mode": "palette-classic" +}, +"custom": { +"axisBorderShow": false, +"axisCenteredZero": false, +"axisColorMode": "text", +"axisLabel": "", +"axisPlacement": "auto", +"barAlignment": 0, +"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": 6, +"w": 12, +"x": 0, +"y": 13 +}, +"id": 6, +"options": { +"legend": { +"calcs": [], +"displayMode": "list", +"placement": "bottom", +"showLegend": true +}, +"tooltip": { +"mode": "single", +"sort": "none" +} +}, +"targets": [ +{ +"datasource": { +"type": "prometheus", +"uid": "PBFA97CFB590B2093" +}, +"editorMode": "code", +"expr": "sum by (uri) (increase(http_server_requests_seconds_sum{uri=~\"/api/hystrix/query_order_info\"}[1m]))\n/sum by (uri) (increase(http_server_requests_seconds_count{uri=~\"/api/hystrix/query_order_info\"}[1m]))", +"instant": false, +"legendFormat": "__auto", +"range": true, +"refId": "A" +} +], +"title": "压测-查询订单耗时", +"type": "timeseries" +}, +{ +"datasource": { +"type": "prometheus", +"uid": "PBFA97CFB590B2093" +}, +"fieldConfig": { +"defaults": { +"color": { +"mode": "palette-classic" +}, +"custom": { +"axisBorderShow": false, +"axisCenteredZero": false, +"axisColorMode": "text", +"axisLabel": "", +"axisPlacement": "auto", +"barAlignment": 0, +"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": 6, +"w": 12, +"x": 12, +"y": 13 +}, +"id": 5, +"options": { +"legend": { +"calcs": [], +"displayMode": "list", +"placement": "bottom", +"showLegend": true +}, +"tooltip": { +"mode": "single", +"sort": "none" +} +}, +"targets": [ +{ +"datasource": { +"type": "prometheus", +"uid": "PBFA97CFB590B2093" +}, +"editorMode": "code", +"expr": "sum by (uri) (increase(http_server_requests_seconds_sum{uri=~\"/api/hystrix/stream\"}[1m]))\n/sum by (uri) (increase(http_server_requests_seconds_count{uri=~\"/api/hystrix/stream\"}[1m]))", +"instant": false, +"legendFormat": "__auto", +"range": true, +"refId": "A" +} +], +"title": "压测-异步应答耗时", +"type": "timeseries" +} +], +"refresh": "5s", +"schemaVersion": 38, +"tags": [], +"templating": { +"list": [] +}, +"time": { +"from": "now-15m", +"to": "now" +}, +"timepicker": {}, +"timezone": "", +"title": "New dashboard", +"uid": "b2458ea1-f02c-4388-b8c2-5c06a602b170", +"version": 11, +"weekStart": "" +} \ No newline at end of file -- GitLab