Grafana----MySQL监控看板
一、 看板展示
二、 json记录
{"editable": true, "fiscalYearStartMonth": 0, "graphTooltip": 0, "id": 25, "iteration": 1659085789278, "links": [], "liveNow": false, "panels": [ { "collapsed": true, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 0 }, "id": 2, "panels": [ { "datasource": { "type": "prometheus", "uid": "7pfyIeX7k" }, "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "semi-dark-red" }, { "color": "green", "value": 600 } ] }, "unit": "s" }, "overrides": [] }, "gridPos": { "h": 5, "w": 6, "x": 0, "y": 1 }, "id": 18, "options": { "colorMode": "background", "graphMode": "none", "justifyMode": "auto", "orientation": "auto", "reduceOptions": { "calcs": [ "last" ], "fields": "", "values": false }, "textMode": "auto" }, "pluginVersion": "8.4.5", "targets": [ { "datasource": { "type": "prometheus", "uid": "7pfyIeX7k" }, "exemplar": true, "expr": "mysql_uptime{application=\"$application\", ident=\"$ident\"}", "interval": "", "legendFormat": "", "refId": "A" } ], "title": "运行时间", "type": "stat" }, { "datasource": { "type": "prometheus", "uid": "7pfyIeX7k" }, "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "red" }, { "color": "green", "value": 536870912 } ] }, "unit": "bytes" }, "overrides": [] }, "gridPos": { "h": 5, "w": 6, "x": 6, "y": 1 }, "id": 20, "options": { "colorMode": "background", "graphMode": "none", "justifyMode": "auto", "orientation": "auto", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "textMode": "auto" }, "pluginVersion": "8.4.5", "targets": [ { "datasource": { "type": "prometheus", "uid": "7pfyIeX7k" }, "exemplar": true, "expr": "mysql_variables_innodb_buffer_pool_size{application=\"$application\", ident=\"$ident\"}", "interval": "", "legendFormat": "", "refId": "A" } ], "title": "Innodb缓存池大小", "type": "stat" }, { "datasource": { "type": "prometheus", "uid": "7pfyIeX7k" }, "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green" }, { "color": "red", "value": 200 } ] } }, "overrides": [] }, "gridPos": { "h": 5, "w": 6, "x": 12, "y": 1 }, "id": 22, "options": { "colorMode": "background", "graphMode": "none", "justifyMode": "auto", "orientation": "auto", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "textMode": "auto" }, "pluginVersion": "8.4.5", "targets": [ { "datasource": { "type": "prometheus", "uid": "7pfyIeX7k" }, "exemplar": true, "expr": "rate(mysql_queries{application=\"$application\",ident=\"$ident\"}[5m])", "interval": "", "legendFormat": "请求数", "refId": "A" } ], "title": "Current QPS", "type": "stat" }, { "datasource": { "type": "prometheus", "uid": "7pfyIeX7k" }, "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green" } ] } }, "overrides": [] }, "gridPos": { "h": 5, "w": 6, "x": 18, "y": 1 }, "id": 23, "options": { "colorMode": "background", "graphMode": "none", "justifyMode": "auto", "orientation": "auto", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "textMode": "auto" }, "pluginVersion": "8.4.5", "targets": [ { "datasource": { "type": "prometheus", "uid": "7pfyIeX7k" }, "exemplar": true, "expr": "increase(mysql_table_locks_waited{application=\"$application\",ident=\"$ident\"}[5m])", "interval": "", "legendFormat": "", "refId": "A" } ], "title": "Table Locks Waited", "type": "stat" } ], "title": "概览", "type": "row" }, { "collapsed": true, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 1 }, "id": 4, "panels": [ { "datasource": { "type": "prometheus", "uid": "7pfyIeX7k" }, "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "light-blue" } ] } }, "overrides": [] }, "gridPos": { "h": 8, "w": 6, "x": 0, "y": 2 }, "id": 27, "options": { "colorMode": "background", "graphMode": "none", "justifyMode": "auto", "orientation": "auto", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "textMode": "auto" }, "pluginVersion": "8.4.5", "targets": [ { "datasource": { "type": "prometheus", "uid": "7pfyIeX7k" }, "exemplar": true, "expr": "mysql_variables_max_connections{application=\"$application\", ident=\"$ident\"}", "instant": false, "interval": "", "legendFormat": "", "refId": "A" } ], "title": "最大连接数", "type": "stat" }, { "datasource": { "type": "prometheus", "uid": "7pfyIeX7k" }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "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" }, { "color": "red", "value": 80 } ] } }, "overrides": [] }, "gridPos": { "h": 8, "w": 6, "x": 6, "y": 2 }, "id": 25, "options": { "legend": { "calcs": [], "displayMode": "list", "placement": "bottom" }, "tooltip": { "mode": "single", "sort": "none" } }, "targets": [ { "datasource": { "type": "prometheus", "uid": "7pfyIeX7k" }, "exemplar": true, "expr": "mysql_threads_connected{application=\"$application\",ident=\"$ident\"}", "interval": "", "legendFormat": "线程数", "refId": "A" } ], "title": "数据库连接", "type": "timeseries" }, { "datasource": { "type": "prometheus", "uid": "7pfyIeX7k" }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "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" }, { "color": "red", "value": 80 } ] } }, "overrides": [] }, "gridPos": { "h": 8, "w": 6, "x": 12, "y": 2 }, "id": 28, "options": { "legend": { "calcs": [], "displayMode": "list", "placement": "bottom" }, "tooltip": { "mode": "single", "sort": "none" } }, "targets": [ { "datasource": { "type": "prometheus", "uid": "7pfyIeX7k" }, "exemplar": true, "expr": "mysql_threads_running{application=\"$application\",ident=\"$ident\"}", "interval": "", "legendFormat": "线程数", "refId": "A" } ], "title": "运行中的连接", "type": "timeseries" }, { "datasource": { "type": "prometheus", "uid": "7pfyIeX7k" }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "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" }, { "color": "red", "value": 80 } ] } }, "overrides": [] }, "gridPos": { "h": 8, "w": 6, "x": 18, "y": 2 }, "id": 29, "options": { "legend": { "calcs": [], "displayMode": "list", "placement": "bottom" }, "tooltip": { "mode": "single", "sort": "none" } }, "targets": [ { "datasource": { "type": "prometheus", "uid": "7pfyIeX7k" }, "exemplar": true, "expr": "mysql_max_used_connections{application=\"$application\",ident=\"$ident\"}", "interval": "", "legendFormat": "历史最大连接数", "refId": "A" }, { "datasource": { "type": "prometheus", "uid": "7pfyIeX7k" }, "exemplar": true, "expr": "rate(mysql_aborted_connects{application=\"$application\",ident=\"$ident\"}[5m])", "hide": false, "interval": "", "legendFormat": "中止的连接数", "refId": "B" } ], "title": "历史最大连接数 & 中止的连接数", "type": "timeseries" } ], "title": "连接", "type": "row" }, { "collapsed": true, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 2 }, "id": 6, "panels": [ { "datasource": { "type": "prometheus", "uid": "7pfyIeX7k" }, "description": "", "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "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" }, { "color": "red", "value": 80 } ] } }, "overrides": [] }, "gridPos": { "h": 8, "w": 12, "x": 0, "y": 3 }, "id": 31, "options": { "legend": { "calcs": [], "displayMode": "list", "placement": "bottom" }, "tooltip": { "mode": "single", "sort": "none" } }, "targets": [ { "datasource": { "type": "prometheus", "uid": "7pfyIeX7k" }, "exemplar": true, "expr": "rate(mysql_created_tmp_tables{application=\"$application\",ident=\"$ident\"}[5m])", "interval": "", "legendFormat": "Created Tmp Tables", "refId": "A" }, { "datasource": { "type": "prometheus", "uid": "7pfyIeX7k" }, "exemplar": true, "expr": "rate(mysql_created_tmp_disk_tables{application=\"$application\",ident=\"$ident\"}[5m])", "hide": false, "interval": "", "legendFormat": "Created Tmp Disk Tables", "refId": "B" }, { "datasource": { "type": "prometheus", "uid": "7pfyIeX7k" }, "exemplar": true, "expr": "rate(mysql_created_tmp_files{application=\"$application\",ident=\"$ident\"}[5m])", "hide": false, "interval": "", "legendFormat": "Created Tmp Files", "refId": "C" } ], "title": "Tmp", "type": "timeseries" }, { "datasource": { "type": "prometheus", "uid": "7pfyIeX7k" }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "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" }, { "color": "red", "value": 80 } ] } }, "overrides": [] }, "gridPos": { "h": 8, "w": 12, "x": 12, "y": 3 }, "id": 32, "options": { "legend": { "calcs": [], "displayMode": "list", "placement": "bottom" }, "tooltip": { "mode": "single", "sort": "none" } }, "targets": [ { "datasource": { "type": "prometheus", "uid": "7pfyIeX7k" }, "exemplar": true, "expr": "rate(mysql_select_full_join{application=\"$application\",ident=\"$ident\"}[5m])", "interval": "", "legendFormat": "Select Full Join", "refId": "A" }, { "datasource": { "type": "prometheus", "uid": "7pfyIeX7k" }, "exemplar": true, "expr": "rate(mysql_select_full_range_join{application=\"$application\",ident=\"$ident\"}[5m])", "hide": false, "interval": "", "legendFormat": "Select Full Range Join", "refId": "B" }, { "datasource": { "type": "prometheus", "uid": "7pfyIeX7k" }, "exemplar": true, "expr": "rate(mysql_select_range{application=\"$application\",ident=\"$ident\"}[5m])", "hide": false, "interval": "", "legendFormat": "Select Range", "refId": "C" }, { "datasource": { "type": "prometheus", "uid": "7pfyIeX7k" }, "exemplar": true, "expr": "rate(mysql_select_range_check{application=\"$application\",ident=\"$ident\"}[5m])", "hide": false, "interval": "", "legendFormat": "Select Range Check", "refId": "D" }, { "datasource": { "type": "prometheus", "uid": "7pfyIeX7k" }, "exemplar": true, "expr": "rate(mysql_select_scan{application=\"$application\",ident=\"$ident\"}[5m])", "hide": false, "interval": "", "legendFormat": "Select Scan", "refId": "E" } ], "title": "Select", "type": "timeseries" }, { "datasource": { "type": "prometheus", "uid": "7pfyIeX7k" }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "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" }, { "color": "red", "value": 80 } ] } }, "overrides": [] }, "gridPos": { "h": 8, "w": 12, "x": 0, "y": 11 }, "id": 33, "options": { "legend": { "calcs": [], "displayMode": "list", "placement": "bottom" }, "tooltip": { "mode": "single", "sort": "none" } }, "targets": [ { "datasource": { "type": "prometheus", "uid": "7pfyIeX7k" }, "exemplar": true, "expr": "rate(mysql_sort_rows{application=\"$application\",ident=\"$ident\"}[5m])", "interval": "", "legendFormat": "Sort Rows", "refId": "A" }, { "datasource": { "type": "prometheus", "uid": "7pfyIeX7k" }, "exemplar": true, "expr": "rate(mysql_sort_range{application=\"$application\",ident=\"$ident\"}[5m])", "hide": false, "interval": "", "legendFormat": "Sort Range", "refId": "B" }, { "datasource": { "type": "prometheus", "uid": "7pfyIeX7k" }, "exemplar": true, "expr": "rate(mysql_sort_merge_passes{application=\"$application\",ident=\"$ident\"}[5m])", "hide": false, "interval": "", "legendFormat": "Sort Merge Passes", "refId": "C" }, { "datasource": { "type": "prometheus", "uid": "7pfyIeX7k" }, "exemplar": true, "expr": "rate(mysql_sort_scan{application=\"$application\",ident=\"$ident\"}[5m])", "hide": false, "interval": "", "legendFormat": "Sort Scan", "refId": "D" } ], "title": "Sort", "type": "timeseries" }, { "datasource": { "type": "prometheus", "uid": "7pfyIeX7k" }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "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" }, { "color": "red", "value": 80 } ] } }, "overrides": [] }, "gridPos": { "h": 8, "w": 12, "x": 12, "y": 11 }, "id": 34, "options": { "legend": { "calcs": [], "displayMode": "list", "placement": "bottom" }, "tooltip": { "mode": "single", "sort": "none" } }, "targets": [ { "datasource": { "type": "prometheus", "uid": "7pfyIeX7k" }, "exemplar": true, "expr": "rate(mysql_slow_queries{application=\"$application\",ident=\"$ident\"}[5m])", "interval": "", "legendFormat": "Slow Queries", "refId": "A" } ], "title": "Slow Queries", "type": "timeseries" } ], "title": "请求", "type": "row" }, { "collapsed": true, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 3 }, "id": 8, "panels": [ { "datasource": { "type": "prometheus", "uid": "7pfyIeX7k" }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "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" }, { "color": "red", "value": 80 } ] }, "unit": "bytes" }, "overrides": [] }, "gridPos": { "h": 8, "w": 24, "x": 0, "y": 4 }, "id": 36, "options": { "legend": { "calcs": [], "displayMode": "list", "placement": "bottom" }, "tooltip": { "mode": "single", "sort": "none" } }, "targets": [ { "datasource": { "type": "prometheus", "uid": "7pfyIeX7k" }, "exemplar": true, "expr": "rate(mysql_bytes_received{application=\"$application\",ident=\"$ident\"}[5m])", "interval": "", "legendFormat": "In", "refId": "A" }, { "datasource": { "type": "prometheus", "uid": "7pfyIeX7k" }, "exemplar": true, "expr": "rate(mysql_bytes_sent{application=\"$application\",ident=\"$ident\"}[5m])", "hide": false, "interval": "", "legendFormat": "Out", "refId": "B" } ], "title": "Network", "type": "timeseries" } ], "title": "网络", "type": "row" }, { "collapsed": true, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 4 }, "id": 14, "panels": [ { "datasource": { "type": "prometheus", "uid": "7pfyIeX7k" }, "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "light-blue" } ] } }, "overrides": [] }, "gridPos": { "h": 8, "w": 6, "x": 0, "y": 6 }, "id": 38, "options": { "colorMode": "background", "graphMode": "none", "justifyMode": "auto", "orientation": "auto", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "textMode": "auto" }, "pluginVersion": "8.4.5", "targets": [ { "datasource": { "type": "prometheus", "uid": "7pfyIeX7k" }, "exemplar": true, "expr": "mysql_variables_open_files_limit{application=\"$application\",ident=\"$ident\"}", "interval": "", "legendFormat": "Open Files Limit", "refId": "A" } ], "title": "Open Files Limit", "type": "stat" }, { "datasource": { "type": "prometheus", "uid": "7pfyIeX7k" }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "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" }, { "color": "red", "value": 80 } ] } }, "overrides": [] }, "gridPos": { "h": 8, "w": 18, "x": 6, "y": 6 }, "id": 39, "options": { "legend": { "calcs": [], "displayMode": "list", "placement": "bottom" }, "tooltip": { "mode": "single", "sort": "none" } }, "targets": [ { "datasource": { "type": "prometheus", "uid": "7pfyIeX7k" }, "exemplar": true, "expr": "mysql_open_files{application=\"$application\",ident=\"$ident\"}", "interval": "", "legendFormat": "Open Files", "refId": "A" } ], "title": "Open Files", "type": "timeseries" } ], "title": "Open Files", "type": "row" }, { "collapsed": true, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 5 }, "id": 12, "panels": [ { "datasource": { "type": "prometheus", "uid": "7pfyIeX7k" }, "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "light-blue" } ] } }, "overrides": [] }, "gridPos": { "h": 8, "w": 6, "x": 0, "y": 6 }, "id": 44, "options": { "colorMode": "background", "graphMode": "none", "justifyMode": "auto", "orientation": "auto", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "textMode": "auto" }, "pluginVersion": "8.4.5", "targets": [ { "datasource": { "type": "prometheus", "uid": "7pfyIeX7k" }, "exemplar": true, "expr": "mysql_variables_table_open_cache{application=\"$application\",ident=\"$ident\"}", "instant": false, "interval": "", "legendFormat": "", "refId": "A" } ], "title": "Table Open Cache", "type": "stat" }, { "datasource": { "type": "prometheus", "uid": "7pfyIeX7k" }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "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" }, { "color": "red", "value": 80 } ] } }, "overrides": [] }, "gridPos": { "h": 8, "w": 9, "x": 6, "y": 6 }, "id": 41, "options": { "legend": { "calcs": [], "displayMode": "list", "placement": "bottom" }, "tooltip": { "mode": "single", "sort": "none" } }, "pluginVersion": "8.4.5", "targets": [ { "datasource": { "type": "prometheus", "uid": "7pfyIeX7k" }, "exemplar": true, "expr": "rate(mysql_table_open_cache_hits{application=\"$application\",ident=\"$ident\"}[5m])/\r\n(rate(mysql_table_open_cache_hits{application=\"$application\",ident=\"$ident\"}[5m]) + \r\nrate(mysql_table_open_cache_misses{application=\"$application\",ident=\"$ident\"}[5m]))", "instant": false, "interval": "", "legendFormat": "Ratio", "refId": "A" } ], "title": "Table Open Cache Hit", "type": "timeseries" }, { "datasource": { "type": "prometheus", "uid": "7pfyIeX7k" }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "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" }, { "color": "red", "value": 80 } ] } }, "overrides": [] }, "gridPos": { "h": 8, "w": 9, "x": 15, "y": 6 }, "id": 43, "options": { "legend": { "calcs": [], "displayMode": "list", "placement": "bottom" }, "tooltip": { "mode": "single", "sort": "none" } }, "targets": [ { "datasource": { "type": "prometheus", "uid": "7pfyIeX7k" }, "exemplar": true, "expr": "mysql_open_tables{application=\"$application\",ident=\"$ident\"}", "interval": "", "legendFormat": "Open Tables", "refId": "A" } ], "title": "Open Tables", "type": "timeseries" } ], "title": "Table Openings", "type": "row" }, { "collapsed": true, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 6 }, "id": 10, "panels": [ { "datasource": { "type": "prometheus", "uid": "7pfyIeX7k" }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "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" }, { "color": "red", "value": 80 } ] } }, "overrides": [] }, "gridPos": { "h": 8, "w": 7, "x": 0, "y": 7 }, "id": 46, "options": { "legend": { "calcs": [], "displayMode": "list", "placement": "bottom" }, "tooltip": { "mode": "single", "sort": "none" } }, "targets": [ { "datasource": { "type": "prometheus", "uid": "7pfyIeX7k" }, "exemplar": true, "expr": "rate(mysql_innodb_buffer_pool_read_requests{application=\"$application\",ident=\"$ident\"}[1m])", "interval": "", "legendFormat": "requests", "refId": "A" } ], "title": "Read requests / second", "type": "timeseries" }, { "datasource": { "type": "prometheus", "uid": "7pfyIeX7k" }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "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" }, { "color": "red", "value": 80 } ] } }, "overrides": [] }, "gridPos": { "h": 8, "w": 7, "x": 7, "y": 7 }, "id": 49, "options": { "legend": { "calcs": [], "displayMode": "list", "placement": "bottom" }, "tooltip": { "mode": "single", "sort": "none" } }, "targets": [ { "datasource": { "type": "prometheus", "uid": "7pfyIeX7k" }, "exemplar": true, "expr": "rate(mysql_innodb_buffer_pool_reads{application=\"$application\",ident=\"$ident\"}[1m])", "interval": "", "legendFormat": "reads", "refId": "A" } ], "title": "Reads from disk / second", "type": "timeseries" }, { "datasource": { "type": "prometheus", "uid": "7pfyIeX7k" }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "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" }, { "color": "red", "value": 80 } ] }, "unit": "percent" }, "overrides": [] }, "gridPos": { "h": 8, "w": 10, "x": 14, "y": 7 }, "id": 48, "options": { "legend": { "calcs": [], "displayMode": "list", "placement": "bottom" }, "tooltip": { "mode": "single", "sort": "none" } }, "targets": [ { "datasource": { "type": "prometheus", "uid": "7pfyIeX7k" }, "exemplar": true, "expr": "100 - increase(mysql_innodb_buffer_pool_reads{application=\"$application\",ident=\"$ident\"}[5m])/\r\nincrease(mysql_innodb_buffer_pool_read_requests{application=\"$application\",ident=\"$ident\"}[5m])", "interval": "", "legendFormat": "percent", "refId": "A" } ], "title": "Reads from memory percent", "type": "timeseries" }, { "datasource": { "type": "prometheus", "uid": "7pfyIeX7k" }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "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" }, { "color": "red", "value": 80 } ] } }, "overrides": [] }, "gridPos": { "h": 8, "w": 7, "x": 0, "y": 15 }, "id": 47, "options": { "legend": { "calcs": [], "displayMode": "list", "placement": "bottom" }, "tooltip": { "mode": "single", "sort": "none" } }, "targets": [ { "datasource": { "type": "prometheus", "uid": "7pfyIeX7k" }, "exemplar": true, "expr": "rate(mysql_innodb_row_lock_waits{application=\"$application\",ident=\"$ident\"}[1m])", "interval": "", "legendFormat": "waits", "refId": "A" } ], "title": "Read requests / second", "type": "timeseries" }, { "datasource": { "type": "prometheus", "uid": "7pfyIeX7k" }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "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" }, { "color": "red", "value": 80 } ] } }, "overrides": [] }, "gridPos": { "h": 8, "w": 7, "x": 7, "y": 15 }, "id": 51, "options": { "legend": { "calcs": [], "displayMode": "list", "placement": "bottom" }, "tooltip": { "mode": "single", "sort": "none" } }, "targets": [ { "datasource": { "type": "prometheus", "uid": "7pfyIeX7k" }, "exemplar": true, "expr": "rate(mysql_innodb_row_lock_time{application=\"$application\",ident=\"$ident\"}[1m])", "interval": "", "legendFormat": "time", "refId": "A" } ], "title": "Row lock time / second", "type": "timeseries" }, { "datasource": { "type": "prometheus", "uid": "7pfyIeX7k" }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "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" }, { "color": "red", "value": 80 } ] } }, "overrides": [] }, "gridPos": { "h": 8, "w": 10, "x": 14, "y": 15 }, "id": 50, "options": { "legend": { "calcs": [], "displayMode": "list", "placement": "bottom" }, "tooltip": { "mode": "single", "sort": "none" } }, "targets": [ { "datasource": { "type": "prometheus", "uid": "7pfyIeX7k" }, "exemplar": true, "expr": "rate(mysql_innodb_os_log_fsyncs{application=\"$application\",ident=\"$ident\"}[1m])", "interval": "", "legendFormat": "fsyncs", "refId": "A" } ], "title": "Log fsyncs / second", "type": "timeseries" } ], "title": "InnoDB", "type": "row" } ], "schemaVersion": 35, "style": "dark", "tags": [], "templating": { "list": [ { "current": { "selected": false, "text": "fxcrm", "value": "fxcrm" }, "datasource": { "type": "prometheus", "uid": "7pfyIeX7k" }, "definition": "system_uptime", "hide": 0, "includeAll": false, "label": "Application", "multi": false, "name": "application", "options": [], "query": { "query": "system_uptime", "refId": "StandardVariableQuery" }, "refresh": 1, "regex": ".*application=\"(.*?)\".*", "skipUrlSync": false, "sort": 0, "type": "query" }, { "current": { "selected": false, "text": "fxcrm-afg", "value": "fxcrm-afg" }, "datasource": { "type": "prometheus", "uid": "7pfyIeX7k" }, "definition": "system_uptime", "hide": 0, "includeAll": false, "label": "Ident", "multi": false, "name": "ident", "options": [], "query": { "query": "system_uptime", "refId": "StandardVariableQuery" }, "refresh": 1, "regex": ".*ident=\"(.*?)\".*", "skipUrlSync": false, "sort": 0, "type": "query" } ] }, "time": { "from": "now-5m", "to": "now" }, "timepicker": {}, "timezone": "", "title": "MySQL", "uid": "_HdM2MkVz", "version": 32, "weekStart": "" }
本文来自博客园,作者:ヾ(o◕∀◕)ノヾ,转载请注明原文链接:https://www.cnblogs.com/Jupiter-blog/p/16532949.html
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· C#/.NET/.NET Core优秀项目和框架2025年2月简报
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 【杭电多校比赛记录】2025“钉耙编程”中国大学生算法设计春季联赛(1)