From 9dd1c86e1a9e0fe5eab2730f097407b26244df34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Gomez?= Date: Thu, 10 Aug 2023 00:49:24 +0200 Subject: [PATCH] Update example package --- mysql.json | 20764 +++++++++++++++++++++++++++------------------------ 1 file changed, 11050 insertions(+), 9714 deletions(-) diff --git a/mysql.json b/mysql.json index 0c787702..24d3fb03 100644 --- a/mysql.json +++ b/mysql.json @@ -1,4969 +1,5373 @@ { - "manifests": [ - { - "annotations": { - "polly.grafana.com/docs": "MySQL logs" - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Dashboard", - "metadata": { - "name": "mysql-logs" - }, - "spec": { - "editable": false, - "id": null, - "links": [ - { - "asDropdown": false, - "includeVars": true, - "keepTime": true, - "tags": [ - "mysql-integration" - ], - "title": "Integration dashboards", - "type": "dashboards" - } - ], - "panels": [ - { - "datasource": { - "type": "datasource", - "uid": "-- Mixed --" - }, - "fieldConfig": { - "defaults": { - "custom": { - "drawStyle": "bars", - "fillOpacity": 50, - "stacking": { - "mode": "normal" - } - } - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "(E|e)merg|(F|f)atal|(A|a)lert|(C|c)rit.*" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "purple", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "(E|e)(rr.*|RR.*)" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "red", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "(W|w)(arn.*|ARN.*|rn|RN)" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "orange", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "(N|n)(otice|ote)|(I|i)(nf.*|NF.*)" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "green", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "dbg.*|DBG.*|(D|d)(EBUG|ebug)" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "blue", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "(T|t)(race|RACE)" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "light-blue", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "unknown" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "text", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 24 - }, - "id": 1, - "interval": "30s", - "options": { - "tooltip": { - "mode": "multi" - } - }, - "targets": [ - { - "datasource": { - "type": "loki", - "uid": "$loki_datasource" - }, - "expr": "sum by (level) (count_over_time({job=\"integrations/mysql\",job=~\"$job\",instance=~\"$instance\",level=~\"$level\",subsystem=~\"$subsystem\",err_code=~\"$err_code\"} \n|~ \"$regex_search\"\n\n[$__interval]))\n", - "legendFormat": "{{ level }}" - } - ], - "title": "Logs volume", - "transformations": [ - { - "id": "renameByRegex", - "options": { - "regex": "Value", - "renamePattern": "unknown" - } - } - ], - "type": "timeseries" - }, - { - "datasource": { - "type": "datasource", - "uid": "-- Mixed --" - }, - "gridPos": { - "h": 18, - "w": 24 - }, - "id": 2, - "options": { - "dedupStrategy": "exact", - "enableLogDetails": true, - "prettifyLogMessage": true, - "showTime": false, - "wrapLogMessage": true - }, - "targets": [ - { - "datasource": { - "type": "loki", - "uid": "$loki_datasource" - }, - "expr": "{job=\"integrations/mysql\",job=~\"$job\",instance=~\"$instance\",level=~\"$level\",subsystem=~\"$subsystem\",err_code=~\"$err_code\"} \n|~ \"$regex_search\"\n\n" - } - ], - "title": "Logs", - "type": "logs" - } - ], - "refresh": "30s", - "schemaVersion": 36, + "annotations": { + "polly.grafana.com/docs": "Integration - MySQL" + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Package", + "manifests": [ + { + "annotations": { + "polly.grafana.com/docs": "MySQL logs" + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Dashboard", + "metadata": { + "name": "mysql-logs" + }, + "spec": { + "editable": false, + "id": null, + "links": [ + { + "asDropdown": false, + "includeVars": true, + "keepTime": true, "tags": [ - "mysql-integration" + "mysql-integration" ], - "templating": { - "list": [ - { - "name": "loki_datasource", - "query": "loki", - "regex": "", - "type": "datasource" - }, - { - "allValue": ".*", - "datasource": { - "type": "loki", - "uid": "${loki_datasource}" - }, - "includeAll": true, - "multi": true, - "name": "job", - "query": "label_values({job=\"integrations/mysql\"}, job)", - "refresh": 2, - "sort": 1, - "type": "query" - }, - { - "allValue": ".*", - "datasource": { - "type": "loki", - "uid": "${loki_datasource}" - }, - "includeAll": true, - "multi": true, - "name": "instance", - "query": "label_values({job=\"integrations/mysql\",job=~\"$job\"}, instance)", - "refresh": 2, - "sort": 1, - "type": "query" - }, - { - "allValue": ".*", - "datasource": { - "type": "loki", - "uid": "${loki_datasource}" - }, - "includeAll": true, - "multi": true, - "name": "level", - "query": "label_values({job=\"integrations/mysql\",job=~\"$job\",instance=~\"$instance\"}, level)", - "refresh": 2, - "sort": 1, - "type": "query" - }, - { - "allValue": ".*", - "datasource": { - "type": "loki", - "uid": "${loki_datasource}" - }, - "includeAll": true, - "multi": true, - "name": "subsystem", - "query": "label_values({job=\"integrations/mysql\",job=~\"$job\",instance=~\"$instance\",level=~\"$level\"}, subsystem)", - "refresh": 2, - "sort": 1, - "type": "query" - }, - { - "allValue": ".*", - "datasource": { - "type": "loki", - "uid": "${loki_datasource}" - }, - "includeAll": true, - "multi": true, - "name": "err_code", - "query": "label_values({job=\"integrations/mysql\",job=~\"$job\",instance=~\"$instance\",level=~\"$level\",subsystem=~\"$subsystem\"}, err_code)", - "refresh": 2, - "sort": 1, - "type": "query" - }, - { - "current": { - "selected": false, - "text": "", - "value": "" - }, - "name": "regex_search", - "options": [ - { - "selected": true, - "text": "", - "value": "" - } - ], - "query": "", - "type": "textbox" - } - ] - }, - "time": { - "from": "now-30m", - "to": "now" - }, - "timezone": "utc", - "title": "MySQL logs", - "uid": "mysql-logs" - } - }, - { - "annotations": { }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Panel", - "metadata": { - "name": "logs-volume" - }, - "spec": { + "title": "Integration dashboards", + "type": "dashboards" + } + ], + "panels": [ + { "datasource": { - "type": "datasource", - "uid": "-- Mixed --" + "type": "datasource", + "uid": "-- Mixed --" }, "fieldConfig": { - "defaults": { - "custom": { - "drawStyle": "bars", - "fillOpacity": 50, - "stacking": { - "mode": "normal" - } - } - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "(E|e)merg|(F|f)atal|(A|a)lert|(C|c)rit.*" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "purple", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "(E|e)(rr.*|RR.*)" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "red", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "(W|w)(arn.*|ARN.*|rn|RN)" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "orange", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "(N|n)(otice|ote)|(I|i)(nf.*|NF.*)" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "green", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "dbg.*|DBG.*|(D|d)(EBUG|ebug)" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "blue", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "(T|t)(race|RACE)" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "light-blue", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "unknown" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "text", - "mode": "fixed" - } - } - ] + "defaults": { + "custom": { + "drawStyle": "bars", + "fillOpacity": 50, + "stacking": { + "mode": "normal" } - ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byRegexp", + "options": "(E|e)merg|(F|f)atal|(A|a)lert|(C|c)rit.*" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "purple", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byRegexp", + "options": "(E|e)(rr.*|RR.*)" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "red", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byRegexp", + "options": "(W|w)(arn.*|ARN.*|rn|RN)" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "orange", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byRegexp", + "options": "(N|n)(otice|ote)|(I|i)(nf.*|NF.*)" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "green", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byRegexp", + "options": "dbg.*|DBG.*|(D|d)(EBUG|ebug)" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "blue", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byRegexp", + "options": "(T|t)(race|RACE)" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "light-blue", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byRegexp", + "options": "unknown" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "text", + "mode": "fixed" + } + } + ] + } + ] }, "gridPos": { - "h": 6, - "w": 24 + "h": 6, + "w": 24 }, "id": 1, "interval": "30s", "options": { - "tooltip": { - "mode": "multi" - } + "tooltip": { + "mode": "multi" + } }, "targets": [ - { - "datasource": { - "type": "loki", - "uid": "$loki_datasource" - }, - "expr": "sum by (level) (count_over_time({job=\"integrations/mysql\",job=~\"$job\",instance=~\"$instance\",level=~\"$level\",subsystem=~\"$subsystem\",err_code=~\"$err_code\"} \n|~ \"$regex_search\"\n\n[$__interval]))\n", - "legendFormat": "{{ level }}" - } + { + "datasource": { + "type": "loki", + "uid": "$loki_datasource" + }, + "expr": "sum by (level) (count_over_time({job=\"integrations/mysql\",cluster=~\"$cluster\",cluster=~\"$cluster\", job=~\"$job\",instance=~\"$instance\",level=~\"$level\",subsystem=~\"$subsystem\",err_code=~\"$err_code\"} \n|~ \"$regex_search\"\n\n[$__interval]))\n", + "legendFormat": "{{ level }}" + } ], "title": "Logs volume", "transformations": [ - { - "id": "renameByRegex", - "options": { - "regex": "Value", - "renamePattern": "unknown" - } - } + { + "id": "renameByRegex", + "options": { + "regex": "Value", + "renamePattern": "unknown" + } + } ], "type": "timeseries" - } - }, - { - "annotations": { }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Target", - "metadata": { - "name": "logs-volume-0" - }, - "spec": { - "datasource": { - "type": "loki", - "uid": "$loki_datasource" - }, - "expr": "sum by (level) (count_over_time({job=\"integrations/mysql\",job=~\"$job\",instance=~\"$instance\",level=~\"$level\",subsystem=~\"$subsystem\",err_code=~\"$err_code\"} \n|~ \"$regex_search\"\n\n[$__interval]))\n", - "legendFormat": "{{ level }}" - } - }, - { - "annotations": { }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Panel", - "metadata": { - "name": "logs" - }, - "spec": { + }, + { "datasource": { - "type": "datasource", - "uid": "-- Mixed --" + "type": "datasource", + "uid": "-- Mixed --" }, "gridPos": { - "h": 18, - "w": 24 + "h": 18, + "w": 24 }, "id": 2, "options": { - "dedupStrategy": "exact", - "enableLogDetails": true, - "prettifyLogMessage": true, - "showTime": false, - "wrapLogMessage": true + "dedupStrategy": "exact", + "enableLogDetails": true, + "prettifyLogMessage": true, + "showTime": false, + "wrapLogMessage": true }, "targets": [ - { - "datasource": { - "type": "loki", - "uid": "$loki_datasource" - }, - "expr": "{job=\"integrations/mysql\",job=~\"$job\",instance=~\"$instance\",level=~\"$level\",subsystem=~\"$subsystem\",err_code=~\"$err_code\"} \n|~ \"$regex_search\"\n\n" - } + { + "datasource": { + "type": "loki", + "uid": "$loki_datasource" + }, + "expr": "{job=\"integrations/mysql\",cluster=~\"$cluster\",cluster=~\"$cluster\", job=~\"$job\",instance=~\"$instance\",level=~\"$level\",subsystem=~\"$subsystem\",err_code=~\"$err_code\"} \n|~ \"$regex_search\"\n\n" + } ], "title": "Logs", "type": "logs" - } - }, - { - "annotations": { }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Target", - "metadata": { - "name": "logs-0" - }, - "spec": { - "datasource": { - "type": "loki", - "uid": "$loki_datasource" - }, - "expr": "{job=\"integrations/mysql\",job=~\"$job\",instance=~\"$instance\",level=~\"$level\",subsystem=~\"$subsystem\",err_code=~\"$err_code\"} \n|~ \"$regex_search\"\n\n" - } - }, - { - "annotations": { - "polly.grafana.com/docs": "MySQL" - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Dashboard", - "metadata": { - "name": "549c2bf8936f7767ea6ac47c47b00f2a" - }, - "spec": { - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "description": "", - "editable": false, - "gnetId": 11323, - "graphTooltip": 1, - "id": null, - "iteration": 1603186191702, - "links": [ - { - "asDropdown": false, - "includeVars": true, - "keepTime": true, - "tags": [ - "mysql-integration" - ], - "title": "Integration dashboards", - "type": "dashboards" - } - ], - "panels": [ - { - "collapse": false, - "collapsed": false, - "gridPos": { - "h": 2, - "w": 8, - "x": 0, - "y": 0 - }, - "panels": [ ], - "repeat": null, - "repeatIteration": null, - "repeatRowId": null, - "showTitle": true, - "span": 4, - "title": "Integration Status", - "titleSize": "h6", - "type": "row" - }, - { - "datasource": "$datasource", - "description": "Shows the status of the integration.", - "fieldConfig": { - "defaults": { - "links": [ ], - "mappings": [ - { - "id": 0, - "options": { - "from": 1, - "result": { - "color": "green", - "index": 0, - "text": "Agent Configured - Sending Metrics" - }, - "to": 10000000000000 - }, - "type": "range" - }, - { - "id": 1, - "options": { - "from": 0, - "result": { - "color": "red", - "index": 1, - "text": "No Data" - }, - "to": 0 - }, - "type": "range" - } - ], - "noValue": "No Data", - "thresholds": { - "mode": "absolute", - "steps": [ ] - }, - "unit": "string" - } - }, - "gridPos": { - "h": 2, - "w": 8, - "x": 0, - "y": 0 - }, - "links": [ ], - "options": { - "colorMode": "background", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "7", - "span": 4, - "targets": [ - { - "expr": "mysql_global_status_uptime{job=~\"$job\", instance=~\"$instance\"}", - "format": "time_series", - "instant": true, - "intervalFactor": 2, - "legendFormat": "", - "refId": "A" - } - ], - "timeFrom": "now/d", - "title": "Integration Status", - "transparent": false, - "type": "stat" - }, - { - "datasource": "$datasource", - "description": "Shows the latest timestamp at which the metrics were received for this integration.", - "fieldConfig": { - "defaults": { - "links": [ ], - "mappings": [ ], - "noValue": "No Data", - "thresholds": { - "mode": "absolute", - "steps": [ ] - }, - "unit": "dateTimeAsIso" - } - }, - "gridPos": { - "h": 2, - "w": 8, - "x": 8, - "y": 0 - }, - "links": [ ], - "options": { - "colorMode": "background", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "Time", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "7", - "span": 4, - "targets": [ - { - "expr": "mysql_global_status_uptime{job=~\"$job\", instance=~\"$instance\"}", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "", - "refId": "A" - } - ], - "timeFrom": "now/d", - "title": "Latest Metric Received", - "transparent": false, - "type": "stat" - }, - { - "datasource": "$datasource", - "description": "Shows the installed version of this integration.", - "fieldConfig": { - "defaults": { - "links": [ ], - "mappings": [ ], - "noValue": "0.1.1", - "thresholds": { - "mode": "absolute", - "steps": [ ] - }, - "unit": "string" - } - }, - "gridPos": { - "h": 2, - "w": 8, - "x": 16, - "y": 0 - }, - "links": [ ], - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "mean" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "7", - "span": 4, - "targets": [ ], - "title": "Integration Version", - "transparent": false, - "type": "stat" - }, - { - "collapsed": false, - "datasource": "$datasource", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 2 - }, - "id": 382, - "panels": [ ], - "repeat": null, - "title": "", - "type": "row" - }, - { - "cacheTimeout": null, - "datasource": "$datasource", - "description": "**Uptime**\n\nThe amount of time since the last restart of the MySQL server process.", - "fieldConfig": { - "defaults": { - "custom": { }, - "decimals": 1, - "mappings": [ ], - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "rgba(245, 54, 54, 0.9)", - "value": null - }, - { - "color": "rgba(237, 129, 40, 0.89)", - "value": 300 - }, - { - "color": "rgba(50, 172, 45, 0.97)", - "value": 3600 - } - ] - }, - "unit": "s" - }, - "overrides": [ ] - }, - "gridPos": { - "h": 3, - "w": 8, - "x": 0, - "y": 3 - }, - "id": 12, - "interval": "1m", - "links": [ ], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": [ - "lastNotNull" - ] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "mean" - ], - "fields": "", - "values": false - } - }, - "pluginVersion": "7.0.4", - "targets": [ - { - "calculatedInterval": "10m", - "datasourceErrors": { }, - "errors": { }, - "expr": "mysql_global_status_uptime{job=~\"$job\", instance=~\"$instance\"}", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "{{instance}}", - "metric": "", - "refId": "A", - "step": 300 - } - ], - "title": "Uptime", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": "$datasource", - "description": "**Current QPS**\n\nBased on the queries reported by MySQL's ``SHOW STATUS`` command, it is the number of statements executed by the server within the last second. This variable includes statements executed within stored programs, unlike the Questions variable. It does not count \n``COM_PING`` or ``COM_STATISTICS`` commands.", - "fieldConfig": { - "defaults": { - "custom": { }, - "decimals": 2, - "mappings": [ ], - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "rgba(245, 54, 54, 0.9)", - "value": null - }, - { - "color": "rgba(237, 129, 40, 0.89)", - "value": 35 - }, - { - "color": "rgba(50, 172, 45, 0.97)", - "value": 75 - } - ] - }, - "unit": "short" - }, - "overrides": [ ] - }, - "gridPos": { - "h": 3, - "w": 8, - "x": 8, - "y": 3 - }, - "id": 13, - "interval": "1m", - "links": [ - { - "targetBlank": true, - "title": "MySQL Server Status Variables", - "url": "https://dev.mysql.com/doc/refman/5.7/en/server-status-variables.html#statvar_Queries" - } - ], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": [ - "lastNotNull" - ] - }, - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "mean" - ], - "fields": "", - "values": false - } - }, - "pluginVersion": "7.0.4", - "targets": [ - { - "calculatedInterval": "10m", - "datasourceErrors": { }, - "errors": { }, - "expr": "rate(mysql_global_status_queries{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "{{instance}}", - "metric": "", - "refId": "A", - "step": 20 - } - ], - "title": "Current QPS", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": "$datasource", - "description": "**InnoDB Buffer Pool Size**\n\nInnoDB maintains a storage area called the buffer pool for caching data and indexes in memory. Knowing how the InnoDB buffer pool works, and taking advantage of it to keep frequently accessed data in memory, is one of the most important aspects of MySQL tuning. The goal is to keep the working set in memory. In most cases, this should be between 60%-90% of available memory on a dedicated database host, but depends on many factors.", - "fieldConfig": { - "defaults": { - "custom": { }, - "decimals": 0, - "mappings": [ ], - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "rgba(50, 172, 45, 0.97)", - "value": null - }, - { - "color": "rgba(237, 129, 40, 0.89)", - "value": 90 - }, - { - "color": "rgba(245, 54, 54, 0.9)", - "value": 95 - } - ] - }, - "unit": "bytes" - }, - "overrides": [ ] - }, - "gridPos": { - "h": 3, - "w": 8, - "x": 16, - "y": 3 - }, - "id": 51, - "interval": "1m", - "links": [ - { - "targetBlank": true, - "title": "Tuning the InnoDB Buffer Pool Size", - "url": "https://www.percona.com/blog/2015/06/02/80-ram-tune-innodb_buffer_pool_size/" - } - ], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": [ - "lastNotNull" - ] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "mean" - ], - "fields": "", - "values": false - } - }, - "pluginVersion": "7.0.4", - "targets": [ - { - "calculatedInterval": "10m", - "datasourceErrors": { }, - "errors": { }, - "expr": "mysql_global_variables_innodb_buffer_pool_size{job=~\"$job\", instance=~\"$instance\"}", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "{{instance}}", - "metric": "", - "refId": "A", - "step": 300 - } - ], - "title": "InnoDB Buffer Pool", - "type": "stat" - }, - { - "collapsed": false, - "datasource": "$datasource", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 6 - }, - "id": 383, - "panels": [ ], - "repeat": null, - "title": "Connections", - "type": "row" - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "decimals": 0, - "description": "**Max Connections** \n\nMax Connections is the maximum permitted number of simultaneous client connections. By default, this is 151. Increasing this value increases the number of file descriptors that mysqld requires. If the required number of descriptors are not available, the server reduces the value of Max Connections.\n\nmysqld actually permits Max Connections + 1 clients to connect. The extra connection is reserved for use by accounts that have the SUPER privilege, such as root.\n\nMax Used Connections is the maximum number of connections that have been in use simultaneously since the server started.\n\nConnections is the number of connection attempts (successful or not) to the MySQL server.", - "editable": true, - "error": false, - "fieldConfig": { - "defaults": { - "custom": { }, - "unit": "short" - }, - "overrides": [ ] - }, - "fill": 2, - "fillGradient": 0, - "grid": { }, - "gridPos": { - "h": 7, - "w": 12, - "x": 0, - "y": 7 - }, - "height": "250px", - "hiddenSeries": false, - "id": 92, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "max": true, - "min": true, - "show": true, - "sort": "avg", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [ - { - "targetBlank": true, - "title": "MySQL Server System Variables", - "url": "https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_max_connections" - } - ], - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "Max Connections", - "fill": 0 - } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(max_over_time(mysql_global_status_threads_connected{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Connections", - "metric": "", - "refId": "A", - "step": 20 - }, - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(mysql_global_status_max_used_connections{job=~\"$job\", instance=~\"$instance\"})", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Max Used Connections", - "metric": "", - "refId": "C", - "step": 20, - "target": "" - }, - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(mysql_global_variables_max_connections{job=~\"$job\", instance=~\"$instance\"})", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Max Connections", - "metric": "", - "refId": "B", - "step": 20, - "target": "" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "MySQL Connections", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "cumulative" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": "", - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": "", - "logBase": 1, - "max": null, - "min": 0, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "decimals": 2, - "description": "**MySQL Active Threads**\n\nThreads Connected is the number of open connections, while Threads Running is the number of threads not sleeping.", - "editable": true, - "error": false, - "fieldConfig": { - "defaults": { - "custom": { }, - "unit": "short" - }, - "overrides": [ ] - }, - "fill": 2, - "fillGradient": 0, - "grid": { }, - "gridPos": { - "h": 7, - "w": 12, - "x": 12, - "y": 7 - }, - "hiddenSeries": false, - "id": 10, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "sort": "avg", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [ ], - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "Peak Threads Running", - "color": "#E24D42", - "lines": false, - "pointradius": 1, - "points": true - }, - { - "alias": "Peak Threads Connected", - "color": "#1F78C1" - }, - { - "alias": "Avg Threads Running", - "color": "#EAB839" - } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(max_over_time(mysql_global_status_threads_connected{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", - "format": "time_series", - "hide": false, - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Peak Threads Connected", - "metric": "", - "refId": "A", - "step": 20 - }, - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(max_over_time(mysql_global_status_threads_running{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Peak Threads Running", - "metric": "", - "refId": "B", - "step": 20 - }, - { - "expr": "sum(avg_over_time(mysql_global_status_threads_running{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Avg Threads Running", - "refId": "C", - "step": 20 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "MySQL Client Thread Activity", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ - "total" - ] - }, - "yaxes": [ - { - "format": "short", - "label": "Threads", - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": "", - "logBase": 1, - "max": null, - "min": 0, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "collapsed": false, - "datasource": "$datasource", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 14 - }, - "id": 384, - "panels": [ ], - "repeat": null, - "title": "Table Locks", - "type": "row" - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "decimals": 2, - "description": "**MySQL Questions**\n\nThe number of statements executed by the server. This includes only statements sent to the server by clients and not statements executed within stored programs, unlike the Queries used in the QPS calculation. \n\nThis variable does not count the following commands:\n* ``COM_PING``\n* ``COM_STATISTICS``\n* ``COM_STMT_PREPARE``\n* ``COM_STMT_CLOSE``\n* ``COM_STMT_RESET``", - "editable": true, - "error": false, - "fieldConfig": { - "defaults": { - "custom": { }, - "unit": "short" - }, - "overrides": [ ] - }, - "fill": 2, - "fillGradient": 0, - "grid": { }, - "gridPos": { - "h": 7, - "w": 12, - "x": 0, - "y": 15 - }, - "hiddenSeries": false, - "id": 53, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "sort": "avg", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [ - { - "targetBlank": true, - "title": "MySQL Queries and Questions", - "url": "https://www.percona.com/blog/2014/05/29/how-mysql-queries-and-questions-are-measured/" - } - ], - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "rate(mysql_global_status_questions{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "{{instance}}", - "metric": "", - "refId": "A", - "step": 20 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "MySQL Questions", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "logBase": 1, - "max": null, - "min": 0, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "decimals": 2, - "description": "**MySQL Thread Cache**\n\nThe thread_cache_size variable sets how many threads the server should cache to reuse. When a client disconnects, the client's threads are put in the cache if the cache is not full. It is autosized in MySQL 5.6.8 and above (capped to 100). Requests for threads are satisfied by reusing threads taken from the cache if possible, and only when the cache is empty is a new thread created.\n\n* *Threads_created*: The number of threads created to handle connections.\n* *Threads_cached*: The number of threads in the thread cache.", - "editable": true, - "error": false, - "fieldConfig": { - "defaults": { - "custom": { }, - "unit": "short" - }, - "overrides": [ ] - }, - "fill": 2, - "fillGradient": 0, - "grid": { }, - "gridPos": { - "h": 7, - "w": 12, - "x": 12, - "y": 15 - }, - "hiddenSeries": false, - "id": 11, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "sort": "avg", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [ - { - "title": "Tuning information", - "url": "https://dev.mysql.com/doc/refman/5.6/en/server-system-variables.html#sysvar_thread_cache_size" - } - ], - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "Threads Created", - "fill": 0 - } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(mysql_global_variables_thread_cache_size{job=~\"$job\", instance=~\"$instance\"})", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Thread Cache Size", - "metric": "", - "refId": "B", - "step": 20 - }, - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(mysql_global_status_threads_cached{job=~\"$job\", instance=~\"$instance\"})", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Threads Cached", - "metric": "", - "refId": "C", - "step": 20 - }, - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(rate(mysql_global_status_threads_created{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Threads Created", - "metric": "", - "refId": "A", - "step": 20 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "MySQL Thread Cache", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "logBase": 1, - "max": null, - "min": 0, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "collapsed": false, - "datasource": "$datasource", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 22 - }, - "id": 385, - "panels": [ ], - "repeat": null, - "title": "Temporary Objects", - "type": "row" - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "decimals": 2, - "description": "MySQL Temporary Objects", - "editable": true, - "error": false, - "fieldConfig": { - "defaults": { - "custom": { }, - "unit": "short" - }, - "overrides": [ ] - }, - "fill": 2, - "fillGradient": 0, - "grid": { }, - "gridPos": { - "h": 7, - "w": 12, - "x": 0, - "y": 23 - }, - "hiddenSeries": false, - "id": 22, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "sort": "avg", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [ ], - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(rate(mysql_global_status_created_tmp_tables{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Created Tmp Tables", - "metric": "", - "refId": "A", - "step": 20 - }, - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(rate(mysql_global_status_created_tmp_disk_tables{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Created Tmp Disk Tables", - "metric": "", - "refId": "B", - "step": 20 - }, - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(rate(mysql_global_status_created_tmp_files{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Created Tmp Files", - "metric": "", - "refId": "C", - "step": 20 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "MySQL Temporary Objects", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "logBase": 1, - "max": null, - "min": 0, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "decimals": 2, - "description": "**MySQL Select Types**\n\nAs with most relational databases, selecting based on indexes is more efficient than scanning an entire table's data. Here we see the counters for selects not done with indexes.\n\n* ***Select Scan*** is how many queries caused full table scans, in which all the data in the table had to be read and either discarded or returned.\n* ***Select Range*** is how many queries used a range scan, which means MySQL scanned all rows in a given range.\n* ***Select Full Join*** is the number of joins that are not joined on an index, this is usually a huge performance hit.", - "editable": true, - "error": false, - "fieldConfig": { - "defaults": { - "custom": { }, - "unit": "short" - }, - "overrides": [ ] - }, - "fill": 2, - "fillGradient": 0, - "grid": { }, - "gridPos": { - "h": 7, - "w": 12, - "x": 12, - "y": 23 - }, - "height": "250px", - "hiddenSeries": false, - "id": 311, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "hideZero": true, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "sort": "avg", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [ ], - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(rate(mysql_global_status_select_full_join{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Select Full Join", - "metric": "", - "refId": "A", - "step": 20 - }, - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(rate(mysql_global_status_select_full_range_join{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Select Full Range Join", - "metric": "", - "refId": "B", - "step": 20 - }, - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(rate(mysql_global_status_select_range{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Select Range", - "metric": "", - "refId": "C", - "step": 20 - }, - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(rate(mysql_global_status_select_range_check{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Select Range Check", - "metric": "", - "refId": "D", - "step": 20 - }, - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(rate(mysql_global_status_select_scan{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Select Scan", - "metric": "", - "refId": "E", - "step": 20 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "MySQL Select Types", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "logBase": 1, - "max": null, - "min": 0, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "collapsed": false, - "datasource": "$datasource", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 30 - }, - "id": 386, - "panels": [ ], - "repeat": null, - "title": "Sorts", - "type": "row" - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "decimals": 2, - "description": "**MySQL Sorts**\n\nDue to a query's structure, order, or other requirements, MySQL sorts the rows before returning them. For example, if a table is ordered 1 to 10 but you want the results reversed, MySQL then has to sort the rows to return 10 to 1.\n\nThis graph also shows when sorts had to scan a whole table or a given range of a table in order to return the results and which could not have been sorted via an index.", - "editable": true, - "error": false, - "fieldConfig": { - "defaults": { - "custom": { }, - "unit": "short" - }, - "overrides": [ ] - }, - "fill": 2, - "fillGradient": 0, - "grid": { }, - "gridPos": { - "h": 7, - "w": 12, - "x": 0, - "y": 31 - }, - "hiddenSeries": false, - "id": 30, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "hideZero": true, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "sort": "avg", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [ ], - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(rate(mysql_global_status_sort_rows{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Sort Rows", - "metric": "", - "refId": "A", - "step": 20 - }, - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(rate(mysql_global_status_sort_range{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Sort Range", - "metric": "", - "refId": "B", - "step": 20 - }, - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(rate(mysql_global_status_sort_merge_passes{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Sort Merge Passes", - "metric": "", - "refId": "C", - "step": 20 - }, - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(rate(mysql_global_status_sort_scan{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Sort Scan", - "metric": "", - "refId": "D", - "step": 20 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "MySQL Sorts", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "logBase": 1, - "max": null, - "min": 0, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "decimals": 2, - "description": "**MySQL Slow Queries**\n\nSlow queries are defined as queries being slower than the long_query_time setting. For example, if you have long_query_time set to 3, all queries that take longer than 3 seconds to complete will show on this graph.", - "editable": true, - "error": false, - "fieldConfig": { - "defaults": { - "custom": { }, - "unit": "short" - }, - "overrides": [ ] - }, - "fill": 2, - "fillGradient": 0, - "grid": { }, - "gridPos": { - "h": 7, - "w": 12, - "x": 12, - "y": 31 - }, - "hiddenSeries": false, - "id": 48, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "max": true, - "min": true, - "show": true, - "sort": "avg", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [ ], - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(rate(mysql_global_status_slow_queries{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Slow Queries", - "metric": "", - "refId": "A", - "step": 20 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "MySQL Slow Queries", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "cumulative" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": "", - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": "", - "logBase": 1, - "max": null, - "min": 0, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "collapsed": false, - "datasource": "$datasource", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 38 - }, - "id": 387, - "panels": [ ], - "repeat": null, - "title": "Aborted", - "type": "row" - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "decimals": 2, - "description": "**Aborted Connections**\n\nWhen a given host connects to MySQL and the connection is interrupted in the middle (for example due to bad credentials), MySQL keeps that info in a system table (since 5.6 this table is exposed in performance_schema).\n\nIf the amount of failed requests without a successful connection reaches the value of max_connect_errors, mysqld assumes that something is wrong and blocks the host from further connection.\n\nTo allow connections from that host again, you need to issue the ``FLUSH HOSTS`` statement.", - "editable": true, - "error": false, - "fieldConfig": { - "defaults": { - "custom": { }, - "unit": "short" - }, - "overrides": [ ] - }, - "fill": 2, - "fillGradient": 0, - "grid": { }, - "gridPos": { - "h": 7, - "w": 12, - "x": 0, - "y": 39 - }, - "hiddenSeries": false, - "id": 47, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "max": true, - "min": true, - "show": true, - "sort": "avg", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [ ], - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(rate(mysql_global_status_aborted_connects{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Aborted Connects (attempts)", - "metric": "", - "refId": "A", - "step": 20 - }, - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(rate(mysql_global_status_aborted_clients{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Aborted Clients (timeout)", - "metric": "", - "refId": "B", - "step": 20, - "target": "" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "MySQL Aborted Connections", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "cumulative" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": "", - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": "", - "logBase": 1, - "max": null, - "min": 0, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "decimals": 2, - "description": "**Table Locks**\n\nMySQL takes a number of different locks for varying reasons. In this graph we see how many Table level locks MySQL has requested from the storage engine. In the case of InnoDB, many times the locks could actually be row locks as it only takes table level locks in a few specific cases.\n\nIt is most useful to compare Locks Immediate and Locks Waited. If Locks waited is rising, it means you have lock contention. Otherwise, Locks Immediate rising and falling is normal activity.", - "editable": true, - "error": false, - "fieldConfig": { - "defaults": { - "custom": { }, - "unit": "short" - }, - "overrides": [ ] - }, - "fill": 2, - "fillGradient": 0, - "grid": { }, - "gridPos": { - "h": 7, - "w": 12, - "x": 12, - "y": 39 - }, - "hiddenSeries": false, - "id": 32, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "sort": "avg", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [ ], - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(rate(mysql_global_status_table_locks_immediate{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Table Locks Immediate", - "metric": "", - "refId": "A", - "step": 20 - }, - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(rate(mysql_global_status_table_locks_waited{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Table Locks Waited", - "metric": "", - "refId": "B", - "step": 20 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "MySQL Table Locks", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "logBase": 1, - "max": null, - "min": 0, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "collapsed": false, - "datasource": "$datasource", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 46 - }, - "id": 388, - "panels": [ ], - "repeat": null, - "title": "Network", - "type": "row" - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "decimals": 2, - "description": "**MySQL Network Traffic**\n\nHere we can see how much network traffic is generated by MySQL. Outbound is network traffic sent from MySQL and Inbound is network traffic MySQL has received.", - "editable": true, - "error": false, - "fieldConfig": { - "defaults": { - "custom": { }, - "unit": "short" - }, - "overrides": [ ] - }, - "fill": 6, - "fillGradient": 0, - "grid": { }, - "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 47 - }, - "hiddenSeries": false, - "id": 9, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "sort": "avg", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [ ], - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(rate(mysql_global_status_bytes_received{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Inbound", - "metric": "", - "refId": "A", - "step": 20 - }, - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(rate(mysql_global_status_bytes_sent{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Outbound", - "metric": "", - "refId": "B", - "step": 20 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "MySQL Network Traffic", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "Bps", - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "none", - "logBase": 1, - "max": null, - "min": 0, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "collapsed": false, - "datasource": "$datasource", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 54 - }, - "id": 389, - "panels": [ ], - "repeat": null, - "title": "Memory", - "type": "row" - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "decimals": 0, - "description": "***System Memory***: Total Memory for the system.\\\n***InnoDB Buffer Pool Data***: InnoDB maintains a storage area called the buffer pool for caching data and indexes in memory.\\\n***TokuDB Cache Size***: Similar in function to the InnoDB Buffer Pool, TokuDB will allocate 50% of the installed RAM for its own cache.\\\n***Key Buffer Size***: Index blocks for MYISAM tables are buffered and are shared by all threads. key_buffer_size is the size of the buffer used for index blocks.\\\n***Adaptive Hash Index Size***: When InnoDB notices that some index values are being accessed very frequently, it builds a hash index for them in memory on top of B-Tree indexes.\\\n ***Query Cache Size***: The query cache stores the text of a SELECT statement together with the corresponding result that was sent to the client. The query cache has huge scalability problems in that only one thread can do an operation in the query cache at the same time.\\\n***InnoDB Dictionary Size***: The data dictionary is InnoDB ‘s internal catalog of tables. InnoDB stores the data dictionary on disk, and loads entries into memory while the server is running.\\\n***InnoDB Log Buffer Size***: The MySQL InnoDB log buffer allows transactions to run without having to write the log to disk before the transactions commit.", - "editable": true, - "error": false, - "fieldConfig": { - "defaults": { - "custom": { }, - "unit": "short" - }, - "overrides": [ ] - }, - "fill": 6, - "fillGradient": 0, - "grid": { }, - "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 55 - }, - "hiddenSeries": false, - "id": 50, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "hideEmpty": true, - "hideZero": true, - "max": true, - "min": true, - "rightSide": true, - "show": true, - "sort": "avg", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [ - { - "title": "Detailed descriptions about metrics", - "url": "https://www.percona.com/doc/percona-monitoring-and-management/dashboard.mysql-overview.html#mysql-internal-memory-overview" - } - ], - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "System Memory", - "fill": 0, - "stack": false - } - ], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "expr": "sum(mysql_global_status_innodb_page_size{job=~\"$job\", instance=~\"$instance\"} * on (instance) mysql_global_status_buffer_pool_pages{job=~\"$job\", instance=~\"$instance\", state=\"data\"})", - "format": "time_series", - "hide": false, - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "InnoDB Buffer Pool Data", - "refId": "A", - "step": 20 - }, - { - "expr": "sum(mysql_global_variables_innodb_log_buffer_size{job=~\"$job\", instance=~\"$instance\"})", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "InnoDB Log Buffer Size", - "refId": "D", - "step": 20 - }, - { - "expr": "sum(mysql_global_variables_innodb_additional_mem_pool_size{job=~\"$job\", instance=~\"$instance\"})", - "format": "time_series", - "interval": "1m", - "intervalFactor": 2, - "legendFormat": "InnoDB Additional Memory Pool Size", - "refId": "H", - "step": 40 - }, - { - "expr": "sum(mysql_global_status_innodb_mem_dictionary{job=~\"$job\", instance=~\"$instance\"})", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "InnoDB Dictionary Size", - "refId": "F", - "step": 20 - }, - { - "expr": "sum(mysql_global_variables_key_buffer_size{job=~\"$job\", instance=~\"$instance\"})", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Key Buffer Size", - "refId": "B", - "step": 20 - }, - { - "expr": "sum(mysql_global_variables_query_cache_size{job=~\"$job\", instance=~\"$instance\"})", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Query Cache Size", - "refId": "C", - "step": 20 - }, - { - "expr": "sum(mysql_global_status_innodb_mem_adaptive_hash{job=~\"$job\", instance=~\"$instance\"})", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Adaptive Hash Index Size", - "refId": "E", - "step": 20 - }, - { - "expr": "sum(mysql_global_variables_tokudb_cache_size{job=~\"$job\", instance=~\"$instance\"})", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "TokuDB Cache Size", - "refId": "I", - "step": 20 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "MySQL Internal Memory Overview", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "bytes", - "label": "", - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null + } + ], + "refresh": "30s", + "schemaVersion": 36, + "tags": [ + "mysql-integration" + ], + "templating": { + "list": [ + { + "name": "loki_datasource", + "query": "loki", + "regex": "", + "type": "datasource" + }, + { + "allValue": ".*", + "datasource": "$datasource", + "includeAll": false, + "label": "cluster", + "multi": false, + "name": "cluster", + "options": [], + "query": "label_values(mysql_up, cluster)", + "refresh": 2, + "regex": "", + "sort": 1, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": ".*", + "datasource": { + "type": "loki", + "uid": "${loki_datasource}" + }, + "includeAll": true, + "multi": true, + "name": "cluster", + "query": "label_values({job=\"integrations/mysql\"}, cluster)", + "refresh": 2, + "sort": 1, + "type": "query" + }, + { + "allValue": ".*", + "datasource": { + "type": "loki", + "uid": "${loki_datasource}" + }, + "includeAll": true, + "multi": true, + "name": "job", + "query": "label_values({job=\"integrations/mysql\",cluster=~\"$cluster\"}, job)", + "refresh": 2, + "sort": 1, + "type": "query" + }, + { + "allValue": ".*", + "datasource": { + "type": "loki", + "uid": "${loki_datasource}" + }, + "includeAll": true, + "multi": true, + "name": "instance", + "query": "label_values({job=\"integrations/mysql\",cluster=~\"$cluster\",job=~\"$job\"}, instance)", + "refresh": 2, + "sort": 1, + "type": "query" + }, + { + "allValue": ".*", + "datasource": { + "type": "loki", + "uid": "${loki_datasource}" + }, + "includeAll": true, + "multi": true, + "name": "level", + "query": "label_values({job=\"integrations/mysql\",cluster=~\"$cluster\",job=~\"$job\",instance=~\"$instance\"}, level)", + "refresh": 2, + "sort": 1, + "type": "query" + }, + { + "allValue": ".*", + "datasource": { + "type": "loki", + "uid": "${loki_datasource}" + }, + "includeAll": true, + "multi": true, + "name": "subsystem", + "query": "label_values({job=\"integrations/mysql\",cluster=~\"$cluster\",job=~\"$job\",instance=~\"$instance\",level=~\"$level\"}, subsystem)", + "refresh": 2, + "sort": 1, + "type": "query" + }, + { + "allValue": ".*", + "datasource": { + "type": "loki", + "uid": "${loki_datasource}" + }, + "includeAll": true, + "multi": true, + "name": "err_code", + "query": "label_values({job=\"integrations/mysql\",cluster=~\"$cluster\",job=~\"$job\",instance=~\"$instance\",level=~\"$level\",subsystem=~\"$subsystem\"}, err_code)", + "refresh": 2, + "sort": 1, + "type": "query" + }, + { + "current": { + "selected": false, + "text": "", + "value": "" + }, + "name": "regex_search", + "options": [ + { + "selected": true, + "text": "", + "value": "" + } + ], + "query": "", + "type": "textbox" + } + ] + }, + "time": { + "from": "now-30m", + "to": "now" + }, + "timezone": "utc", + "title": "MySQL logs", + "uid": "mysql-logs" + } + }, + { + "annotations": {}, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Panel", + "metadata": { + "name": "logs-volume" + }, + "spec": { + "datasource": { + "type": "datasource", + "uid": "-- Mixed --" + }, + "fieldConfig": { + "defaults": { + "custom": { + "drawStyle": "bars", + "fillOpacity": 50, + "stacking": { + "mode": "normal" + } + } + }, + "overrides": [ + { + "matcher": { + "id": "byRegexp", + "options": "(E|e)merg|(F|f)atal|(A|a)lert|(C|c)rit.*" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "purple", + "mode": "fixed" } - }, - { - "collapsed": false, - "datasource": "$datasource", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 62 - }, - "id": 390, - "panels": [ ], - "repeat": null, - "title": "Command, Handlers, Processes", - "type": "row" - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "decimals": 2, - "description": "**Top Command Counters**\n\nThe Com_{{xxx}} statement counter variables indicate the number of times each xxx statement has been executed. There is one status variable for each type of statement. For example, Com_delete and Com_update count [``DELETE``](https://dev.mysql.com/doc/refman/5.7/en/delete.html) and [``UPDATE``](https://dev.mysql.com/doc/refman/5.7/en/update.html) statements, respectively. Com_delete_multi and Com_update_multi are similar but apply to [``DELETE``](https://dev.mysql.com/doc/refman/5.7/en/delete.html) and [``UPDATE``](https://dev.mysql.com/doc/refman/5.7/en/update.html) statements that use multiple-table syntax.", - "editable": true, - "error": false, - "fieldConfig": { - "defaults": { - "custom": { }, - "unit": "short" - }, - "overrides": [ ] - }, - "fill": 2, - "fillGradient": 0, - "grid": { }, - "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 63 - }, - "hiddenSeries": false, - "id": 14, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "hideEmpty": false, - "hideZero": false, - "max": true, - "min": true, - "rightSide": true, - "show": true, - "sort": "avg", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [ - { - "title": "Server Status Variables (Com_xxx)", - "url": "https://dev.mysql.com/doc/refman/5.7/en/server-status-variables.html#statvar_Com_xxx" - } - ], - "nullPointMode": "null as zero", - "options": { - "dataLinks": [ ] - }, - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "topk(5, rate(mysql_global_status_commands_total{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])>0)", - "format": "time_series", - "hide": false, - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Com_{{ command }}", - "metric": "", - "refId": "B", - "step": 20 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "Top Command Counters", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "logBase": 1, - "max": null, - "min": 0, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null + } + ] + }, + { + "matcher": { + "id": "byRegexp", + "options": "(E|e)(rr.*|RR.*)" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "red", + "mode": "fixed" } - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "decimals": 2, - "description": "**MySQL Handlers**\n\nHandler statistics are internal statistics on how MySQL is selecting, updating, inserting, and modifying rows, tables, and indexes.\n\nThis is in fact the layer between the Storage Engine and MySQL.\n\n* `read_rnd_next` is incremented when the server performs a full table scan and this is a counter you don't really want to see with a high value.\n* `read_key` is incremented when a read is done with an index.\n* `read_next` is incremented when the storage engine is asked to 'read the next index entry'. A high value means a lot of index scans are being done.", - "editable": true, - "error": false, - "fieldConfig": { - "defaults": { - "custom": { }, - "unit": "short" - }, - "overrides": [ ] - }, - "fill": 2, - "fillGradient": 0, - "grid": { }, - "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 70 - }, - "hiddenSeries": false, - "id": 8, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "hideZero": true, - "max": true, - "min": true, - "rightSide": true, - "show": true, - "sort": "avg", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [ ], - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "rate(mysql_global_status_handlers_total{job=~\"$job\",instance=~\"$instance\", handler!~\"commit|rollback|savepoint.*|prepare\"}[$__rate_interval])", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "{{ handler }}", - "metric": "", - "refId": "J", - "step": 20 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "MySQL Handlers", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "logBase": 1, - "max": null, - "min": 0, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null + } + ] + }, + { + "matcher": { + "id": "byRegexp", + "options": "(W|w)(arn.*|ARN.*|rn|RN)" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "orange", + "mode": "fixed" } - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "decimals": 2, - "description": "MySQL Transaction Handlers", - "editable": true, - "error": false, - "fieldConfig": { - "defaults": { - "custom": { }, - "unit": "short" - }, - "overrides": [ ] - }, - "fill": 2, - "fillGradient": 0, - "grid": { }, - "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 77 - }, - "hiddenSeries": false, - "id": 28, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "hideZero": true, - "max": true, - "min": true, - "rightSide": true, - "show": true, - "sort": "avg", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [ ], - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "rate(mysql_global_status_handlers_total{job=~\"$job\",instance=~\"$instance\", handler=~\"commit|rollback|savepoint.*|prepare\"}[$__rate_interval])", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "{{ handler }}", - "metric": "", - "refId": "A", - "step": 20 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "MySQL Transaction Handlers", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "logBase": 1, - "max": null, - "min": 0, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null + } + ] + }, + { + "matcher": { + "id": "byRegexp", + "options": "(N|n)(otice|ote)|(I|i)(nf.*|NF.*)" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "green", + "mode": "fixed" } - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "decimals": 2, - "description": "Process States", - "editable": true, - "error": false, - "fieldConfig": { - "defaults": { - "custom": { }, - "unit": "short" - }, - "overrides": [ ] - }, - "fill": 0, - "fillGradient": 0, - "grid": { }, - "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 84 - }, - "hiddenSeries": false, - "id": 40, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "hideZero": true, - "max": true, - "min": false, - "rightSide": true, - "show": true, - "sort": "avg", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [ ], - "nullPointMode": "null as zero", - "options": { - "dataLinks": [ ] - }, - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "mysql_info_schema_processlist_threads{job=~\"$job\", instance=~\"$instance\"}", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "{{ state }}", - "metric": "", - "refId": "A", - "step": 20 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "Process States", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "logBase": 1, - "max": null, - "min": 0, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null + } + ] + }, + { + "matcher": { + "id": "byRegexp", + "options": "dbg.*|DBG.*|(D|d)(EBUG|ebug)" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "blue", + "mode": "fixed" } - }, - { - "aliasColors": { }, - "bars": true, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "decimals": 2, - "description": "Top Process States Hourly", - "editable": true, - "error": false, - "fieldConfig": { - "defaults": { - "custom": { }, - "unit": "short" - }, - "overrides": [ ] - }, - "fill": 6, - "fillGradient": 0, - "grid": { }, - "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 91 - }, - "hiddenSeries": false, - "id": 49, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "hideZero": true, - "max": true, - "min": false, - "rightSide": true, - "show": true, - "sort": "avg", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": false, - "linewidth": 2, - "links": [ ], - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "topk(5, avg_over_time(mysql_info_schema_processlist_threads{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "{{ state }}", - "metric": "", - "refId": "A", - "step": 3600 - } - ], - "thresholds": [ ], - "timeFrom": "24h", - "timeRegions": [ ], - "timeShift": null, - "title": "Top Process States Hourly", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "logBase": 1, - "max": null, - "min": 0, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null + } + ] + }, + { + "matcher": { + "id": "byRegexp", + "options": "(T|t)(race|RACE)" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "light-blue", + "mode": "fixed" } - }, - { - "collapsed": false, - "datasource": "$datasource", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 98 - }, - "id": 391, - "panels": [ ], - "repeat": null, - "title": "Query Cache", - "type": "row" - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "decimals": 2, - "description": "**MySQL Query Cache Memory**\n\nThe query cache has huge scalability problems in that only one thread can do an operation in the query cache at the same time. This serialization is true not only for SELECTs, but also for INSERT/UPDATE/DELETE.\n\nThis also means that the larger the `query_cache_size` is set to, the slower those operations become. In concurrent environments, the MySQL Query Cache quickly becomes a contention point, decreasing performance. MariaDB and AWS Aurora have done work to try and eliminate the query cache contention in their flavors of MySQL, while MySQL 8.0 has eliminated the query cache feature.\n\nThe recommended settings for most environments is to set:\n ``query_cache_type=0``\n ``query_cache_size=0``\n\nNote that while you can dynamically change these values, to completely remove the contention point you have to restart the database.", - "editable": true, - "error": false, - "fieldConfig": { - "defaults": { - "custom": { }, - "unit": "short" - }, - "overrides": [ ] - }, - "fill": 2, - "fillGradient": 0, - "grid": { }, - "gridPos": { - "h": 7, - "w": 12, - "x": 0, - "y": 99 - }, - "hiddenSeries": false, - "id": 46, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "sort": "avg", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [ ], - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "mysql_global_status_qcache_free_memory{job=~\"$job\", instance=~\"$instance\"}", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Free Memory", - "metric": "", - "refId": "F", - "step": 20 - }, - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "mysql_global_variables_query_cache_size{job=~\"$job\", instance=~\"$instance\"}", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Query Cache Size", - "metric": "", - "refId": "E", - "step": 20 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "MySQL Query Cache Memory", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "bytes", - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "logBase": 1, - "max": null, - "min": 0, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null + } + ] + }, + { + "matcher": { + "id": "byRegexp", + "options": "unknown" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "text", + "mode": "fixed" } - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "decimals": 2, - "description": "**MySQL Query Cache Activity**\n\nThe query cache has huge scalability problems in that only one thread can do an operation in the query cache at the same time. This serialization is true not only for SELECTs, but also for INSERT/UPDATE/DELETE.\n\nThis also means that the larger the `query_cache_size` is set to, the slower those operations become. In concurrent environments, the MySQL Query Cache quickly becomes a contention point, decreasing performance. MariaDB and AWS Aurora have done work to try and eliminate the query cache contention in their flavors of MySQL, while MySQL 8.0 has eliminated the query cache feature.\n\nThe recommended settings for most environments is to set:\n``query_cache_type=0``\n``query_cache_size=0``\n\nNote that while you can dynamically change these values, to completely remove the contention point you have to restart the database.", - "editable": true, - "error": false, - "fieldConfig": { - "defaults": { - "custom": { }, - "unit": "short" - }, - "overrides": [ ] - }, - "fill": 2, - "fillGradient": 0, - "grid": { }, - "gridPos": { - "h": 7, - "w": 12, - "x": 12, - "y": 99 - }, - "height": "", - "hiddenSeries": false, - "id": 45, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "sort": "avg", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [ ], - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "rate(mysql_global_status_qcache_hits{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Hits", - "metric": "", - "refId": "B", - "step": 20 - }, - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "rate(mysql_global_status_qcache_inserts{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Inserts", - "metric": "", - "refId": "C", - "step": 20 - }, - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "rate(mysql_global_status_qcache_not_cached{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Not Cached", - "metric": "", - "refId": "D", - "step": 20 - }, - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "rate(mysql_global_status_qcache_lowmem_prunes{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Prunes", - "metric": "", - "refId": "F", - "step": 20 - }, - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "mysql_global_status_qcache_queries_in_cache{job=~\"$job\", instance=~\"$instance\"}", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Queries in Cache", - "metric": "", - "refId": "E", - "step": 20 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "MySQL Query Cache Activity", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 24 + }, + "id": 1, + "interval": "30s", + "options": { + "tooltip": { + "mode": "multi" + } + }, + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "$loki_datasource" + }, + "expr": "sum by (level) (count_over_time({job=\"integrations/mysql\",cluster=~\"$cluster\",cluster=~\"$cluster\", job=~\"$job\",instance=~\"$instance\",level=~\"$level\",subsystem=~\"$subsystem\",err_code=~\"$err_code\"} \n|~ \"$regex_search\"\n\n[$__interval]))\n", + "legendFormat": "{{ level }}" + } + ], + "title": "Logs volume", + "transformations": [ + { + "id": "renameByRegex", + "options": { + "regex": "Value", + "renamePattern": "unknown" + } + } + ], + "type": "timeseries" + } + }, + { + "annotations": {}, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "logs-volume-0" + }, + "spec": { + "datasource": { + "type": "loki", + "uid": "$loki_datasource" + }, + "expr": "sum by (level) (count_over_time({job=\"integrations/mysql\",cluster=~\"$cluster\",cluster=~\"$cluster\", job=~\"$job\",instance=~\"$instance\",level=~\"$level\",subsystem=~\"$subsystem\",err_code=~\"$err_code\"} \n|~ \"$regex_search\"\n\n[$__interval]))\n", + "legendFormat": "{{ level }}" + } + }, + { + "annotations": {}, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Panel", + "metadata": { + "name": "logs" + }, + "spec": { + "datasource": { + "type": "datasource", + "uid": "-- Mixed --" + }, + "gridPos": { + "h": 18, + "w": 24 + }, + "id": 2, + "options": { + "dedupStrategy": "exact", + "enableLogDetails": true, + "prettifyLogMessage": true, + "showTime": false, + "wrapLogMessage": true + }, + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "$loki_datasource" + }, + "expr": "{job=\"integrations/mysql\",cluster=~\"$cluster\",cluster=~\"$cluster\", job=~\"$job\",instance=~\"$instance\",level=~\"$level\",subsystem=~\"$subsystem\",err_code=~\"$err_code\"} \n|~ \"$regex_search\"\n\n" + } + ], + "title": "Logs", + "type": "logs" + } + }, + { + "annotations": {}, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "logs-0" + }, + "spec": { + "datasource": { + "type": "loki", + "uid": "$loki_datasource" + }, + "expr": "{job=\"integrations/mysql\",cluster=~\"$cluster\",cluster=~\"$cluster\", job=~\"$job\",instance=~\"$instance\",level=~\"$level\",subsystem=~\"$subsystem\",err_code=~\"$err_code\"} \n|~ \"$regex_search\"\n\n" + } + }, + { + "annotations": { + "polly.grafana.com/docs": "MySQL" + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Dashboard", + "metadata": { + "name": "549c2bf8936f7767ea6ac47c47b00f2a" + }, + "spec": { + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations \u0026 Alerts", + "type": "dashboard" + } + ] + }, + "description": "", + "editable": false, + "fiscalYearStartMonth": 0, + "gnetId": 11323, + "graphTooltip": 1, + "id": null, + "links": [ + { + "asDropdown": false, + "includeVars": true, + "keepTime": true, + "tags": [ + "mysql-integration" + ], + "title": "Integration dashboards", + "type": "dashboards" + } + ], + "liveNow": false, + "panels": [ + { + "collapse": false, + "collapsed": false, + "gridPos": { + "h": 2, + "w": 8, + "x": 0, + "y": 0 + }, + "panels": [], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "span": 4, + "title": "Integration Status", + "titleSize": "h6", + "type": "row" + }, + { + "datasource": "$datasource", + "description": "Shows the status of the integration.", + "fieldConfig": { + "defaults": { + "links": [], + "mappings": [ + { + "id": 0, + "options": { + "from": 1, + "result": { + "color": "green", + "index": 0, + "text": "Agent Configured - Sending Metrics" + }, + "to": 10000000000000 + }, + "type": "range" }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "logBase": 1, - "max": null, - "min": 0, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null + { + "id": 1, + "options": { + "from": 0, + "result": { + "color": "red", + "index": 1, + "text": "No Data" + }, + "to": 0 + }, + "type": "range" } - }, - { - "collapsed": false, - "datasource": "$datasource", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 106 - }, - "id": 392, - "panels": [ ], - "repeat": null, - "title": "Files and Tables", - "type": "row" - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "decimals": 2, - "description": "MySQL File Openings", - "editable": true, - "error": false, - "fieldConfig": { - "defaults": { - "custom": { }, - "unit": "short" - }, - "overrides": [ ] - }, - "fill": 2, - "fillGradient": 0, - "grid": { }, - "gridPos": { - "h": 7, - "w": 12, - "x": 0, - "y": 107 - }, - "hiddenSeries": false, - "id": 43, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "sort": "avg", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [ ], - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "rate(mysql_global_status_opened_files{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Openings", - "metric": "", - "refId": "A", - "step": 20 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "MySQL File Openings", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "logBase": 1, - "max": null, - "min": 0, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "decimals": 2, - "description": "MySQL Open Files", - "editable": true, - "error": false, - "fieldConfig": { - "defaults": { - "custom": { }, - "unit": "short" - }, - "overrides": [ ] - }, - "fill": 2, - "fillGradient": 0, - "grid": { }, - "gridPos": { - "h": 7, - "w": 12, - "x": 12, - "y": 107 - }, - "hiddenSeries": false, - "id": 41, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "sort": "avg", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [ ], - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "mysql_global_status_open_files{job=~\"$job\", instance=~\"$instance\"}", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Open Files", - "metric": "", - "refId": "A", - "step": 20 - }, - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "mysql_global_variables_open_files_limit{job=~\"$job\", instance=~\"$instance\"}", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Open Files Limit", - "metric": "", - "refId": "D", - "step": 20 - }, - { - "expr": "mysql_global_status_innodb_num_open_files{job=~\"$job\", instance=~\"$instance\"}", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "InnoDB Open Files", - "refId": "B", - "step": 20 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "MySQL Open Files", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "logBase": 1, - "max": null, - "min": 0, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "collapsed": false, - "datasource": "$datasource", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 114 - }, - "id": 393, - "panels": [ ], - "repeat": null, - "title": "Table Openings", - "type": "row" - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "decimals": 2, - "description": "**MySQL Table Open Cache Status**\n\nThe recommendation is to set the `table_open_cache_instances` to a loose correlation to virtual CPUs, keeping in mind that more instances means the cache is split more times. If you have a cache set to 500 but it has 10 instances, each cache will only have 50 cached.\n\nThe `table_definition_cache` and `table_open_cache` can be left as default as they are auto-sized MySQL 5.6 and above (ie: do not set them to any value).", - "editable": true, - "error": false, - "fieldConfig": { - "defaults": { - "custom": { }, - "unit": "short" - }, - "overrides": [ ] - }, - "fill": 2, - "fillGradient": 0, - "grid": { }, - "gridPos": { - "h": 7, - "w": 12, - "x": 0, - "y": 115 - }, - "hiddenSeries": false, - "id": 44, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "sort": "avg", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [ - { - "title": "Server Status Variables (table_open_cache)", - "url": "http://dev.mysql.com/doc/refman/5.6/en/server-system-variables.html#sysvar_table_open_cache" - } - ], - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "Table Open Cache Hit Ratio", - "yaxis": 2 - } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "rate(mysql_global_status_opened_tables{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Openings", - "metric": "", - "refId": "A", - "step": 20 - }, - { - "expr": "rate(mysql_global_status_table_open_cache_hits{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Hits", - "refId": "B", - "step": 20 - }, - { - "expr": "rate(mysql_global_status_table_open_cache_misses{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Misses", - "refId": "C", - "step": 20 - }, - { - "expr": "rate(mysql_global_status_table_open_cache_overflows{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Misses due to Overflows", - "refId": "D", - "step": 20 - }, - { - "expr": "rate(mysql_global_status_table_open_cache_hits{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])/(rate(mysql_global_status_table_open_cache_hits{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])+rate(mysql_global_status_table_open_cache_misses{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Table Open Cache Hit Ratio", - "refId": "E", - "step": 20 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "MySQL Table Open Cache Status", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "percentunit", - "logBase": 1, - "max": null, - "min": 0, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "decimals": 2, - "description": "**MySQL Open Tables**\n\nThe recommendation is to set the `table_open_cache_instances` to a loose correlation to virtual CPUs, keeping in mind that more instances means the cache is split more times. If you have a cache set to 500 but it has 10 instances, each cache will only have 50 cached.\n\nThe `table_definition_cache` and `table_open_cache` can be left as default as they are auto-sized MySQL 5.6 and above (ie: do not set them to any value).", - "editable": true, - "error": false, - "fieldConfig": { - "defaults": { - "custom": { }, - "unit": "short" - }, - "overrides": [ ] - }, - "fill": 2, - "fillGradient": 0, - "grid": { }, - "gridPos": { - "h": 7, - "w": 12, - "x": 12, - "y": 115 - }, - "hiddenSeries": false, - "id": 42, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "sort": "avg", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [ - { - "title": "Server Status Variables (table_open_cache)", - "url": "http://dev.mysql.com/doc/refman/5.6/en/server-system-variables.html#sysvar_table_open_cache" - } - ], - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "mysql_global_status_open_tables{job=~\"$job\", instance=~\"$instance\"}", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Open Tables", - "metric": "", - "refId": "B", - "step": 20 - }, - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "mysql_global_variables_table_open_cache{job=~\"$job\", instance=~\"$instance\"}", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Table Open Cache", - "metric": "", - "refId": "C", - "step": 20 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "MySQL Open Tables", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "logBase": 1, - "max": null, - "min": 0, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "collapsed": false, - "datasource": "$datasource", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 122 - }, - "id": 394, - "panels": [ ], - "repeat": null, - "title": "MySQL Table Definition Cache", - "type": "row" - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "decimals": 2, - "description": "**MySQL Table Definition Cache**\n\nThe recommendation is to set the `table_open_cache_instances` to a loose correlation to virtual CPUs, keeping in mind that more instances means the cache is split more times. If you have a cache set to 500 but it has 10 instances, each cache will only have 50 cached.\n\nThe `table_definition_cache` and `table_open_cache` can be left as default as they are auto-sized MySQL 5.6 and above (ie: do not set them to any value).", - "editable": true, - "error": false, - "fieldConfig": { - "defaults": { - "custom": { }, - "unit": "short" - }, - "overrides": [ ] - }, - "fill": 2, - "fillGradient": 0, - "grid": { }, - "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 123 - }, - "hiddenSeries": false, - "id": 54, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "sort": "avg", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [ - { - "title": "Server Status Variables (table_open_cache)", - "url": "http://dev.mysql.com/doc/refman/5.6/en/server-system-variables.html#sysvar_table_open_cache" - } - ], - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "Opened Table Definitions", - "yaxis": 2 - } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "mysql_global_status_open_table_definitions{job=~\"$job\", instance=~\"$instance\"}", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Open Table Definitions", - "metric": "", - "refId": "B", - "step": 20 - }, - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "mysql_global_variables_table_definition_cache{job=~\"$job\", instance=~\"$instance\"}", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Table Definitions Cache Size", - "metric": "", - "refId": "C", - "step": 20 - }, - { - "expr": "rate(mysql_global_status_opened_table_definitions{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Opened Table Definitions", - "refId": "A", - "step": 20 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "MySQL Table Definition Cache", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "logBase": 1, - "max": null, - "min": 0, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - } - ], - "refresh": "30s", - "schemaVersion": 25, - "style": "dark", - "tags": [ - "mysql-integration" - ], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "prometheus", - "value": "prometheus" - }, - "hide": 0, - "includeAll": false, - "label": "Data Source", - "multi": false, - "name": "datasource", - "options": [ ], - "query": "prometheus", - "refresh": 1, - "regex": "(?!grafanacloud-usage|grafanacloud-ml-metrics).+", - "skipUrlSync": false, - "type": "datasource" - }, - { - "allValue": ".+", - "current": { - "selected": true, - "text": "hosted-grafana/cloudsql-proxy-mysql-exporter", - "value": [ - "hosted-grafana/cloudsql-proxy-mysql-exporter" - ] - }, - "datasource": "$datasource", - "definition": "label_values(mysql_up, job)", - "hide": 0, - "includeAll": true, - "label": "job", - "multi": true, - "name": "job", - "options": [ ], - "query": "label_values(mysql_up, job)", - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [ ], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": ".+", - "current": { - "selected": true, - "tags": [ ], - "text": "All", - "value": [ - "$__all" - ] - }, - "datasource": "$datasource", - "definition": "label_values(mysql_up, instance)", - "hide": 0, - "includeAll": true, - "label": "instance", - "multi": true, - "name": "instance", - "options": [ ], - "query": "label_values(mysql_up, instance)", - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [ ], - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-30m", - "to": "now" - }, - "timepicker": { - "collapse": false, - "enable": true, - "hidden": false, - "notice": false, - "now": true, - "refresh_intervals": [ - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "status": "Stable", - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ], - "type": "timepicker" - }, - "timezone": "", - "title": "MySQL", - "uid": "549c2bf8936f7767ea6ac47c47b00f2a", - "version": 1 - } - }, - { - "annotations": { }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Panel", - "metadata": { - "name": "integration-status" - }, - "spec": { - "collapse": false, - "collapsed": false, - "gridPos": { - "h": 2, - "w": 8, - "x": 0, - "y": 0 - }, - "panels": [ ], - "repeat": null, - "repeatIteration": null, - "repeatRowId": null, - "showTitle": true, - "span": 4, - "title": "Integration Status", - "titleSize": "h6", - "type": "row" - } - }, - { - "annotations": { - "polly.grafana.com/docs": "Shows the status of the integration." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Panel", - "metadata": { - "name": "integration-status" - }, - "spec": { - "datasource": "$datasource", - "description": "Shows the status of the integration.", - "fieldConfig": { - "defaults": { - "links": [ ], - "mappings": [ - { - "id": 0, - "options": { - "from": 1, - "result": { - "color": "green", - "index": 0, - "text": "Agent Configured - Sending Metrics" - }, - "to": 10000000000000 - }, - "type": "range" - }, - { - "id": 1, - "options": { - "from": 0, - "result": { - "color": "red", - "index": 1, - "text": "No Data" - }, - "to": 0 - }, - "type": "range" - } - ], - "noValue": "No Data", - "thresholds": { - "mode": "absolute", - "steps": [ ] - }, - "unit": "string" - } + ], + "noValue": "No Data", + "thresholds": { + "mode": "absolute", + "steps": [] + }, + "unit": "string" + } }, "gridPos": { - "h": 2, - "w": 8, - "x": 0, - "y": 0 + "h": 2, + "w": 8, + "x": 0, + "y": 0 }, - "links": [ ], + "links": [], "options": { - "colorMode": "background", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" }, "pluginVersion": "7", "span": 4, "targets": [ - { - "expr": "mysql_global_status_uptime{job=~\"$job\", instance=~\"$instance\"}", - "format": "time_series", - "instant": true, - "intervalFactor": 2, - "legendFormat": "", - "refId": "A" - } + { + "expr": "mysql_global_status_uptime{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}", + "format": "time_series", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "A" + } ], "timeFrom": "now/d", "title": "Integration Status", "transparent": false, "type": "stat" - } - }, - { - "annotations": { - "polly.grafana.com/docs": "Shows the status of the integration." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Target", - "metadata": { - "name": "integration-status-0" - }, - "spec": { - "expr": "mysql_global_status_uptime{job=~\"$job\", instance=~\"$instance\"}", - "format": "time_series", - "instant": true, - "intervalFactor": 2, - "legendFormat": "", - "refId": "A" - } - }, - { - "annotations": { - "polly.grafana.com/docs": "Shows the latest timestamp at which the metrics were received for this integration." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Panel", - "metadata": { - "name": "latest-metric-received" - }, - "spec": { + }, + { "datasource": "$datasource", "description": "Shows the latest timestamp at which the metrics were received for this integration.", "fieldConfig": { - "defaults": { - "links": [ ], - "mappings": [ ], - "noValue": "No Data", - "thresholds": { - "mode": "absolute", - "steps": [ ] - }, - "unit": "dateTimeAsIso" - } + "defaults": { + "links": [], + "mappings": [], + "noValue": "No Data", + "thresholds": { + "mode": "absolute", + "steps": [] + }, + "unit": "dateTimeAsIso" + } }, "gridPos": { - "h": 2, - "w": 8, - "x": 8, - "y": 0 + "h": 2, + "w": 8, + "x": 8, + "y": 0 }, - "links": [ ], + "links": [], "options": { - "colorMode": "background", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "Time", - "values": false - }, - "textMode": "auto" + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "Time", + "values": false + }, + "textMode": "auto" }, "pluginVersion": "7", "span": 4, "targets": [ - { - "expr": "mysql_global_status_uptime{job=~\"$job\", instance=~\"$instance\"}", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "", - "refId": "A" - } + { + "expr": "mysql_global_status_uptime{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "", + "refId": "A" + } ], "timeFrom": "now/d", "title": "Latest Metric Received", "transparent": false, "type": "stat" - } - }, - { - "annotations": { - "polly.grafana.com/docs": "Shows the latest timestamp at which the metrics were received for this integration." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Target", - "metadata": { - "name": "latest-metric-received-0" - }, - "spec": { - "expr": "mysql_global_status_uptime{job=~\"$job\", instance=~\"$instance\"}", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "", - "refId": "A" - } - }, - { - "annotations": { - "polly.grafana.com/docs": "Shows the installed version of this integration." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Panel", - "metadata": { - "name": "integration-version" - }, - "spec": { + }, + { "datasource": "$datasource", "description": "Shows the installed version of this integration.", "fieldConfig": { - "defaults": { - "links": [ ], - "mappings": [ ], - "noValue": "0.1.1", - "thresholds": { - "mode": "absolute", - "steps": [ ] - }, - "unit": "string" - } + "defaults": { + "links": [], + "mappings": [], + "noValue": "1.0.0", + "thresholds": { + "mode": "absolute", + "steps": [] + }, + "unit": "string" + } }, "gridPos": { - "h": 2, - "w": 8, - "x": 16, - "y": 0 + "h": 2, + "w": 8, + "x": 16, + "y": 0 }, - "links": [ ], + "links": [], "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "mean" - ], - "fields": "", - "values": false - }, - "textMode": "auto" + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "textMode": "auto" }, "pluginVersion": "7", "span": 4, - "targets": [ ], + "targets": [], "title": "Integration Version", "transparent": false, "type": "stat" - } - }, - { - "annotations": { }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Panel", - "metadata": { - "name": "" - }, - "spec": { + }, + { "collapsed": false, - "datasource": "$datasource", + "datasource": { + "uid": "$datasource" + }, "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 2 + "h": 1, + "w": 24, + "x": 0, + "y": 2 }, "id": 382, - "panels": [ ], - "repeat": null, - "title": "", + "panels": [], + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "refId": "A" + } + ], "type": "row" - } - }, - { - "annotations": { - "polly.grafana.com/docs": "**Uptime**\n\nThe amount of time since the last restart of the MySQL server process." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Panel", - "metadata": { - "name": "uptime" - }, - "spec": { - "cacheTimeout": null, - "datasource": "$datasource", + }, + { + "datasource": { + "uid": "$datasource" + }, "description": "**Uptime**\n\nThe amount of time since the last restart of the MySQL server process.", "fieldConfig": { - "defaults": { - "custom": { }, - "decimals": 1, - "mappings": [ ], - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "rgba(245, 54, 54, 0.9)", - "value": null - }, - { - "color": "rgba(237, 129, 40, 0.89)", - "value": 300 - }, - { - "color": "rgba(50, 172, 45, 0.97)", - "value": 3600 - } - ] - }, - "unit": "s" - }, - "overrides": [ ] + "defaults": { + "decimals": 1, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(245, 54, 54, 0.9)", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 300 + }, + { + "color": "rgba(50, 172, 45, 0.97)", + "value": 3600 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 8, + "x": 0, + "y": 3 + }, + "id": 12, + "interval": "1m", + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "fieldOptions": { + "calcs": [ + "lastNotNull" + ] + }, + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "10.0.2", + "targets": [ + { + "calculatedInterval": "10m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "mysql_global_status_uptime{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "{{instance}}", + "metric": "", + "refId": "A", + "step": 300 + } + ], + "title": "Uptime", + "type": "stat" + }, + { + "datasource": { + "uid": "$datasource" + }, + "description": "**Current QPS**\n\nBased on the queries reported by MySQL's ``SHOW STATUS`` command, it is the number of statements executed by the server within the last second. This variable includes statements executed within stored programs, unlike the Questions variable. It does not count \n``COM_PING`` or ``COM_STATISTICS`` commands.", + "fieldConfig": { + "defaults": { + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(245, 54, 54, 0.9)", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 35 + }, + { + "color": "rgba(50, 172, 45, 0.97)", + "value": 75 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 8, + "x": 8, + "y": 3 + }, + "id": 13, + "interval": "1m", + "links": [ + { + "targetBlank": true, + "title": "MySQL Server Status Variables", + "url": "https://dev.mysql.com/doc/refman/5.7/en/server-status-variables.html#statvar_Queries" + } + ], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "fieldOptions": { + "calcs": [ + "lastNotNull" + ] + }, + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "10.0.2", + "targets": [ + { + "calculatedInterval": "10m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "rate(mysql_global_status_queries{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "{{instance}}", + "metric": "", + "refId": "A", + "step": 20 + } + ], + "title": "Current QPS", + "type": "stat" + }, + { + "datasource": { + "uid": "$datasource" + }, + "description": "**InnoDB Buffer Pool Size**\n\nInnoDB maintains a storage area called the buffer pool for caching data and indexes in memory. Knowing how the InnoDB buffer pool works, and taking advantage of it to keep frequently accessed data in memory, is one of the most important aspects of MySQL tuning. The goal is to keep the working set in memory. In most cases, this should be between 60%-90% of available memory on a dedicated database host, but depends on many factors.", + "fieldConfig": { + "defaults": { + "decimals": 0, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(50, 172, 45, 0.97)", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 90 + }, + { + "color": "rgba(245, 54, 54, 0.9)", + "value": 95 + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 8, + "x": 16, + "y": 3 + }, + "id": 51, + "interval": "1m", + "links": [ + { + "targetBlank": true, + "title": "Tuning the InnoDB Buffer Pool Size", + "url": "https://www.percona.com/blog/2015/06/02/80-ram-tune-innodb_buffer_pool_size/" + } + ], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "fieldOptions": { + "calcs": [ + "lastNotNull" + ] + }, + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "10.0.2", + "targets": [ + { + "calculatedInterval": "10m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "mysql_global_variables_innodb_buffer_pool_size{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "{{instance}}", + "metric": "", + "refId": "A", + "step": 300 + } + ], + "title": "InnoDB Buffer Pool", + "type": "stat" + }, + { + "collapsed": false, + "datasource": { + "uid": "$datasource" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 6 + }, + "id": 383, + "panels": [], + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "refId": "A" + } + ], + "title": "Connections", + "type": "row" + }, + { + "datasource": { + "uid": "$datasource" + }, + "description": "**Max Connections** \n\nMax Connections is the maximum permitted number of simultaneous client connections. By default, this is 151. Increasing this value increases the number of file descriptors that mysqld requires. If the required number of descriptors are not available, the server reduces the value of Max Connections.\n\nmysqld actually permits Max Connections + 1 clients to connect. The extra connection is reserved for use by accounts that have the SUPER privilege, such as root.\n\nMax Used Connections is the maximum number of connections that have been in use simultaneously since the server started.\n\nConnections is the number of connection attempts (successful or not) to the MySQL server.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 20, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Max Connections" + }, + "properties": [ + { + "id": "custom.fillOpacity", + "value": 0 + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 7 + }, + "id": 92, + "links": [ + { + "targetBlank": true, + "title": "MySQL Server System Variables", + "url": "https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_max_connections" + } + ], + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "min" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.0.2", + "targets": [ + { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(max_over_time(mysql_global_status_threads_connected{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Connections", + "metric": "", + "refId": "A", + "step": 20 + }, + { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(mysql_global_status_max_used_connections{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"})", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Max Used Connections", + "metric": "", + "refId": "C", + "step": 20, + "target": "" + }, + { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(mysql_global_variables_max_connections{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"})", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Max Connections", + "metric": "", + "refId": "B", + "step": 20, + "target": "" + } + ], + "title": "MySQL Connections", + "type": "timeseries" + }, + { + "datasource": { + "uid": "$datasource" + }, + "description": "**MySQL Active Threads**\n\nThreads Connected is the number of open connections, while Threads Running is the number of threads not sleeping.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "Threads", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 20, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Peak Threads Running" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#E24D42", + "mode": "fixed" + } + }, + { + "id": "custom.lineWidth", + "value": 0 + }, + { + "id": "custom.pointSize", + "value": 4 + }, + { + "id": "custom.showPoints", + "value": "always" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Peak Threads Connected" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#1F78C1", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Avg Threads Running" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#EAB839", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 7 + }, + "id": 10, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "min" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.0.2", + "targets": [ + { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(max_over_time(mysql_global_status_threads_connected{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "format": "time_series", + "hide": false, + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Peak Threads Connected", + "metric": "", + "refId": "A", + "step": 20 + }, + { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(max_over_time(mysql_global_status_threads_running{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Peak Threads Running", + "metric": "", + "refId": "B", + "step": 20 + }, + { + "datasource": { + "uid": "$datasource" + }, + "expr": "sum(avg_over_time(mysql_global_status_threads_running{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Avg Threads Running", + "refId": "C", + "step": 20 + } + ], + "title": "MySQL Client Thread Activity", + "type": "timeseries" + }, + { + "collapsed": false, + "datasource": { + "uid": "$datasource" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 14 + }, + "id": 384, + "panels": [], + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "refId": "A" + } + ], + "title": "Table Locks", + "type": "row" + }, + { + "datasource": { + "uid": "$datasource" + }, + "description": "**MySQL Questions**\n\nThe number of statements executed by the server. This includes only statements sent to the server by clients and not statements executed within stored programs, unlike the Queries used in the QPS calculation. \n\nThis variable does not count the following commands:\n* ``COM_PING``\n* ``COM_STATISTICS``\n* ``COM_STMT_PREPARE``\n* ``COM_STMT_CLOSE``\n* ``COM_STMT_RESET``", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 20, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 15 + }, + "id": 53, + "links": [ + { + "targetBlank": true, + "title": "MySQL Queries and Questions", + "url": "https://www.percona.com/blog/2014/05/29/how-mysql-queries-and-questions-are-measured/" + } + ], + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "min" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.0.2", + "targets": [ + { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "rate(mysql_global_status_questions{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "{{instance}}", + "metric": "", + "refId": "A", + "step": 20 + } + ], + "title": "MySQL Questions", + "type": "timeseries" + }, + { + "datasource": { + "uid": "$datasource" + }, + "description": "**MySQL Thread Cache**\n\nThe thread_cache_size variable sets how many threads the server should cache to reuse. When a client disconnects, the client's threads are put in the cache if the cache is not full. It is autosized in MySQL 5.6.8 and above (capped to 100). Requests for threads are satisfied by reusing threads taken from the cache if possible, and only when the cache is empty is a new thread created.\n\n* *Threads_created*: The number of threads created to handle connections.\n* *Threads_cached*: The number of threads in the thread cache.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 20, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Threads Created" + }, + "properties": [ + { + "id": "custom.fillOpacity", + "value": 0 + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 15 + }, + "id": 11, + "links": [ + { + "title": "Tuning information", + "url": "https://dev.mysql.com/doc/refman/5.6/en/server-system-variables.html#sysvar_thread_cache_size" + } + ], + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "min" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.0.2", + "targets": [ + { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(mysql_global_variables_thread_cache_size{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"})", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Thread Cache Size", + "metric": "", + "refId": "B", + "step": 20 + }, + { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(mysql_global_status_threads_cached{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"})", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Threads Cached", + "metric": "", + "refId": "C", + "step": 20 + }, + { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(rate(mysql_global_status_threads_created{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Threads Created", + "metric": "", + "refId": "A", + "step": 20 + } + ], + "title": "MySQL Thread Cache", + "type": "timeseries" + }, + { + "collapsed": false, + "datasource": { + "uid": "$datasource" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 22 + }, + "id": 385, + "panels": [], + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "refId": "A" + } + ], + "title": "Temporary Objects", + "type": "row" + }, + { + "datasource": { + "uid": "$datasource" + }, + "description": "MySQL Temporary Objects", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 20, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 23 + }, + "id": 22, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "min" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.0.2", + "targets": [ + { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(rate(mysql_global_status_created_tmp_tables{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Created Tmp Tables", + "metric": "", + "refId": "A", + "step": 20 + }, + { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(rate(mysql_global_status_created_tmp_disk_tables{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Created Tmp Disk Tables", + "metric": "", + "refId": "B", + "step": 20 + }, + { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(rate(mysql_global_status_created_tmp_files{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Created Tmp Files", + "metric": "", + "refId": "C", + "step": 20 + } + ], + "title": "MySQL Temporary Objects", + "type": "timeseries" + }, + { + "datasource": { + "uid": "$datasource" + }, + "description": "**MySQL Select Types**\n\nAs with most relational databases, selecting based on indexes is more efficient than scanning an entire table's data. Here we see the counters for selects not done with indexes.\n\n* ***Select Scan*** is how many queries caused full table scans, in which all the data in the table had to be read and either discarded or returned.\n* ***Select Range*** is how many queries used a range scan, which means MySQL scanned all rows in a given range.\n* ***Select Full Join*** is the number of joins that are not joined on an index, this is usually a huge performance hit.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 20, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byValue", + "options": { + "op": "gte", + "reducer": "allIsZero", + "value": 0 + } + }, + "properties": [ + { + "id": "custom.hideFrom", + "value": { + "legend": true, + "tooltip": true, + "viz": false + } + } + ] + } + ] }, "gridPos": { - "h": 3, - "w": 8, - "x": 0, - "y": 3 + "h": 7, + "w": 12, + "x": 12, + "y": 23 + }, + "id": 311, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "min" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.0.2", + "targets": [ + { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(rate(mysql_global_status_select_full_join{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Select Full Join", + "metric": "", + "refId": "A", + "step": 20 + }, + { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(rate(mysql_global_status_select_full_range_join{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Select Full Range Join", + "metric": "", + "refId": "B", + "step": 20 + }, + { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(rate(mysql_global_status_select_range{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Select Range", + "metric": "", + "refId": "C", + "step": 20 + }, + { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(rate(mysql_global_status_select_range_check{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Select Range Check", + "metric": "", + "refId": "D", + "step": 20 + }, + { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(rate(mysql_global_status_select_scan{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Select Scan", + "metric": "", + "refId": "E", + "step": 20 + } + ], + "title": "MySQL Select Types", + "type": "timeseries" + }, + { + "collapsed": false, + "datasource": { + "uid": "$datasource" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 30 + }, + "id": 386, + "panels": [], + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "refId": "A" + } + ], + "title": "Sorts", + "type": "row" + }, + { + "datasource": { + "uid": "$datasource" + }, + "description": "**MySQL Sorts**\n\nDue to a query's structure, order, or other requirements, MySQL sorts the rows before returning them. For example, if a table is ordered 1 to 10 but you want the results reversed, MySQL then has to sort the rows to return 10 to 1.\n\nThis graph also shows when sorts had to scan a whole table or a given range of a table in order to return the results and which could not have been sorted via an index.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 20, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byValue", + "options": { + "op": "gte", + "reducer": "allIsZero", + "value": 0 + } + }, + "properties": [ + { + "id": "custom.hideFrom", + "value": { + "legend": true, + "tooltip": true, + "viz": false + } + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 31 + }, + "id": 30, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "min" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.0.2", + "targets": [ + { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(rate(mysql_global_status_sort_rows{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Sort Rows", + "metric": "", + "refId": "A", + "step": 20 + }, + { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(rate(mysql_global_status_sort_range{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Sort Range", + "metric": "", + "refId": "B", + "step": 20 + }, + { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(rate(mysql_global_status_sort_merge_passes{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Sort Merge Passes", + "metric": "", + "refId": "C", + "step": 20 + }, + { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(rate(mysql_global_status_sort_scan{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Sort Scan", + "metric": "", + "refId": "D", + "step": 20 + } + ], + "title": "MySQL Sorts", + "type": "timeseries" + }, + { + "datasource": { + "uid": "$datasource" + }, + "description": "**MySQL Slow Queries**\n\nSlow queries are defined as queries being slower than the long_query_time setting. For example, if you have long_query_time set to 3, all queries that take longer than 3 seconds to complete will show on this graph.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 20, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 31 + }, + "id": 48, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "min" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.0.2", + "targets": [ + { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(rate(mysql_global_status_slow_queries{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Slow Queries", + "metric": "", + "refId": "A", + "step": 20 + } + ], + "title": "MySQL Slow Queries", + "type": "timeseries" + }, + { + "collapsed": false, + "datasource": { + "uid": "$datasource" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 38 + }, + "id": 387, + "panels": [], + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "refId": "A" + } + ], + "title": "Aborted", + "type": "row" + }, + { + "datasource": { + "uid": "$datasource" + }, + "description": "**Aborted Connections**\n\nWhen a given host connects to MySQL and the connection is interrupted in the middle (for example due to bad credentials), MySQL keeps that info in a system table (since 5.6 this table is exposed in performance_schema).\n\nIf the amount of failed requests without a successful connection reaches the value of max_connect_errors, mysqld assumes that something is wrong and blocks the host from further connection.\n\nTo allow connections from that host again, you need to issue the ``FLUSH HOSTS`` statement.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 20, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 39 + }, + "id": 47, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "min" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.0.2", + "targets": [ + { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(rate(mysql_global_status_aborted_connects{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Aborted Connects (attempts)", + "metric": "", + "refId": "A", + "step": 20 + }, + { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(rate(mysql_global_status_aborted_clients{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Aborted Clients (timeout)", + "metric": "", + "refId": "B", + "step": 20, + "target": "" + } + ], + "title": "MySQL Aborted Connections", + "type": "timeseries" + }, + { + "datasource": { + "uid": "$datasource" + }, + "description": "**Table Locks**\n\nMySQL takes a number of different locks for varying reasons. In this graph we see how many Table level locks MySQL has requested from the storage engine. In the case of InnoDB, many times the locks could actually be row locks as it only takes table level locks in a few specific cases.\n\nIt is most useful to compare Locks Immediate and Locks Waited. If Locks waited is rising, it means you have lock contention. Otherwise, Locks Immediate rising and falling is normal activity.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 20, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 39 + }, + "id": 32, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "min" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.0.2", + "targets": [ + { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(rate(mysql_global_status_table_locks_immediate{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Table Locks Immediate", + "metric": "", + "refId": "A", + "step": 20 + }, + { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(rate(mysql_global_status_table_locks_waited{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Table Locks Waited", + "metric": "", + "refId": "B", + "step": 20 + } + ], + "title": "MySQL Table Locks", + "type": "timeseries" + }, + { + "collapsed": false, + "datasource": { + "uid": "$datasource" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 46 + }, + "id": 388, + "panels": [], + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "refId": "A" + } + ], + "title": "Network", + "type": "row" + }, + { + "datasource": { + "uid": "$datasource" + }, + "description": "**MySQL Network Traffic**\n\nHere we can see how much network traffic is generated by MySQL. Outbound is network traffic sent from MySQL and Inbound is network traffic MySQL has received.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 30, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "Bps" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 47 + }, + "id": 9, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "min" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.0.2", + "targets": [ + { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(rate(mysql_global_status_bytes_received{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Inbound", + "metric": "", + "refId": "A", + "step": 20 + }, + { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(rate(mysql_global_status_bytes_sent{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Outbound", + "metric": "", + "refId": "B", + "step": 20 + } + ], + "title": "MySQL Network Traffic", + "type": "timeseries" + }, + { + "collapsed": false, + "datasource": { + "uid": "$datasource" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 54 + }, + "id": 389, + "panels": [], + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "refId": "A" + } + ], + "title": "Memory", + "type": "row" + }, + { + "datasource": { + "uid": "$datasource" + }, + "description": "***System Memory***: Total Memory for the system.\\\n***InnoDB Buffer Pool Data***: InnoDB maintains a storage area called the buffer pool for caching data and indexes in memory.\\\n***TokuDB Cache Size***: Similar in function to the InnoDB Buffer Pool, TokuDB will allocate 50% of the installed RAM for its own cache.\\\n***Key Buffer Size***: Index blocks for MYISAM tables are buffered and are shared by all threads. key_buffer_size is the size of the buffer used for index blocks.\\\n***Adaptive Hash Index Size***: When InnoDB notices that some index values are being accessed very frequently, it builds a hash index for them in memory on top of B-Tree indexes.\\\n ***Query Cache Size***: The query cache stores the text of a SELECT statement together with the corresponding result that was sent to the client. The query cache has huge scalability problems in that only one thread can do an operation in the query cache at the same time.\\\n***InnoDB Dictionary Size***: The data dictionary is InnoDB ‘s internal catalog of tables. InnoDB stores the data dictionary on disk, and loads entries into memory while the server is running.\\\n***InnoDB Log Buffer Size***: The MySQL InnoDB log buffer allows transactions to run without having to write the log to disk before the transactions commit.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 30, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "System Memory" + }, + "properties": [ + { + "id": "custom.fillOpacity", + "value": 0 + }, + { + "id": "custom.stacking", + "value": { + "group": "A", + "mode": "none" + } + } + ] + }, + { + "matcher": { + "id": "byValue", + "options": { + "op": "gte", + "reducer": "allIsZero", + "value": 0 + } + }, + "properties": [ + { + "id": "custom.hideFrom", + "value": { + "legend": true, + "tooltip": true, + "viz": false + } + } + ] + }, + { + "matcher": { + "id": "byValue", + "options": { + "op": "gte", + "reducer": "allIsNull", + "value": 0 + } + }, + "properties": [ + { + "id": "custom.hideFrom", + "value": { + "legend": true, + "tooltip": true, + "viz": false + } + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 55 + }, + "id": 50, + "links": [ + { + "title": "Detailed descriptions about metrics", + "url": "https://www.percona.com/doc/percona-monitoring-and-management/dashboard.mysql-overview.html#mysql-internal-memory-overview" + } + ], + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "min" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.0.2", + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "expr": "sum(mysql_global_status_innodb_page_size{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"} * on (instance) mysql_global_status_buffer_pool_pages{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\", state=\"data\"})", + "format": "time_series", + "hide": false, + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "InnoDB Buffer Pool Data", + "refId": "A", + "step": 20 + }, + { + "datasource": { + "uid": "$datasource" + }, + "expr": "sum(mysql_global_variables_innodb_log_buffer_size{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"})", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "InnoDB Log Buffer Size", + "refId": "D", + "step": 20 + }, + { + "datasource": { + "uid": "$datasource" + }, + "expr": "sum(mysql_global_variables_innodb_additional_mem_pool_size{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"})", + "format": "time_series", + "interval": "1m", + "intervalFactor": 2, + "legendFormat": "InnoDB Additional Memory Pool Size", + "refId": "H", + "step": 40 + }, + { + "datasource": { + "uid": "$datasource" + }, + "expr": "sum(mysql_global_status_innodb_mem_dictionary{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"})", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "InnoDB Dictionary Size", + "refId": "F", + "step": 20 + }, + { + "datasource": { + "uid": "$datasource" + }, + "expr": "sum(mysql_global_variables_key_buffer_size{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"})", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Key Buffer Size", + "refId": "B", + "step": 20 + }, + { + "datasource": { + "uid": "$datasource" + }, + "expr": "sum(mysql_global_variables_query_cache_size{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"})", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Query Cache Size", + "refId": "C", + "step": 20 + }, + { + "datasource": { + "uid": "$datasource" + }, + "expr": "sum(mysql_global_status_innodb_mem_adaptive_hash{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"})", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Adaptive Hash Index Size", + "refId": "E", + "step": 20 + }, + { + "datasource": { + "uid": "$datasource" + }, + "expr": "sum(mysql_global_variables_tokudb_cache_size{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"})", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "TokuDB Cache Size", + "refId": "I", + "step": 20 + } + ], + "title": "MySQL Internal Memory Overview", + "type": "timeseries" + }, + { + "collapsed": false, + "datasource": { + "uid": "$datasource" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 62 + }, + "id": 390, + "panels": [], + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "refId": "A" + } + ], + "title": "Command, Handlers, Processes", + "type": "row" + }, + { + "datasource": { + "uid": "$datasource" + }, + "description": "**Top Command Counters**\n\nThe Com_{{xxx}} statement counter variables indicate the number of times each xxx statement has been executed. There is one status variable for each type of statement. For example, Com_delete and Com_update count [``DELETE``](https://dev.mysql.com/doc/refman/5.7/en/delete.html) and [``UPDATE``](https://dev.mysql.com/doc/refman/5.7/en/update.html) statements, respectively. Com_delete_multi and Com_update_multi are similar but apply to [``DELETE``](https://dev.mysql.com/doc/refman/5.7/en/delete.html) and [``UPDATE``](https://dev.mysql.com/doc/refman/5.7/en/update.html) statements that use multiple-table syntax.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 20, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 63 + }, + "id": 14, + "links": [ + { + "title": "Server Status Variables (Com_xxx)", + "url": "https://dev.mysql.com/doc/refman/5.7/en/server-status-variables.html#statvar_Com_xxx" + } + ], + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "min" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.0.2", + "targets": [ + { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "topk(5, rate(mysql_global_status_commands_total{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])\u003e0)", + "format": "time_series", + "hide": false, + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Com_{{ command }}", + "metric": "", + "refId": "B", + "step": 20 + } + ], + "title": "Top Command Counters", + "type": "timeseries" + }, + { + "datasource": { + "uid": "$datasource" + }, + "description": "**MySQL Handlers**\n\nHandler statistics are internal statistics on how MySQL is selecting, updating, inserting, and modifying rows, tables, and indexes.\n\nThis is in fact the layer between the Storage Engine and MySQL.\n\n* `read_rnd_next` is incremented when the server performs a full table scan and this is a counter you don't really want to see with a high value.\n* `read_key` is incremented when a read is done with an index.\n* `read_next` is incremented when the storage engine is asked to 'read the next index entry'. A high value means a lot of index scans are being done.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 20, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byValue", + "options": { + "op": "gte", + "reducer": "allIsZero", + "value": 0 + } + }, + "properties": [ + { + "id": "custom.hideFrom", + "value": { + "legend": true, + "tooltip": true, + "viz": false + } + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 70 + }, + "id": 8, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "min" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.0.2", + "targets": [ + { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "rate(mysql_global_status_handlers_total{cluster=~\"$cluster\", job=~\"$job\",instance=~\"$instance\", handler!~\"commit|rollback|savepoint.*|prepare\"}[$__rate_interval])", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "{{ handler }}", + "metric": "", + "refId": "J", + "step": 20 + } + ], + "title": "MySQL Handlers", + "type": "timeseries" + }, + { + "datasource": { + "uid": "$datasource" + }, + "description": "MySQL Transaction Handlers", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 20, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byValue", + "options": { + "op": "gte", + "reducer": "allIsZero", + "value": 0 + } + }, + "properties": [ + { + "id": "custom.hideFrom", + "value": { + "legend": true, + "tooltip": true, + "viz": false + } + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 77 + }, + "id": 28, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "min" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.0.2", + "targets": [ + { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "rate(mysql_global_status_handlers_total{cluster=~\"$cluster\", job=~\"$job\",instance=~\"$instance\", handler=~\"commit|rollback|savepoint.*|prepare\"}[$__rate_interval])", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "{{ handler }}", + "metric": "", + "refId": "A", + "step": 20 + } + ], + "title": "MySQL Transaction Handlers", + "type": "timeseries" + }, + { + "datasource": { + "uid": "$datasource" + }, + "description": "Process States", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byValue", + "options": { + "op": "gte", + "reducer": "allIsZero", + "value": 0 + } + }, + "properties": [ + { + "id": "custom.hideFrom", + "value": { + "legend": true, + "tooltip": true, + "viz": false + } + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 84 + }, + "id": 40, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.0.2", + "targets": [ + { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "mysql_info_schema_processlist_threads{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "{{ state }}", + "metric": "", + "refId": "A", + "step": 20 + } + ], + "title": "Process States", + "type": "timeseries" + }, + { + "datasource": { + "uid": "$datasource" + }, + "description": "Top Process States Hourly", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "bars", + "fillOpacity": 100, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byValue", + "options": { + "op": "gte", + "reducer": "allIsZero", + "value": 0 + } + }, + "properties": [ + { + "id": "custom.hideFrom", + "value": { + "legend": true, + "tooltip": true, + "viz": false + } + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 91 + }, + "id": 49, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.0.2", + "targets": [ + { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "topk(5, avg_over_time(mysql_info_schema_processlist_threads{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "{{ state }}", + "metric": "", + "refId": "A", + "step": 3600 + } + ], + "timeFrom": "24h", + "title": "Top Process States Hourly", + "type": "timeseries" + }, + { + "collapsed": false, + "datasource": { + "uid": "$datasource" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 98 + }, + "id": 391, + "panels": [], + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "refId": "A" + } + ], + "title": "Query Cache", + "type": "row" + }, + { + "datasource": { + "uid": "$datasource" + }, + "description": "**MySQL Query Cache Memory**\n\nThe query cache has huge scalability problems in that only one thread can do an operation in the query cache at the same time. This serialization is true not only for SELECTs, but also for INSERT/UPDATE/DELETE.\n\nThis also means that the larger the `query_cache_size` is set to, the slower those operations become. In concurrent environments, the MySQL Query Cache quickly becomes a contention point, decreasing performance. MariaDB and AWS Aurora have done work to try and eliminate the query cache contention in their flavors of MySQL, while MySQL 8.0 has eliminated the query cache feature.\n\nThe recommended settings for most environments is to set:\n ``query_cache_type=0``\n ``query_cache_size=0``\n\nNote that while you can dynamically change these values, to completely remove the contention point you have to restart the database.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 20, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 99 + }, + "id": 46, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "min" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.0.2", + "targets": [ + { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "mysql_global_status_qcache_free_memory{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Free Memory", + "metric": "", + "refId": "F", + "step": 20 + }, + { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "mysql_global_variables_query_cache_size{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Query Cache Size", + "metric": "", + "refId": "E", + "step": 20 + } + ], + "title": "MySQL Query Cache Memory", + "type": "timeseries" + }, + { + "datasource": { + "uid": "$datasource" + }, + "description": "**MySQL Query Cache Activity**\n\nThe query cache has huge scalability problems in that only one thread can do an operation in the query cache at the same time. This serialization is true not only for SELECTs, but also for INSERT/UPDATE/DELETE.\n\nThis also means that the larger the `query_cache_size` is set to, the slower those operations become. In concurrent environments, the MySQL Query Cache quickly becomes a contention point, decreasing performance. MariaDB and AWS Aurora have done work to try and eliminate the query cache contention in their flavors of MySQL, while MySQL 8.0 has eliminated the query cache feature.\n\nThe recommended settings for most environments is to set:\n``query_cache_type=0``\n``query_cache_size=0``\n\nNote that while you can dynamically change these values, to completely remove the contention point you have to restart the database.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 20, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 99 + }, + "id": 45, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "min" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.0.2", + "targets": [ + { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "rate(mysql_global_status_qcache_hits{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Hits", + "metric": "", + "refId": "B", + "step": 20 + }, + { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "rate(mysql_global_status_qcache_inserts{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Inserts", + "metric": "", + "refId": "C", + "step": 20 + }, + { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "rate(mysql_global_status_qcache_not_cached{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Not Cached", + "metric": "", + "refId": "D", + "step": 20 + }, + { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "rate(mysql_global_status_qcache_lowmem_prunes{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Prunes", + "metric": "", + "refId": "F", + "step": 20 + }, + { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "mysql_global_status_qcache_queries_in_cache{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Queries in Cache", + "metric": "", + "refId": "E", + "step": 20 + } + ], + "title": "MySQL Query Cache Activity", + "type": "timeseries" + }, + { + "collapsed": false, + "datasource": { + "uid": "$datasource" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 106 + }, + "id": 392, + "panels": [], + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "refId": "A" + } + ], + "title": "Files and Tables", + "type": "row" + }, + { + "datasource": { + "uid": "$datasource" + }, + "description": "MySQL File Openings", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 20, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 107 + }, + "id": 43, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "min" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.0.2", + "targets": [ + { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "rate(mysql_global_status_opened_files{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Openings", + "metric": "", + "refId": "A", + "step": 20 + } + ], + "title": "MySQL File Openings", + "type": "timeseries" + }, + { + "datasource": { + "uid": "$datasource" + }, + "description": "MySQL Open Files", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 20, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 107 + }, + "id": 41, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "min" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.0.2", + "targets": [ + { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "mysql_global_status_open_files{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Open Files", + "metric": "", + "refId": "A", + "step": 20 + }, + { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "mysql_global_variables_open_files_limit{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Open Files Limit", + "metric": "", + "refId": "D", + "step": 20 + }, + { + "datasource": { + "uid": "$datasource" + }, + "expr": "mysql_global_status_innodb_num_open_files{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "InnoDB Open Files", + "refId": "B", + "step": 20 + } + ], + "title": "MySQL Open Files", + "type": "timeseries" + }, + { + "collapsed": false, + "datasource": { + "uid": "$datasource" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 114 + }, + "id": 393, + "panels": [], + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "refId": "A" + } + ], + "title": "Table Openings", + "type": "row" + }, + { + "datasource": { + "uid": "$datasource" + }, + "description": "**MySQL Table Open Cache Status**\n\nThe recommendation is to set the `table_open_cache_instances` to a loose correlation to virtual CPUs, keeping in mind that more instances means the cache is split more times. If you have a cache set to 500 but it has 10 instances, each cache will only have 50 cached.\n\nThe `table_definition_cache` and `table_open_cache` can be left as default as they are auto-sized MySQL 5.6 and above (ie: do not set them to any value).", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 20, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Table Open Cache Hit Ratio" + }, + "properties": [ + { + "id": "unit", + "value": "percentunit" + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 115 + }, + "id": 44, + "links": [ + { + "title": "Server Status Variables (table_open_cache)", + "url": "http://dev.mysql.com/doc/refman/5.6/en/server-system-variables.html#sysvar_table_open_cache" + } + ], + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "min" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.0.2", + "targets": [ + { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "rate(mysql_global_status_opened_tables{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Openings", + "metric": "", + "refId": "A", + "step": 20 + }, + { + "datasource": { + "uid": "$datasource" + }, + "expr": "rate(mysql_global_status_table_open_cache_hits{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Hits", + "refId": "B", + "step": 20 + }, + { + "datasource": { + "uid": "$datasource" + }, + "expr": "rate(mysql_global_status_table_open_cache_misses{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Misses", + "refId": "C", + "step": 20 + }, + { + "datasource": { + "uid": "$datasource" + }, + "expr": "rate(mysql_global_status_table_open_cache_overflows{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Misses due to Overflows", + "refId": "D", + "step": 20 + }, + { + "datasource": { + "uid": "$datasource" + }, + "expr": "rate(mysql_global_status_table_open_cache_hits{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])/(rate(mysql_global_status_table_open_cache_hits{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])+rate(mysql_global_status_table_open_cache_misses{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Table Open Cache Hit Ratio", + "refId": "E", + "step": 20 + } + ], + "title": "MySQL Table Open Cache Status", + "type": "timeseries" + }, + { + "datasource": { + "uid": "$datasource" + }, + "description": "**MySQL Open Tables**\n\nThe recommendation is to set the `table_open_cache_instances` to a loose correlation to virtual CPUs, keeping in mind that more instances means the cache is split more times. If you have a cache set to 500 but it has 10 instances, each cache will only have 50 cached.\n\nThe `table_definition_cache` and `table_open_cache` can be left as default as they are auto-sized MySQL 5.6 and above (ie: do not set them to any value).", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 20, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 115 + }, + "id": 42, + "links": [ + { + "title": "Server Status Variables (table_open_cache)", + "url": "http://dev.mysql.com/doc/refman/5.6/en/server-system-variables.html#sysvar_table_open_cache" + } + ], + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "min" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.0.2", + "targets": [ + { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "mysql_global_status_open_tables{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Open Tables", + "metric": "", + "refId": "B", + "step": 20 + }, + { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "mysql_global_variables_table_open_cache{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Table Open Cache", + "metric": "", + "refId": "C", + "step": 20 + } + ], + "title": "MySQL Open Tables", + "type": "timeseries" + }, + { + "collapsed": false, + "datasource": { + "uid": "$datasource" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 122 + }, + "id": 394, + "panels": [], + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "refId": "A" + } + ], + "title": "MySQL Table Definition Cache", + "type": "row" + }, + { + "datasource": { + "uid": "$datasource" + }, + "description": "**MySQL Table Definition Cache**\n\nThe recommendation is to set the `table_open_cache_instances` to a loose correlation to virtual CPUs, keeping in mind that more instances means the cache is split more times. If you have a cache set to 500 but it has 10 instances, each cache will only have 50 cached.\n\nThe `table_definition_cache` and `table_open_cache` can be left as default as they are auto-sized MySQL 5.6 and above (ie: do not set them to any value).", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 20, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 123 + }, + "id": 54, + "links": [ + { + "title": "Server Status Variables (table_open_cache)", + "url": "http://dev.mysql.com/doc/refman/5.6/en/server-system-variables.html#sysvar_table_open_cache" + } + ], + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "min" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.0.2", + "targets": [ + { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "mysql_global_status_open_table_definitions{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Open Table Definitions", + "metric": "", + "refId": "B", + "step": 20 + }, + { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "mysql_global_variables_table_definition_cache{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Table Definitions Cache Size", + "metric": "", + "refId": "C", + "step": 20 + }, + { + "datasource": { + "uid": "$datasource" + }, + "expr": "rate(mysql_global_status_opened_table_definitions{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Opened Table Definitions", + "refId": "A", + "step": 20 + } + ], + "title": "MySQL Table Definition Cache", + "type": "timeseries" + } + ], + "refresh": "30s", + "schemaVersion": 38, + "style": "dark", + "tags": [ + "mysql-integration" + ], + "templating": { + "list": [ + { + "current": { + "selected": true, + "text": "prometheus", + "value": "prometheus" + }, + "hide": 0, + "includeAll": false, + "label": "Data Source", + "multi": false, + "name": "datasource", + "options": [], + "query": "prometheus", + "queryValue": "", + "refresh": 1, + "regex": "(?!grafanacloud-usage|grafanacloud-ml-metrics).+", + "skipUrlSync": false, + "type": "datasource" + }, + { + "allValue": ".*", + "datasource": "$datasource", + "includeAll": false, + "label": "cluster", + "multi": false, + "name": "cluster", + "options": [], + "query": "label_values(mysql_up, cluster)", + "refresh": 2, + "regex": "", + "sort": 1, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": ".+", + "current": { + "selected": true, + "text": [ + "All" + ], + "value": [ + "$__all" + ] + }, + "datasource": { + "uid": "$datasource" + }, + "definition": "label_values(mysql_up, job)", + "hide": 0, + "includeAll": true, + "label": "job", + "multi": true, + "name": "job", + "options": [], + "query": "label_values(mysql_up, job)", + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": ".+", + "current": { + "selected": true, + "text": [ + "All" + ], + "value": [ + "$__all" + ] + }, + "datasource": { + "uid": "$datasource" + }, + "definition": "label_values(mysql_up{job=~\"$job\"},instance)", + "hide": 0, + "includeAll": true, + "label": "instance", + "multi": true, + "name": "instance", + "options": [], + "query": "label_values(mysql_up{job=~\"$job\"},instance)", + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-30m", + "to": "now" + }, + "timepicker": { + "collapse": false, + "enable": true, + "hidden": false, + "notice": false, + "now": true, + "refresh_intervals": [ + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "status": "Stable", + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ], + "type": "timepicker" + }, + "timezone": "", + "title": "MySQL", + "uid": "549c2bf8936f7767ea6ac47c47b00f2a", + "version": 10, + "weekStart": "" + } + }, + { + "annotations": {}, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Panel", + "metadata": { + "name": "integration-status" + }, + "spec": { + "collapse": false, + "collapsed": false, + "gridPos": { + "h": 2, + "w": 8, + "x": 0, + "y": 0 + }, + "panels": [], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "span": 4, + "title": "Integration Status", + "titleSize": "h6", + "type": "row" + } + }, + { + "annotations": { + "polly.grafana.com/docs": "Shows the status of the integration." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Panel", + "metadata": { + "name": "integration-status" + }, + "spec": { + "datasource": "$datasource", + "description": "Shows the status of the integration.", + "fieldConfig": { + "defaults": { + "links": [], + "mappings": [ + { + "id": 0, + "options": { + "from": 1, + "result": { + "color": "green", + "index": 0, + "text": "Agent Configured - Sending Metrics" + }, + "to": 10000000000000 + }, + "type": "range" + }, + { + "id": 1, + "options": { + "from": 0, + "result": { + "color": "red", + "index": 1, + "text": "No Data" + }, + "to": 0 + }, + "type": "range" + } + ], + "noValue": "No Data", + "thresholds": { + "mode": "absolute", + "steps": [] + }, + "unit": "string" + } + }, + "gridPos": { + "h": 2, + "w": 8, + "x": 0, + "y": 0 + }, + "links": [], + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "7", + "span": 4, + "targets": [ + { + "expr": "mysql_global_status_uptime{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}", + "format": "time_series", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "A" + } + ], + "timeFrom": "now/d", + "title": "Integration Status", + "transparent": false, + "type": "stat" + } + }, + { + "annotations": { + "polly.grafana.com/docs": "Shows the status of the integration." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "integration-status-0" + }, + "spec": { + "expr": "mysql_global_status_uptime{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}", + "format": "time_series", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "A" + } + }, + { + "annotations": { + "polly.grafana.com/docs": "Shows the latest timestamp at which the metrics were received for this integration." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Panel", + "metadata": { + "name": "latest-metric-received" + }, + "spec": { + "datasource": "$datasource", + "description": "Shows the latest timestamp at which the metrics were received for this integration.", + "fieldConfig": { + "defaults": { + "links": [], + "mappings": [], + "noValue": "No Data", + "thresholds": { + "mode": "absolute", + "steps": [] + }, + "unit": "dateTimeAsIso" + } + }, + "gridPos": { + "h": 2, + "w": 8, + "x": 8, + "y": 0 + }, + "links": [], + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "Time", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "7", + "span": 4, + "targets": [ + { + "expr": "mysql_global_status_uptime{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "", + "refId": "A" + } + ], + "timeFrom": "now/d", + "title": "Latest Metric Received", + "transparent": false, + "type": "stat" + } + }, + { + "annotations": { + "polly.grafana.com/docs": "Shows the latest timestamp at which the metrics were received for this integration." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "latest-metric-received-0" + }, + "spec": { + "expr": "mysql_global_status_uptime{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "", + "refId": "A" + } + }, + { + "annotations": { + "polly.grafana.com/docs": "Shows the installed version of this integration." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Panel", + "metadata": { + "name": "integration-version" + }, + "spec": { + "datasource": "$datasource", + "description": "Shows the installed version of this integration.", + "fieldConfig": { + "defaults": { + "links": [], + "mappings": [], + "noValue": "1.0.0", + "thresholds": { + "mode": "absolute", + "steps": [] + }, + "unit": "string" + } + }, + "gridPos": { + "h": 2, + "w": 8, + "x": 16, + "y": 0 + }, + "links": [], + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "7", + "span": 4, + "targets": [], + "title": "Integration Version", + "transparent": false, + "type": "stat" + } + }, + { + "annotations": {}, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Panel", + "metadata": { + "name": "" + }, + "spec": { + "collapsed": false, + "datasource": { + "uid": "$datasource" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 2 + }, + "id": 382, + "panels": [], + "targets": [ + { + "datasource": { + "uid": "$datasource" }, - "id": 12, - "interval": "1m", - "links": [ ], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": [ - "lastNotNull" - ] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "mean" - ], - "fields": "", - "values": false - } - }, - "pluginVersion": "7.0.4", - "targets": [ - { - "calculatedInterval": "10m", - "datasourceErrors": { }, - "errors": { }, - "expr": "mysql_global_status_uptime{job=~\"$job\", instance=~\"$instance\"}", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "{{instance}}", - "metric": "", - "refId": "A", - "step": 300 - } + "refId": "A" + } + ], + "type": "row" + } + }, + { + "annotations": {}, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "-0" + }, + "spec": { + "datasource": { + "uid": "$datasource" + }, + "refId": "A" + } + }, + { + "annotations": { + "polly.grafana.com/docs": "**Uptime**\n\nThe amount of time since the last restart of the MySQL server process." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Panel", + "metadata": { + "name": "uptime" + }, + "spec": { + "datasource": { + "uid": "$datasource" + }, + "description": "**Uptime**\n\nThe amount of time since the last restart of the MySQL server process.", + "fieldConfig": { + "defaults": { + "decimals": 1, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(245, 54, 54, 0.9)", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 300 + }, + { + "color": "rgba(50, 172, 45, 0.97)", + "value": 3600 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 8, + "x": 0, + "y": 3 + }, + "id": 12, + "interval": "1m", + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "fieldOptions": { + "calcs": [ + "lastNotNull" + ] + }, + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "last" ], - "title": "Uptime", - "type": "stat" - } - }, - { - "annotations": { - "polly.grafana.com/docs": "**Uptime**\n\nThe amount of time since the last restart of the MySQL server process." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Target", - "metadata": { - "name": "uptime-0" - }, - "spec": { + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "10.0.2", + "targets": [ + { "calculatedInterval": "10m", - "datasourceErrors": { }, - "errors": { }, - "expr": "mysql_global_status_uptime{job=~\"$job\", instance=~\"$instance\"}", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "mysql_global_status_uptime{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}", "format": "time_series", "interval": "1m", "intervalFactor": 1, @@ -4971,116 +5375,122 @@ "metric": "", "refId": "A", "step": 300 - } - }, - { - "annotations": { - "polly.grafana.com/docs": "**Current QPS**\n\nBased on the queries reported by MySQL's ``SHOW STATUS`` command, it is the number of statements executed by the server within the last second. This variable includes statements executed within stored programs, unlike the Questions variable. It does not count \n``COM_PING`` or ``COM_STATISTICS`` commands." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Panel", - "metadata": { - "name": "current-qps" - }, - "spec": { - "cacheTimeout": null, - "datasource": "$datasource", - "description": "**Current QPS**\n\nBased on the queries reported by MySQL's ``SHOW STATUS`` command, it is the number of statements executed by the server within the last second. This variable includes statements executed within stored programs, unlike the Questions variable. It does not count \n``COM_PING`` or ``COM_STATISTICS`` commands.", - "fieldConfig": { - "defaults": { - "custom": { }, - "decimals": 2, - "mappings": [ ], - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "rgba(245, 54, 54, 0.9)", - "value": null - }, - { - "color": "rgba(237, 129, 40, 0.89)", - "value": 35 - }, - { - "color": "rgba(50, 172, 45, 0.97)", - "value": 75 - } - ] - }, - "unit": "short" - }, - "overrides": [ ] - }, - "gridPos": { - "h": 3, - "w": 8, - "x": 8, - "y": 3 - }, - "id": 13, - "interval": "1m", - "links": [ - { - "targetBlank": true, - "title": "MySQL Server Status Variables", - "url": "https://dev.mysql.com/doc/refman/5.7/en/server-status-variables.html#statvar_Queries" - } - ], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": [ - "lastNotNull" - ] - }, - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "mean" - ], - "fields": "", - "values": false - } - }, - "pluginVersion": "7.0.4", - "targets": [ - { - "calculatedInterval": "10m", - "datasourceErrors": { }, - "errors": { }, - "expr": "rate(mysql_global_status_queries{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "{{instance}}", - "metric": "", - "refId": "A", - "step": 20 - } + } + ], + "title": "Uptime", + "type": "stat" + } + }, + { + "annotations": { + "polly.grafana.com/docs": "**Uptime**\n\nThe amount of time since the last restart of the MySQL server process." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "uptime-0" + }, + "spec": { + "calculatedInterval": "10m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "mysql_global_status_uptime{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "{{instance}}", + "metric": "", + "refId": "A", + "step": 300 + } + }, + { + "annotations": { + "polly.grafana.com/docs": "**Current QPS**\n\nBased on the queries reported by MySQL's ``SHOW STATUS`` command, it is the number of statements executed by the server within the last second. This variable includes statements executed within stored programs, unlike the Questions variable. It does not count \n``COM_PING`` or ``COM_STATISTICS`` commands." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Panel", + "metadata": { + "name": "current-qps" + }, + "spec": { + "datasource": { + "uid": "$datasource" + }, + "description": "**Current QPS**\n\nBased on the queries reported by MySQL's ``SHOW STATUS`` command, it is the number of statements executed by the server within the last second. This variable includes statements executed within stored programs, unlike the Questions variable. It does not count \n``COM_PING`` or ``COM_STATISTICS`` commands.", + "fieldConfig": { + "defaults": { + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(245, 54, 54, 0.9)", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 35 + }, + { + "color": "rgba(50, 172, 45, 0.97)", + "value": 75 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 8, + "x": 8, + "y": 3 + }, + "id": 13, + "interval": "1m", + "links": [ + { + "targetBlank": true, + "title": "MySQL Server Status Variables", + "url": "https://dev.mysql.com/doc/refman/5.7/en/server-status-variables.html#statvar_Queries" + } + ], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "fieldOptions": { + "calcs": [ + "lastNotNull" + ] + }, + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "last" ], - "title": "Current QPS", - "type": "stat" - } - }, - { - "annotations": { - "polly.grafana.com/docs": "**Current QPS**\n\nBased on the queries reported by MySQL's ``SHOW STATUS`` command, it is the number of statements executed by the server within the last second. This variable includes statements executed within stored programs, unlike the Questions variable. It does not count \n``COM_PING`` or ``COM_STATISTICS`` commands." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Target", - "metadata": { - "name": "current-qps-0" - }, - "spec": { + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "10.0.2", + "targets": [ + { "calculatedInterval": "10m", - "datasourceErrors": { }, - "errors": { }, - "expr": "rate(mysql_global_status_queries{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "rate(mysql_global_status_queries{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", "format": "time_series", "interval": "1m", "intervalFactor": 1, @@ -5088,116 +5498,122 @@ "metric": "", "refId": "A", "step": 20 - } - }, - { - "annotations": { - "polly.grafana.com/docs": "**InnoDB Buffer Pool Size**\n\nInnoDB maintains a storage area called the buffer pool for caching data and indexes in memory. Knowing how the InnoDB buffer pool works, and taking advantage of it to keep frequently accessed data in memory, is one of the most important aspects of MySQL tuning. The goal is to keep the working set in memory. In most cases, this should be between 60%-90% of available memory on a dedicated database host, but depends on many factors." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Panel", - "metadata": { - "name": "innodb-buffer-pool" - }, - "spec": { - "cacheTimeout": null, - "datasource": "$datasource", - "description": "**InnoDB Buffer Pool Size**\n\nInnoDB maintains a storage area called the buffer pool for caching data and indexes in memory. Knowing how the InnoDB buffer pool works, and taking advantage of it to keep frequently accessed data in memory, is one of the most important aspects of MySQL tuning. The goal is to keep the working set in memory. In most cases, this should be between 60%-90% of available memory on a dedicated database host, but depends on many factors.", - "fieldConfig": { - "defaults": { - "custom": { }, - "decimals": 0, - "mappings": [ ], - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "rgba(50, 172, 45, 0.97)", - "value": null - }, - { - "color": "rgba(237, 129, 40, 0.89)", - "value": 90 - }, - { - "color": "rgba(245, 54, 54, 0.9)", - "value": 95 - } - ] - }, - "unit": "bytes" - }, - "overrides": [ ] - }, - "gridPos": { - "h": 3, - "w": 8, - "x": 16, - "y": 3 - }, - "id": 51, - "interval": "1m", - "links": [ - { - "targetBlank": true, - "title": "Tuning the InnoDB Buffer Pool Size", - "url": "https://www.percona.com/blog/2015/06/02/80-ram-tune-innodb_buffer_pool_size/" - } - ], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": [ - "lastNotNull" - ] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "mean" - ], - "fields": "", - "values": false - } - }, - "pluginVersion": "7.0.4", - "targets": [ - { - "calculatedInterval": "10m", - "datasourceErrors": { }, - "errors": { }, - "expr": "mysql_global_variables_innodb_buffer_pool_size{job=~\"$job\", instance=~\"$instance\"}", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "{{instance}}", - "metric": "", - "refId": "A", - "step": 300 - } + } + ], + "title": "Current QPS", + "type": "stat" + } + }, + { + "annotations": { + "polly.grafana.com/docs": "**Current QPS**\n\nBased on the queries reported by MySQL's ``SHOW STATUS`` command, it is the number of statements executed by the server within the last second. This variable includes statements executed within stored programs, unlike the Questions variable. It does not count \n``COM_PING`` or ``COM_STATISTICS`` commands." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "current-qps-0" + }, + "spec": { + "calculatedInterval": "10m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "rate(mysql_global_status_queries{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "{{instance}}", + "metric": "", + "refId": "A", + "step": 20 + } + }, + { + "annotations": { + "polly.grafana.com/docs": "**InnoDB Buffer Pool Size**\n\nInnoDB maintains a storage area called the buffer pool for caching data and indexes in memory. Knowing how the InnoDB buffer pool works, and taking advantage of it to keep frequently accessed data in memory, is one of the most important aspects of MySQL tuning. The goal is to keep the working set in memory. In most cases, this should be between 60%-90% of available memory on a dedicated database host, but depends on many factors." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Panel", + "metadata": { + "name": "innodb-buffer-pool" + }, + "spec": { + "datasource": { + "uid": "$datasource" + }, + "description": "**InnoDB Buffer Pool Size**\n\nInnoDB maintains a storage area called the buffer pool for caching data and indexes in memory. Knowing how the InnoDB buffer pool works, and taking advantage of it to keep frequently accessed data in memory, is one of the most important aspects of MySQL tuning. The goal is to keep the working set in memory. In most cases, this should be between 60%-90% of available memory on a dedicated database host, but depends on many factors.", + "fieldConfig": { + "defaults": { + "decimals": 0, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(50, 172, 45, 0.97)", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 90 + }, + { + "color": "rgba(245, 54, 54, 0.9)", + "value": 95 + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 8, + "x": 16, + "y": 3 + }, + "id": 51, + "interval": "1m", + "links": [ + { + "targetBlank": true, + "title": "Tuning the InnoDB Buffer Pool Size", + "url": "https://www.percona.com/blog/2015/06/02/80-ram-tune-innodb_buffer_pool_size/" + } + ], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "fieldOptions": { + "calcs": [ + "lastNotNull" + ] + }, + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "last" ], - "title": "InnoDB Buffer Pool", - "type": "stat" - } - }, - { - "annotations": { - "polly.grafana.com/docs": "**InnoDB Buffer Pool Size**\n\nInnoDB maintains a storage area called the buffer pool for caching data and indexes in memory. Knowing how the InnoDB buffer pool works, and taking advantage of it to keep frequently accessed data in memory, is one of the most important aspects of MySQL tuning. The goal is to keep the working set in memory. In most cases, this should be between 60%-90% of available memory on a dedicated database host, but depends on many factors." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Target", - "metadata": { - "name": "innodb-buffer-pool-0" - }, - "spec": { + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "10.0.2", + "targets": [ + { "calculatedInterval": "10m", - "datasourceErrors": { }, - "errors": { }, - "expr": "mysql_global_variables_innodb_buffer_pool_size{job=~\"$job\", instance=~\"$instance\"}", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "mysql_global_variables_innodb_buffer_pool_size{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}", "format": "time_series", "interval": "1m", "intervalFactor": 1, @@ -5205,207 +5621,206 @@ "metric": "", "refId": "A", "step": 300 - } - }, - { - "annotations": { }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Panel", - "metadata": { - "name": "connections" - }, - "spec": { - "collapsed": false, - "datasource": "$datasource", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 6 - }, - "id": 383, - "panels": [ ], - "repeat": null, - "title": "Connections", - "type": "row" - } - }, - { - "annotations": { - "polly.grafana.com/docs": "**Max Connections** \n\nMax Connections is the maximum permitted number of simultaneous client connections. By default, this is 151. Increasing this value increases the number of file descriptors that mysqld requires. If the required number of descriptors are not available, the server reduces the value of Max Connections.\n\nmysqld actually permits Max Connections + 1 clients to connect. The extra connection is reserved for use by accounts that have the SUPER privilege, such as root.\n\nMax Used Connections is the maximum number of connections that have been in use simultaneously since the server started.\n\nConnections is the number of connection attempts (successful or not) to the MySQL server." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Panel", - "metadata": { - "name": "mysql-connections" - }, - "spec": { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "decimals": 0, - "description": "**Max Connections** \n\nMax Connections is the maximum permitted number of simultaneous client connections. By default, this is 151. Increasing this value increases the number of file descriptors that mysqld requires. If the required number of descriptors are not available, the server reduces the value of Max Connections.\n\nmysqld actually permits Max Connections + 1 clients to connect. The extra connection is reserved for use by accounts that have the SUPER privilege, such as root.\n\nMax Used Connections is the maximum number of connections that have been in use simultaneously since the server started.\n\nConnections is the number of connection attempts (successful or not) to the MySQL server.", - "editable": true, - "error": false, - "fieldConfig": { - "defaults": { - "custom": { }, - "unit": "short" - }, - "overrides": [ ] - }, - "fill": 2, - "fillGradient": 0, - "grid": { }, - "gridPos": { - "h": 7, - "w": 12, - "x": 0, - "y": 7 + } + ], + "title": "InnoDB Buffer Pool", + "type": "stat" + } + }, + { + "annotations": { + "polly.grafana.com/docs": "**InnoDB Buffer Pool Size**\n\nInnoDB maintains a storage area called the buffer pool for caching data and indexes in memory. Knowing how the InnoDB buffer pool works, and taking advantage of it to keep frequently accessed data in memory, is one of the most important aspects of MySQL tuning. The goal is to keep the working set in memory. In most cases, this should be between 60%-90% of available memory on a dedicated database host, but depends on many factors." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "innodb-buffer-pool-0" + }, + "spec": { + "calculatedInterval": "10m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "mysql_global_variables_innodb_buffer_pool_size{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "{{instance}}", + "metric": "", + "refId": "A", + "step": 300 + } + }, + { + "annotations": {}, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Panel", + "metadata": { + "name": "connections" + }, + "spec": { + "collapsed": false, + "datasource": { + "uid": "$datasource" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 6 + }, + "id": 383, + "panels": [], + "targets": [ + { + "datasource": { + "uid": "$datasource" }, - "height": "250px", - "hiddenSeries": false, - "id": 92, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "max": true, - "min": true, - "show": true, - "sort": "avg", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [ - { - "targetBlank": true, - "title": "MySQL Server System Variables", - "url": "https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_max_connections" - } - ], - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "Max Connections", - "fill": 0 - } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(max_over_time(mysql_global_status_threads_connected{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Connections", - "metric": "", - "refId": "A", - "step": 20 - }, - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(mysql_global_status_max_used_connections{job=~\"$job\", instance=~\"$instance\"})", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Max Used Connections", - "metric": "", - "refId": "C", - "step": 20, - "target": "" - }, - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(mysql_global_variables_max_connections{job=~\"$job\", instance=~\"$instance\"})", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Max Connections", - "metric": "", - "refId": "B", - "step": 20, - "target": "" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "MySQL Connections", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "cumulative" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": "", - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": "", - "logBase": 1, - "max": null, - "min": 0, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null + "refId": "A" + } + ], + "title": "Connections", + "type": "row" + } + }, + { + "annotations": {}, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "connections-0" + }, + "spec": { + "datasource": { + "uid": "$datasource" + }, + "refId": "A" + } + }, + { + "annotations": { + "polly.grafana.com/docs": "**Max Connections** \n\nMax Connections is the maximum permitted number of simultaneous client connections. By default, this is 151. Increasing this value increases the number of file descriptors that mysqld requires. If the required number of descriptors are not available, the server reduces the value of Max Connections.\n\nmysqld actually permits Max Connections + 1 clients to connect. The extra connection is reserved for use by accounts that have the SUPER privilege, such as root.\n\nMax Used Connections is the maximum number of connections that have been in use simultaneously since the server started.\n\nConnections is the number of connection attempts (successful or not) to the MySQL server." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Panel", + "metadata": { + "name": "mysql-connections" + }, + "spec": { + "datasource": { + "uid": "$datasource" + }, + "description": "**Max Connections** \n\nMax Connections is the maximum permitted number of simultaneous client connections. By default, this is 151. Increasing this value increases the number of file descriptors that mysqld requires. If the required number of descriptors are not available, the server reduces the value of Max Connections.\n\nmysqld actually permits Max Connections + 1 clients to connect. The extra connection is reserved for use by accounts that have the SUPER privilege, such as root.\n\nMax Used Connections is the maximum number of connections that have been in use simultaneously since the server started.\n\nConnections is the number of connection attempts (successful or not) to the MySQL server.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 20, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Max Connections" + }, + "properties": [ + { + "id": "custom.fillOpacity", + "value": 0 + } + ] } - } - }, - { - "annotations": { - "polly.grafana.com/docs": "**Max Connections** \n\nMax Connections is the maximum permitted number of simultaneous client connections. By default, this is 151. Increasing this value increases the number of file descriptors that mysqld requires. If the required number of descriptors are not available, the server reduces the value of Max Connections.\n\nmysqld actually permits Max Connections + 1 clients to connect. The extra connection is reserved for use by accounts that have the SUPER privilege, such as root.\n\nMax Used Connections is the maximum number of connections that have been in use simultaneously since the server started.\n\nConnections is the number of connection attempts (successful or not) to the MySQL server." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Target", - "metadata": { - "name": "mysql-connections-0" - }, - "spec": { + ] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 7 + }, + "id": 92, + "links": [ + { + "targetBlank": true, + "title": "MySQL Server System Variables", + "url": "https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_max_connections" + } + ], + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "min" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.0.2", + "targets": [ + { "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(max_over_time(mysql_global_status_threads_connected{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(max_over_time(mysql_global_status_threads_connected{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", "format": "time_series", "interval": "1m", "intervalFactor": 1, @@ -5413,22 +5828,15 @@ "metric": "", "refId": "A", "step": 20 - } - }, - { - "annotations": { - "polly.grafana.com/docs": "**Max Connections** \n\nMax Connections is the maximum permitted number of simultaneous client connections. By default, this is 151. Increasing this value increases the number of file descriptors that mysqld requires. If the required number of descriptors are not available, the server reduces the value of Max Connections.\n\nmysqld actually permits Max Connections + 1 clients to connect. The extra connection is reserved for use by accounts that have the SUPER privilege, such as root.\n\nMax Used Connections is the maximum number of connections that have been in use simultaneously since the server started.\n\nConnections is the number of connection attempts (successful or not) to the MySQL server." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Target", - "metadata": { - "name": "mysql-connections-1" - }, - "spec": { + }, + { "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(mysql_global_status_max_used_connections{job=~\"$job\", instance=~\"$instance\"})", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(mysql_global_status_max_used_connections{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"})", "format": "time_series", "interval": "1m", "intervalFactor": 1, @@ -5437,22 +5845,15 @@ "refId": "C", "step": 20, "target": "" - } - }, - { - "annotations": { - "polly.grafana.com/docs": "**Max Connections** \n\nMax Connections is the maximum permitted number of simultaneous client connections. By default, this is 151. Increasing this value increases the number of file descriptors that mysqld requires. If the required number of descriptors are not available, the server reduces the value of Max Connections.\n\nmysqld actually permits Max Connections + 1 clients to connect. The extra connection is reserved for use by accounts that have the SUPER privilege, such as root.\n\nMax Used Connections is the maximum number of connections that have been in use simultaneously since the server started.\n\nConnections is the number of connection attempts (successful or not) to the MySQL server." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Target", - "metadata": { - "name": "mysql-connections-2" - }, - "spec": { + }, + { "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(mysql_global_variables_max_connections{job=~\"$job\", instance=~\"$instance\"})", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(mysql_global_variables_max_connections{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"})", "format": "time_series", "interval": "1m", "intervalFactor": 1, @@ -5461,186 +5862,253 @@ "refId": "B", "step": 20, "target": "" - } - }, - { - "annotations": { - "polly.grafana.com/docs": "**MySQL Active Threads**\n\nThreads Connected is the number of open connections, while Threads Running is the number of threads not sleeping." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Panel", - "metadata": { - "name": "mysql-client-thread-activity" - }, - "spec": { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "decimals": 2, - "description": "**MySQL Active Threads**\n\nThreads Connected is the number of open connections, while Threads Running is the number of threads not sleeping.", - "editable": true, - "error": false, - "fieldConfig": { - "defaults": { - "custom": { }, - "unit": "short" - }, - "overrides": [ ] - }, - "fill": 2, - "fillGradient": 0, - "grid": { }, - "gridPos": { - "h": 7, - "w": 12, - "x": 12, - "y": 7 - }, - "hiddenSeries": false, - "id": 10, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "sort": "avg", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [ ], - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "Peak Threads Running", - "color": "#E24D42", - "lines": false, - "pointradius": 1, - "points": true - }, - { - "alias": "Peak Threads Connected", - "color": "#1F78C1" - }, - { - "alias": "Avg Threads Running", - "color": "#EAB839" - } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(max_over_time(mysql_global_status_threads_connected{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", - "format": "time_series", - "hide": false, - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Peak Threads Connected", - "metric": "", - "refId": "A", - "step": 20 - }, - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(max_over_time(mysql_global_status_threads_running{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Peak Threads Running", - "metric": "", - "refId": "B", - "step": 20 - }, - { - "expr": "sum(avg_over_time(mysql_global_status_threads_running{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Avg Threads Running", - "refId": "C", - "step": 20 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "MySQL Client Thread Activity", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ - "total" - ] - }, - "yaxes": [ - { - "format": "short", - "label": "Threads", - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": "", - "logBase": 1, - "max": null, - "min": 0, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null + } + ], + "title": "MySQL Connections", + "type": "timeseries" + } + }, + { + "annotations": { + "polly.grafana.com/docs": "**Max Connections** \n\nMax Connections is the maximum permitted number of simultaneous client connections. By default, this is 151. Increasing this value increases the number of file descriptors that mysqld requires. If the required number of descriptors are not available, the server reduces the value of Max Connections.\n\nmysqld actually permits Max Connections + 1 clients to connect. The extra connection is reserved for use by accounts that have the SUPER privilege, such as root.\n\nMax Used Connections is the maximum number of connections that have been in use simultaneously since the server started.\n\nConnections is the number of connection attempts (successful or not) to the MySQL server." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "mysql-connections-0" + }, + "spec": { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(max_over_time(mysql_global_status_threads_connected{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Connections", + "metric": "", + "refId": "A", + "step": 20 + } + }, + { + "annotations": { + "polly.grafana.com/docs": "**Max Connections** \n\nMax Connections is the maximum permitted number of simultaneous client connections. By default, this is 151. Increasing this value increases the number of file descriptors that mysqld requires. If the required number of descriptors are not available, the server reduces the value of Max Connections.\n\nmysqld actually permits Max Connections + 1 clients to connect. The extra connection is reserved for use by accounts that have the SUPER privilege, such as root.\n\nMax Used Connections is the maximum number of connections that have been in use simultaneously since the server started.\n\nConnections is the number of connection attempts (successful or not) to the MySQL server." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "mysql-connections-1" + }, + "spec": { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(mysql_global_status_max_used_connections{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"})", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Max Used Connections", + "metric": "", + "refId": "C", + "step": 20, + "target": "" + } + }, + { + "annotations": { + "polly.grafana.com/docs": "**Max Connections** \n\nMax Connections is the maximum permitted number of simultaneous client connections. By default, this is 151. Increasing this value increases the number of file descriptors that mysqld requires. If the required number of descriptors are not available, the server reduces the value of Max Connections.\n\nmysqld actually permits Max Connections + 1 clients to connect. The extra connection is reserved for use by accounts that have the SUPER privilege, such as root.\n\nMax Used Connections is the maximum number of connections that have been in use simultaneously since the server started.\n\nConnections is the number of connection attempts (successful or not) to the MySQL server." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "mysql-connections-2" + }, + "spec": { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(mysql_global_variables_max_connections{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"})", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Max Connections", + "metric": "", + "refId": "B", + "step": 20, + "target": "" + } + }, + { + "annotations": { + "polly.grafana.com/docs": "**MySQL Active Threads**\n\nThreads Connected is the number of open connections, while Threads Running is the number of threads not sleeping." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Panel", + "metadata": { + "name": "mysql-client-thread-activity" + }, + "spec": { + "datasource": { + "uid": "$datasource" + }, + "description": "**MySQL Active Threads**\n\nThreads Connected is the number of open connections, while Threads Running is the number of threads not sleeping.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "Threads", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 20, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Peak Threads Running" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#E24D42", + "mode": "fixed" + } + }, + { + "id": "custom.lineWidth", + "value": 0 + }, + { + "id": "custom.pointSize", + "value": 4 + }, + { + "id": "custom.showPoints", + "value": "always" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Peak Threads Connected" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#1F78C1", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Avg Threads Running" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#EAB839", + "mode": "fixed" + } + } + ] } - } - }, - { - "annotations": { - "polly.grafana.com/docs": "**MySQL Active Threads**\n\nThreads Connected is the number of open connections, while Threads Running is the number of threads not sleeping." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Target", - "metadata": { - "name": "mysql-client-thread-activity-0" - }, - "spec": { + ] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 7 + }, + "id": 10, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "min" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.0.2", + "targets": [ + { "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(max_over_time(mysql_global_status_threads_connected{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(max_over_time(mysql_global_status_threads_connected{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", "format": "time_series", "hide": false, "interval": "1m", @@ -5649,22 +6117,15 @@ "metric": "", "refId": "A", "step": 20 - } - }, - { - "annotations": { - "polly.grafana.com/docs": "**MySQL Active Threads**\n\nThreads Connected is the number of open connections, while Threads Running is the number of threads not sleeping." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Target", - "metadata": { - "name": "mysql-client-thread-activity-1" - }, - "spec": { + }, + { "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(max_over_time(mysql_global_status_threads_running{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(max_over_time(mysql_global_status_threads_running{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", "format": "time_series", "interval": "1m", "intervalFactor": 1, @@ -5672,191 +6133,254 @@ "metric": "", "refId": "B", "step": 20 - } - }, - { - "annotations": { - "polly.grafana.com/docs": "**MySQL Active Threads**\n\nThreads Connected is the number of open connections, while Threads Running is the number of threads not sleeping." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Target", - "metadata": { - "name": "mysql-client-thread-activity-2" - }, - "spec": { - "expr": "sum(avg_over_time(mysql_global_status_threads_running{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + }, + { + "datasource": { + "uid": "$datasource" + }, + "expr": "sum(avg_over_time(mysql_global_status_threads_running{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", "format": "time_series", "interval": "1m", "intervalFactor": 1, "legendFormat": "Avg Threads Running", "refId": "C", "step": 20 - } - }, - { - "annotations": { }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Panel", - "metadata": { - "name": "table-locks" - }, - "spec": { - "collapsed": false, - "datasource": "$datasource", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 14 - }, - "id": 384, - "panels": [ ], - "repeat": null, - "title": "Table Locks", - "type": "row" - } - }, - { - "annotations": { - "polly.grafana.com/docs": "**MySQL Questions**\n\nThe number of statements executed by the server. This includes only statements sent to the server by clients and not statements executed within stored programs, unlike the Queries used in the QPS calculation. \n\nThis variable does not count the following commands:\n* ``COM_PING``\n* ``COM_STATISTICS``\n* ``COM_STMT_PREPARE``\n* ``COM_STMT_CLOSE``\n* ``COM_STMT_RESET``" - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Panel", - "metadata": { - "name": "mysql-questions" - }, - "spec": { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "decimals": 2, - "description": "**MySQL Questions**\n\nThe number of statements executed by the server. This includes only statements sent to the server by clients and not statements executed within stored programs, unlike the Queries used in the QPS calculation. \n\nThis variable does not count the following commands:\n* ``COM_PING``\n* ``COM_STATISTICS``\n* ``COM_STMT_PREPARE``\n* ``COM_STMT_CLOSE``\n* ``COM_STMT_RESET``", - "editable": true, - "error": false, - "fieldConfig": { - "defaults": { - "custom": { }, - "unit": "short" - }, - "overrides": [ ] - }, - "fill": 2, - "fillGradient": 0, - "grid": { }, - "gridPos": { - "h": 7, - "w": 12, - "x": 0, - "y": 15 + } + ], + "title": "MySQL Client Thread Activity", + "type": "timeseries" + } + }, + { + "annotations": { + "polly.grafana.com/docs": "**MySQL Active Threads**\n\nThreads Connected is the number of open connections, while Threads Running is the number of threads not sleeping." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "mysql-client-thread-activity-0" + }, + "spec": { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(max_over_time(mysql_global_status_threads_connected{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "format": "time_series", + "hide": false, + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Peak Threads Connected", + "metric": "", + "refId": "A", + "step": 20 + } + }, + { + "annotations": { + "polly.grafana.com/docs": "**MySQL Active Threads**\n\nThreads Connected is the number of open connections, while Threads Running is the number of threads not sleeping." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "mysql-client-thread-activity-1" + }, + "spec": { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(max_over_time(mysql_global_status_threads_running{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Peak Threads Running", + "metric": "", + "refId": "B", + "step": 20 + } + }, + { + "annotations": { + "polly.grafana.com/docs": "**MySQL Active Threads**\n\nThreads Connected is the number of open connections, while Threads Running is the number of threads not sleeping." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "mysql-client-thread-activity-2" + }, + "spec": { + "datasource": { + "uid": "$datasource" + }, + "expr": "sum(avg_over_time(mysql_global_status_threads_running{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Avg Threads Running", + "refId": "C", + "step": 20 + } + }, + { + "annotations": {}, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Panel", + "metadata": { + "name": "table-locks" + }, + "spec": { + "collapsed": false, + "datasource": { + "uid": "$datasource" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 14 + }, + "id": 384, + "panels": [], + "targets": [ + { + "datasource": { + "uid": "$datasource" }, - "hiddenSeries": false, - "id": 53, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "sort": "avg", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [ - { - "targetBlank": true, - "title": "MySQL Queries and Questions", - "url": "https://www.percona.com/blog/2014/05/29/how-mysql-queries-and-questions-are-measured/" - } - ], - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "rate(mysql_global_status_questions{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "{{instance}}", - "metric": "", - "refId": "A", - "step": 20 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "MySQL Questions", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "logBase": 1, - "max": null, - "min": 0, - "show": true - } + "refId": "A" + } + ], + "title": "Table Locks", + "type": "row" + } + }, + { + "annotations": {}, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "table-locks-0" + }, + "spec": { + "datasource": { + "uid": "$datasource" + }, + "refId": "A" + } + }, + { + "annotations": { + "polly.grafana.com/docs": "**MySQL Questions**\n\nThe number of statements executed by the server. This includes only statements sent to the server by clients and not statements executed within stored programs, unlike the Queries used in the QPS calculation. \n\nThis variable does not count the following commands:\n* ``COM_PING``\n* ``COM_STATISTICS``\n* ``COM_STMT_PREPARE``\n* ``COM_STMT_CLOSE``\n* ``COM_STMT_RESET``" + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Panel", + "metadata": { + "name": "mysql-questions" + }, + "spec": { + "datasource": { + "uid": "$datasource" + }, + "description": "**MySQL Questions**\n\nThe number of statements executed by the server. This includes only statements sent to the server by clients and not statements executed within stored programs, unlike the Queries used in the QPS calculation. \n\nThis variable does not count the following commands:\n* ``COM_PING``\n* ``COM_STATISTICS``\n* ``COM_STMT_PREPARE``\n* ``COM_STMT_CLOSE``\n* ``COM_STMT_RESET``", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 20, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 15 + }, + "id": 53, + "links": [ + { + "targetBlank": true, + "title": "MySQL Queries and Questions", + "url": "https://www.percona.com/blog/2014/05/29/how-mysql-queries-and-questions-are-measured/" + } + ], + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "min" ], - "yaxis": { - "align": false, - "alignLevel": null - } - } - }, - { - "annotations": { - "polly.grafana.com/docs": "**MySQL Questions**\n\nThe number of statements executed by the server. This includes only statements sent to the server by clients and not statements executed within stored programs, unlike the Queries used in the QPS calculation. \n\nThis variable does not count the following commands:\n* ``COM_PING``\n* ``COM_STATISTICS``\n* ``COM_STMT_PREPARE``\n* ``COM_STMT_CLOSE``\n* ``COM_STMT_RESET``" - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Target", - "metadata": { - "name": "mysql-questions-0" - }, - "spec": { + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.0.2", + "targets": [ + { "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "rate(mysql_global_status_questions{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "rate(mysql_global_status_questions{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", "format": "time_series", "interval": "1m", "intervalFactor": 1, @@ -5864,179 +6388,159 @@ "metric": "", "refId": "A", "step": 20 - } - }, - { - "annotations": { - "polly.grafana.com/docs": "**MySQL Thread Cache**\n\nThe thread_cache_size variable sets how many threads the server should cache to reuse. When a client disconnects, the client's threads are put in the cache if the cache is not full. It is autosized in MySQL 5.6.8 and above (capped to 100). Requests for threads are satisfied by reusing threads taken from the cache if possible, and only when the cache is empty is a new thread created.\n\n* *Threads_created*: The number of threads created to handle connections.\n* *Threads_cached*: The number of threads in the thread cache." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Panel", - "metadata": { - "name": "mysql-thread-cache" - }, - "spec": { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "decimals": 2, - "description": "**MySQL Thread Cache**\n\nThe thread_cache_size variable sets how many threads the server should cache to reuse. When a client disconnects, the client's threads are put in the cache if the cache is not full. It is autosized in MySQL 5.6.8 and above (capped to 100). Requests for threads are satisfied by reusing threads taken from the cache if possible, and only when the cache is empty is a new thread created.\n\n* *Threads_created*: The number of threads created to handle connections.\n* *Threads_cached*: The number of threads in the thread cache.", - "editable": true, - "error": false, - "fieldConfig": { - "defaults": { - "custom": { }, - "unit": "short" - }, - "overrides": [ ] - }, - "fill": 2, - "fillGradient": 0, - "grid": { }, - "gridPos": { - "h": 7, - "w": 12, - "x": 12, - "y": 15 - }, - "hiddenSeries": false, - "id": 11, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "sort": "avg", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [ - { - "title": "Tuning information", - "url": "https://dev.mysql.com/doc/refman/5.6/en/server-system-variables.html#sysvar_thread_cache_size" - } - ], - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "Threads Created", - "fill": 0 - } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(mysql_global_variables_thread_cache_size{job=~\"$job\", instance=~\"$instance\"})", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Thread Cache Size", - "metric": "", - "refId": "B", - "step": 20 - }, - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(mysql_global_status_threads_cached{job=~\"$job\", instance=~\"$instance\"})", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Threads Cached", - "metric": "", - "refId": "C", - "step": 20 - }, - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(rate(mysql_global_status_threads_created{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Threads Created", - "metric": "", - "refId": "A", - "step": 20 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "MySQL Thread Cache", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "logBase": 1, - "max": null, - "min": 0, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null + } + ], + "title": "MySQL Questions", + "type": "timeseries" + } + }, + { + "annotations": { + "polly.grafana.com/docs": "**MySQL Questions**\n\nThe number of statements executed by the server. This includes only statements sent to the server by clients and not statements executed within stored programs, unlike the Queries used in the QPS calculation. \n\nThis variable does not count the following commands:\n* ``COM_PING``\n* ``COM_STATISTICS``\n* ``COM_STMT_PREPARE``\n* ``COM_STMT_CLOSE``\n* ``COM_STMT_RESET``" + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "mysql-questions-0" + }, + "spec": { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "rate(mysql_global_status_questions{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "{{instance}}", + "metric": "", + "refId": "A", + "step": 20 + } + }, + { + "annotations": { + "polly.grafana.com/docs": "**MySQL Thread Cache**\n\nThe thread_cache_size variable sets how many threads the server should cache to reuse. When a client disconnects, the client's threads are put in the cache if the cache is not full. It is autosized in MySQL 5.6.8 and above (capped to 100). Requests for threads are satisfied by reusing threads taken from the cache if possible, and only when the cache is empty is a new thread created.\n\n* *Threads_created*: The number of threads created to handle connections.\n* *Threads_cached*: The number of threads in the thread cache." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Panel", + "metadata": { + "name": "mysql-thread-cache" + }, + "spec": { + "datasource": { + "uid": "$datasource" + }, + "description": "**MySQL Thread Cache**\n\nThe thread_cache_size variable sets how many threads the server should cache to reuse. When a client disconnects, the client's threads are put in the cache if the cache is not full. It is autosized in MySQL 5.6.8 and above (capped to 100). Requests for threads are satisfied by reusing threads taken from the cache if possible, and only when the cache is empty is a new thread created.\n\n* *Threads_created*: The number of threads created to handle connections.\n* *Threads_cached*: The number of threads in the thread cache.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 20, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Threads Created" + }, + "properties": [ + { + "id": "custom.fillOpacity", + "value": 0 + } + ] } - } - }, - { - "annotations": { - "polly.grafana.com/docs": "**MySQL Thread Cache**\n\nThe thread_cache_size variable sets how many threads the server should cache to reuse. When a client disconnects, the client's threads are put in the cache if the cache is not full. It is autosized in MySQL 5.6.8 and above (capped to 100). Requests for threads are satisfied by reusing threads taken from the cache if possible, and only when the cache is empty is a new thread created.\n\n* *Threads_created*: The number of threads created to handle connections.\n* *Threads_cached*: The number of threads in the thread cache." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Target", - "metadata": { - "name": "mysql-thread-cache-0" - }, - "spec": { + ] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 15 + }, + "id": 11, + "links": [ + { + "title": "Tuning information", + "url": "https://dev.mysql.com/doc/refman/5.6/en/server-system-variables.html#sysvar_thread_cache_size" + } + ], + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "min" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.0.2", + "targets": [ + { "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(mysql_global_variables_thread_cache_size{job=~\"$job\", instance=~\"$instance\"})", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(mysql_global_variables_thread_cache_size{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"})", "format": "time_series", "interval": "1m", "intervalFactor": 1, @@ -6044,22 +6548,15 @@ "metric": "", "refId": "B", "step": 20 - } - }, - { - "annotations": { - "polly.grafana.com/docs": "**MySQL Thread Cache**\n\nThe thread_cache_size variable sets how many threads the server should cache to reuse. When a client disconnects, the client's threads are put in the cache if the cache is not full. It is autosized in MySQL 5.6.8 and above (capped to 100). Requests for threads are satisfied by reusing threads taken from the cache if possible, and only when the cache is empty is a new thread created.\n\n* *Threads_created*: The number of threads created to handle connections.\n* *Threads_cached*: The number of threads in the thread cache." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Target", - "metadata": { - "name": "mysql-thread-cache-1" - }, - "spec": { + }, + { "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(mysql_global_status_threads_cached{job=~\"$job\", instance=~\"$instance\"})", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(mysql_global_status_threads_cached{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"})", "format": "time_series", "interval": "1m", "intervalFactor": 1, @@ -6067,22 +6564,15 @@ "metric": "", "refId": "C", "step": 20 - } - }, - { - "annotations": { - "polly.grafana.com/docs": "**MySQL Thread Cache**\n\nThe thread_cache_size variable sets how many threads the server should cache to reuse. When a client disconnects, the client's threads are put in the cache if the cache is not full. It is autosized in MySQL 5.6.8 and above (capped to 100). Requests for threads are satisfied by reusing threads taken from the cache if possible, and only when the cache is empty is a new thread created.\n\n* *Threads_created*: The number of threads created to handle connections.\n* *Threads_cached*: The number of threads in the thread cache." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Target", - "metadata": { - "name": "mysql-thread-cache-2" - }, - "spec": { + }, + { "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(rate(mysql_global_status_threads_created{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(rate(mysql_global_status_threads_created{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", "format": "time_series", "interval": "1m", "intervalFactor": 1, @@ -6090,430 +6580,480 @@ "metric": "", "refId": "A", "step": 20 - } - }, - { - "annotations": { }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Panel", - "metadata": { - "name": "temporary-objects" - }, - "spec": { - "collapsed": false, - "datasource": "$datasource", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 22 - }, - "id": 385, - "panels": [ ], - "repeat": null, - "title": "Temporary Objects", - "type": "row" - } - }, - { - "annotations": { - "polly.grafana.com/docs": "MySQL Temporary Objects" - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Panel", - "metadata": { - "name": "mysql-temporary-objects" - }, - "spec": { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "decimals": 2, - "description": "MySQL Temporary Objects", - "editable": true, - "error": false, - "fieldConfig": { - "defaults": { - "custom": { }, - "unit": "short" - }, - "overrides": [ ] - }, - "fill": 2, - "fillGradient": 0, - "grid": { }, - "gridPos": { - "h": 7, - "w": 12, - "x": 0, - "y": 23 + } + ], + "title": "MySQL Thread Cache", + "type": "timeseries" + } + }, + { + "annotations": { + "polly.grafana.com/docs": "**MySQL Thread Cache**\n\nThe thread_cache_size variable sets how many threads the server should cache to reuse. When a client disconnects, the client's threads are put in the cache if the cache is not full. It is autosized in MySQL 5.6.8 and above (capped to 100). Requests for threads are satisfied by reusing threads taken from the cache if possible, and only when the cache is empty is a new thread created.\n\n* *Threads_created*: The number of threads created to handle connections.\n* *Threads_cached*: The number of threads in the thread cache." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "mysql-thread-cache-0" + }, + "spec": { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(mysql_global_variables_thread_cache_size{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"})", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Thread Cache Size", + "metric": "", + "refId": "B", + "step": 20 + } + }, + { + "annotations": { + "polly.grafana.com/docs": "**MySQL Thread Cache**\n\nThe thread_cache_size variable sets how many threads the server should cache to reuse. When a client disconnects, the client's threads are put in the cache if the cache is not full. It is autosized in MySQL 5.6.8 and above (capped to 100). Requests for threads are satisfied by reusing threads taken from the cache if possible, and only when the cache is empty is a new thread created.\n\n* *Threads_created*: The number of threads created to handle connections.\n* *Threads_cached*: The number of threads in the thread cache." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "mysql-thread-cache-1" + }, + "spec": { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(mysql_global_status_threads_cached{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"})", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Threads Cached", + "metric": "", + "refId": "C", + "step": 20 + } + }, + { + "annotations": { + "polly.grafana.com/docs": "**MySQL Thread Cache**\n\nThe thread_cache_size variable sets how many threads the server should cache to reuse. When a client disconnects, the client's threads are put in the cache if the cache is not full. It is autosized in MySQL 5.6.8 and above (capped to 100). Requests for threads are satisfied by reusing threads taken from the cache if possible, and only when the cache is empty is a new thread created.\n\n* *Threads_created*: The number of threads created to handle connections.\n* *Threads_cached*: The number of threads in the thread cache." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "mysql-thread-cache-2" + }, + "spec": { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(rate(mysql_global_status_threads_created{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Threads Created", + "metric": "", + "refId": "A", + "step": 20 + } + }, + { + "annotations": {}, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Panel", + "metadata": { + "name": "temporary-objects" + }, + "spec": { + "collapsed": false, + "datasource": { + "uid": "$datasource" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 22 + }, + "id": 385, + "panels": [], + "targets": [ + { + "datasource": { + "uid": "$datasource" }, - "hiddenSeries": false, - "id": 22, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "sort": "avg", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [ ], - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(rate(mysql_global_status_created_tmp_tables{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Created Tmp Tables", - "metric": "", - "refId": "A", - "step": 20 - }, - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(rate(mysql_global_status_created_tmp_disk_tables{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Created Tmp Disk Tables", - "metric": "", - "refId": "B", - "step": 20 - }, - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(rate(mysql_global_status_created_tmp_files{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Created Tmp Files", - "metric": "", - "refId": "C", - "step": 20 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "MySQL Temporary Objects", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "logBase": 1, - "max": null, - "min": 0, - "show": true - } + "refId": "A" + } + ], + "title": "Temporary Objects", + "type": "row" + } + }, + { + "annotations": {}, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "temporary-objects-0" + }, + "spec": { + "datasource": { + "uid": "$datasource" + }, + "refId": "A" + } + }, + { + "annotations": { + "polly.grafana.com/docs": "MySQL Temporary Objects" + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Panel", + "metadata": { + "name": "mysql-temporary-objects" + }, + "spec": { + "datasource": { + "uid": "$datasource" + }, + "description": "MySQL Temporary Objects", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 20, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 23 + }, + "id": 22, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "min" ], - "yaxis": { - "align": false, - "alignLevel": null - } - } - }, - { - "annotations": { - "polly.grafana.com/docs": "MySQL Temporary Objects" - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Target", - "metadata": { - "name": "mysql-temporary-objects-0" - }, - "spec": { + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.0.2", + "targets": [ + { "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(rate(mysql_global_status_created_tmp_tables{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(rate(mysql_global_status_created_tmp_tables{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", "interval": "1m", "intervalFactor": 1, "legendFormat": "Created Tmp Tables", "metric": "", "refId": "A", "step": 20 - } - }, - { - "annotations": { - "polly.grafana.com/docs": "MySQL Temporary Objects" - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Target", - "metadata": { - "name": "mysql-temporary-objects-1" - }, - "spec": { + }, + { "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(rate(mysql_global_status_created_tmp_disk_tables{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(rate(mysql_global_status_created_tmp_disk_tables{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", "interval": "1m", "intervalFactor": 1, "legendFormat": "Created Tmp Disk Tables", "metric": "", "refId": "B", "step": 20 - } - }, - { - "annotations": { - "polly.grafana.com/docs": "MySQL Temporary Objects" - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Target", - "metadata": { - "name": "mysql-temporary-objects-2" - }, - "spec": { + }, + { "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(rate(mysql_global_status_created_tmp_files{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(rate(mysql_global_status_created_tmp_files{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", "interval": "1m", "intervalFactor": 1, "legendFormat": "Created Tmp Files", "metric": "", "refId": "C", "step": 20 - } - }, - { - "annotations": { - "polly.grafana.com/docs": "**MySQL Select Types**\n\nAs with most relational databases, selecting based on indexes is more efficient than scanning an entire table's data. Here we see the counters for selects not done with indexes.\n\n* ***Select Scan*** is how many queries caused full table scans, in which all the data in the table had to be read and either discarded or returned.\n* ***Select Range*** is how many queries used a range scan, which means MySQL scanned all rows in a given range.\n* ***Select Full Join*** is the number of joins that are not joined on an index, this is usually a huge performance hit." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Panel", - "metadata": { - "name": "mysql-select-types" - }, - "spec": { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "decimals": 2, - "description": "**MySQL Select Types**\n\nAs with most relational databases, selecting based on indexes is more efficient than scanning an entire table's data. Here we see the counters for selects not done with indexes.\n\n* ***Select Scan*** is how many queries caused full table scans, in which all the data in the table had to be read and either discarded or returned.\n* ***Select Range*** is how many queries used a range scan, which means MySQL scanned all rows in a given range.\n* ***Select Full Join*** is the number of joins that are not joined on an index, this is usually a huge performance hit.", - "editable": true, - "error": false, - "fieldConfig": { - "defaults": { - "custom": { }, - "unit": "short" - }, - "overrides": [ ] - }, - "fill": 2, - "fillGradient": 0, - "grid": { }, - "gridPos": { - "h": 7, - "w": 12, - "x": 12, - "y": 23 - }, - "height": "250px", - "hiddenSeries": false, - "id": 311, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "hideZero": true, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "sort": "avg", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [ ], - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(rate(mysql_global_status_select_full_join{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Select Full Join", - "metric": "", - "refId": "A", - "step": 20 - }, - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(rate(mysql_global_status_select_full_range_join{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Select Full Range Join", - "metric": "", - "refId": "B", - "step": 20 - }, - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(rate(mysql_global_status_select_range{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Select Range", - "metric": "", - "refId": "C", - "step": 20 - }, - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(rate(mysql_global_status_select_range_check{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Select Range Check", - "metric": "", - "refId": "D", - "step": 20 - }, - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(rate(mysql_global_status_select_scan{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Select Scan", - "metric": "", - "refId": "E", - "step": 20 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "MySQL Select Types", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "logBase": 1, - "max": null, - "min": 0, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null + } + ], + "title": "MySQL Temporary Objects", + "type": "timeseries" + } + }, + { + "annotations": { + "polly.grafana.com/docs": "MySQL Temporary Objects" + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "mysql-temporary-objects-0" + }, + "spec": { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(rate(mysql_global_status_created_tmp_tables{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Created Tmp Tables", + "metric": "", + "refId": "A", + "step": 20 + } + }, + { + "annotations": { + "polly.grafana.com/docs": "MySQL Temporary Objects" + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "mysql-temporary-objects-1" + }, + "spec": { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(rate(mysql_global_status_created_tmp_disk_tables{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Created Tmp Disk Tables", + "metric": "", + "refId": "B", + "step": 20 + } + }, + { + "annotations": { + "polly.grafana.com/docs": "MySQL Temporary Objects" + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "mysql-temporary-objects-2" + }, + "spec": { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(rate(mysql_global_status_created_tmp_files{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Created Tmp Files", + "metric": "", + "refId": "C", + "step": 20 + } + }, + { + "annotations": { + "polly.grafana.com/docs": "**MySQL Select Types**\n\nAs with most relational databases, selecting based on indexes is more efficient than scanning an entire table's data. Here we see the counters for selects not done with indexes.\n\n* ***Select Scan*** is how many queries caused full table scans, in which all the data in the table had to be read and either discarded or returned.\n* ***Select Range*** is how many queries used a range scan, which means MySQL scanned all rows in a given range.\n* ***Select Full Join*** is the number of joins that are not joined on an index, this is usually a huge performance hit." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Panel", + "metadata": { + "name": "mysql-select-types" + }, + "spec": { + "datasource": { + "uid": "$datasource" + }, + "description": "**MySQL Select Types**\n\nAs with most relational databases, selecting based on indexes is more efficient than scanning an entire table's data. Here we see the counters for selects not done with indexes.\n\n* ***Select Scan*** is how many queries caused full table scans, in which all the data in the table had to be read and either discarded or returned.\n* ***Select Range*** is how many queries used a range scan, which means MySQL scanned all rows in a given range.\n* ***Select Full Join*** is the number of joins that are not joined on an index, this is usually a huge performance hit.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 20, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byValue", + "options": { + "op": "gte", + "reducer": "allIsZero", + "value": 0 + } + }, + "properties": [ + { + "id": "custom.hideFrom", + "value": { + "legend": true, + "tooltip": true, + "viz": false + } + } + ] } - } - }, - { - "annotations": { - "polly.grafana.com/docs": "**MySQL Select Types**\n\nAs with most relational databases, selecting based on indexes is more efficient than scanning an entire table's data. Here we see the counters for selects not done with indexes.\n\n* ***Select Scan*** is how many queries caused full table scans, in which all the data in the table had to be read and either discarded or returned.\n* ***Select Range*** is how many queries used a range scan, which means MySQL scanned all rows in a given range.\n* ***Select Full Join*** is the number of joins that are not joined on an index, this is usually a huge performance hit." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Target", - "metadata": { - "name": "mysql-select-types-0" - }, - "spec": { + ] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 23 + }, + "id": 311, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "min" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.0.2", + "targets": [ + { "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(rate(mysql_global_status_select_full_join{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(rate(mysql_global_status_select_full_join{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", "format": "time_series", "interval": "1m", "intervalFactor": 1, @@ -6521,22 +7061,15 @@ "metric": "", "refId": "A", "step": 20 - } - }, - { - "annotations": { - "polly.grafana.com/docs": "**MySQL Select Types**\n\nAs with most relational databases, selecting based on indexes is more efficient than scanning an entire table's data. Here we see the counters for selects not done with indexes.\n\n* ***Select Scan*** is how many queries caused full table scans, in which all the data in the table had to be read and either discarded or returned.\n* ***Select Range*** is how many queries used a range scan, which means MySQL scanned all rows in a given range.\n* ***Select Full Join*** is the number of joins that are not joined on an index, this is usually a huge performance hit." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Target", - "metadata": { - "name": "mysql-select-types-1" - }, - "spec": { + }, + { "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(rate(mysql_global_status_select_full_range_join{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(rate(mysql_global_status_select_full_range_join{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", "format": "time_series", "interval": "1m", "intervalFactor": 1, @@ -6544,22 +7077,15 @@ "metric": "", "refId": "B", "step": 20 - } - }, - { - "annotations": { - "polly.grafana.com/docs": "**MySQL Select Types**\n\nAs with most relational databases, selecting based on indexes is more efficient than scanning an entire table's data. Here we see the counters for selects not done with indexes.\n\n* ***Select Scan*** is how many queries caused full table scans, in which all the data in the table had to be read and either discarded or returned.\n* ***Select Range*** is how many queries used a range scan, which means MySQL scanned all rows in a given range.\n* ***Select Full Join*** is the number of joins that are not joined on an index, this is usually a huge performance hit." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Target", - "metadata": { - "name": "mysql-select-types-2" - }, - "spec": { + }, + { "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(rate(mysql_global_status_select_range{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(rate(mysql_global_status_select_range{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", "format": "time_series", "interval": "1m", "intervalFactor": 1, @@ -6567,22 +7093,15 @@ "metric": "", "refId": "C", "step": 20 - } - }, - { - "annotations": { - "polly.grafana.com/docs": "**MySQL Select Types**\n\nAs with most relational databases, selecting based on indexes is more efficient than scanning an entire table's data. Here we see the counters for selects not done with indexes.\n\n* ***Select Scan*** is how many queries caused full table scans, in which all the data in the table had to be read and either discarded or returned.\n* ***Select Range*** is how many queries used a range scan, which means MySQL scanned all rows in a given range.\n* ***Select Full Join*** is the number of joins that are not joined on an index, this is usually a huge performance hit." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Target", - "metadata": { - "name": "mysql-select-types-3" - }, - "spec": { + }, + { "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(rate(mysql_global_status_select_range_check{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(rate(mysql_global_status_select_range_check{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", "format": "time_series", "interval": "1m", "intervalFactor": 1, @@ -6590,22 +7109,15 @@ "metric": "", "refId": "D", "step": 20 - } - }, - { - "annotations": { - "polly.grafana.com/docs": "**MySQL Select Types**\n\nAs with most relational databases, selecting based on indexes is more efficient than scanning an entire table's data. Here we see the counters for selects not done with indexes.\n\n* ***Select Scan*** is how many queries caused full table scans, in which all the data in the table had to be read and either discarded or returned.\n* ***Select Range*** is how many queries used a range scan, which means MySQL scanned all rows in a given range.\n* ***Select Full Join*** is the number of joins that are not joined on an index, this is usually a huge performance hit." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Target", - "metadata": { - "name": "mysql-select-types-4" - }, - "spec": { + }, + { "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(rate(mysql_global_status_select_scan{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(rate(mysql_global_status_select_scan{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", "format": "time_series", "interval": "1m", "intervalFactor": 1, @@ -6613,206 +7125,312 @@ "metric": "", "refId": "E", "step": 20 - } - }, - { - "annotations": { }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Panel", - "metadata": { - "name": "sorts" - }, - "spec": { - "collapsed": false, - "datasource": "$datasource", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 30 - }, - "id": 386, - "panels": [ ], - "repeat": null, - "title": "Sorts", - "type": "row" - } - }, - { - "annotations": { - "polly.grafana.com/docs": "**MySQL Sorts**\n\nDue to a query's structure, order, or other requirements, MySQL sorts the rows before returning them. For example, if a table is ordered 1 to 10 but you want the results reversed, MySQL then has to sort the rows to return 10 to 1.\n\nThis graph also shows when sorts had to scan a whole table or a given range of a table in order to return the results and which could not have been sorted via an index." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Panel", - "metadata": { - "name": "mysql-sorts" - }, - "spec": { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "decimals": 2, - "description": "**MySQL Sorts**\n\nDue to a query's structure, order, or other requirements, MySQL sorts the rows before returning them. For example, if a table is ordered 1 to 10 but you want the results reversed, MySQL then has to sort the rows to return 10 to 1.\n\nThis graph also shows when sorts had to scan a whole table or a given range of a table in order to return the results and which could not have been sorted via an index.", - "editable": true, - "error": false, - "fieldConfig": { - "defaults": { - "custom": { }, - "unit": "short" - }, - "overrides": [ ] - }, - "fill": 2, - "fillGradient": 0, - "grid": { }, - "gridPos": { - "h": 7, - "w": 12, - "x": 0, - "y": 31 + } + ], + "title": "MySQL Select Types", + "type": "timeseries" + } + }, + { + "annotations": { + "polly.grafana.com/docs": "**MySQL Select Types**\n\nAs with most relational databases, selecting based on indexes is more efficient than scanning an entire table's data. Here we see the counters for selects not done with indexes.\n\n* ***Select Scan*** is how many queries caused full table scans, in which all the data in the table had to be read and either discarded or returned.\n* ***Select Range*** is how many queries used a range scan, which means MySQL scanned all rows in a given range.\n* ***Select Full Join*** is the number of joins that are not joined on an index, this is usually a huge performance hit." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "mysql-select-types-0" + }, + "spec": { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(rate(mysql_global_status_select_full_join{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Select Full Join", + "metric": "", + "refId": "A", + "step": 20 + } + }, + { + "annotations": { + "polly.grafana.com/docs": "**MySQL Select Types**\n\nAs with most relational databases, selecting based on indexes is more efficient than scanning an entire table's data. Here we see the counters for selects not done with indexes.\n\n* ***Select Scan*** is how many queries caused full table scans, in which all the data in the table had to be read and either discarded or returned.\n* ***Select Range*** is how many queries used a range scan, which means MySQL scanned all rows in a given range.\n* ***Select Full Join*** is the number of joins that are not joined on an index, this is usually a huge performance hit." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "mysql-select-types-1" + }, + "spec": { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(rate(mysql_global_status_select_full_range_join{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Select Full Range Join", + "metric": "", + "refId": "B", + "step": 20 + } + }, + { + "annotations": { + "polly.grafana.com/docs": "**MySQL Select Types**\n\nAs with most relational databases, selecting based on indexes is more efficient than scanning an entire table's data. Here we see the counters for selects not done with indexes.\n\n* ***Select Scan*** is how many queries caused full table scans, in which all the data in the table had to be read and either discarded or returned.\n* ***Select Range*** is how many queries used a range scan, which means MySQL scanned all rows in a given range.\n* ***Select Full Join*** is the number of joins that are not joined on an index, this is usually a huge performance hit." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "mysql-select-types-2" + }, + "spec": { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(rate(mysql_global_status_select_range{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Select Range", + "metric": "", + "refId": "C", + "step": 20 + } + }, + { + "annotations": { + "polly.grafana.com/docs": "**MySQL Select Types**\n\nAs with most relational databases, selecting based on indexes is more efficient than scanning an entire table's data. Here we see the counters for selects not done with indexes.\n\n* ***Select Scan*** is how many queries caused full table scans, in which all the data in the table had to be read and either discarded or returned.\n* ***Select Range*** is how many queries used a range scan, which means MySQL scanned all rows in a given range.\n* ***Select Full Join*** is the number of joins that are not joined on an index, this is usually a huge performance hit." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "mysql-select-types-3" + }, + "spec": { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(rate(mysql_global_status_select_range_check{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Select Range Check", + "metric": "", + "refId": "D", + "step": 20 + } + }, + { + "annotations": { + "polly.grafana.com/docs": "**MySQL Select Types**\n\nAs with most relational databases, selecting based on indexes is more efficient than scanning an entire table's data. Here we see the counters for selects not done with indexes.\n\n* ***Select Scan*** is how many queries caused full table scans, in which all the data in the table had to be read and either discarded or returned.\n* ***Select Range*** is how many queries used a range scan, which means MySQL scanned all rows in a given range.\n* ***Select Full Join*** is the number of joins that are not joined on an index, this is usually a huge performance hit." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "mysql-select-types-4" + }, + "spec": { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(rate(mysql_global_status_select_scan{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Select Scan", + "metric": "", + "refId": "E", + "step": 20 + } + }, + { + "annotations": {}, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Panel", + "metadata": { + "name": "sorts" + }, + "spec": { + "collapsed": false, + "datasource": { + "uid": "$datasource" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 30 + }, + "id": 386, + "panels": [], + "targets": [ + { + "datasource": { + "uid": "$datasource" }, - "hiddenSeries": false, - "id": 30, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "hideZero": true, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "sort": "avg", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [ ], - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(rate(mysql_global_status_sort_rows{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Sort Rows", - "metric": "", - "refId": "A", - "step": 20 - }, - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(rate(mysql_global_status_sort_range{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Sort Range", - "metric": "", - "refId": "B", - "step": 20 - }, - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(rate(mysql_global_status_sort_merge_passes{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Sort Merge Passes", - "metric": "", - "refId": "C", - "step": 20 - }, - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(rate(mysql_global_status_sort_scan{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Sort Scan", - "metric": "", - "refId": "D", - "step": 20 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "MySQL Sorts", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "logBase": 1, - "max": null, - "min": 0, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null + "refId": "A" + } + ], + "title": "Sorts", + "type": "row" + } + }, + { + "annotations": {}, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "sorts-0" + }, + "spec": { + "datasource": { + "uid": "$datasource" + }, + "refId": "A" + } + }, + { + "annotations": { + "polly.grafana.com/docs": "**MySQL Sorts**\n\nDue to a query's structure, order, or other requirements, MySQL sorts the rows before returning them. For example, if a table is ordered 1 to 10 but you want the results reversed, MySQL then has to sort the rows to return 10 to 1.\n\nThis graph also shows when sorts had to scan a whole table or a given range of a table in order to return the results and which could not have been sorted via an index." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Panel", + "metadata": { + "name": "mysql-sorts" + }, + "spec": { + "datasource": { + "uid": "$datasource" + }, + "description": "**MySQL Sorts**\n\nDue to a query's structure, order, or other requirements, MySQL sorts the rows before returning them. For example, if a table is ordered 1 to 10 but you want the results reversed, MySQL then has to sort the rows to return 10 to 1.\n\nThis graph also shows when sorts had to scan a whole table or a given range of a table in order to return the results and which could not have been sorted via an index.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 20, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byValue", + "options": { + "op": "gte", + "reducer": "allIsZero", + "value": 0 + } + }, + "properties": [ + { + "id": "custom.hideFrom", + "value": { + "legend": true, + "tooltip": true, + "viz": false + } + } + ] } - } - }, - { - "annotations": { - "polly.grafana.com/docs": "**MySQL Sorts**\n\nDue to a query's structure, order, or other requirements, MySQL sorts the rows before returning them. For example, if a table is ordered 1 to 10 but you want the results reversed, MySQL then has to sort the rows to return 10 to 1.\n\nThis graph also shows when sorts had to scan a whole table or a given range of a table in order to return the results and which could not have been sorted via an index." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Target", - "metadata": { - "name": "mysql-sorts-0" - }, - "spec": { + ] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 31 + }, + "id": 30, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "min" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.0.2", + "targets": [ + { "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(rate(mysql_global_status_sort_rows{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(rate(mysql_global_status_sort_rows{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", "format": "time_series", "interval": "1m", "intervalFactor": 1, @@ -6820,22 +7438,15 @@ "metric": "", "refId": "A", "step": 20 - } - }, - { - "annotations": { - "polly.grafana.com/docs": "**MySQL Sorts**\n\nDue to a query's structure, order, or other requirements, MySQL sorts the rows before returning them. For example, if a table is ordered 1 to 10 but you want the results reversed, MySQL then has to sort the rows to return 10 to 1.\n\nThis graph also shows when sorts had to scan a whole table or a given range of a table in order to return the results and which could not have been sorted via an index." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Target", - "metadata": { - "name": "mysql-sorts-1" - }, - "spec": { + }, + { "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(rate(mysql_global_status_sort_range{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(rate(mysql_global_status_sort_range{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", "format": "time_series", "interval": "1m", "intervalFactor": 1, @@ -6843,22 +7454,15 @@ "metric": "", "refId": "B", "step": 20 - } - }, - { - "annotations": { - "polly.grafana.com/docs": "**MySQL Sorts**\n\nDue to a query's structure, order, or other requirements, MySQL sorts the rows before returning them. For example, if a table is ordered 1 to 10 but you want the results reversed, MySQL then has to sort the rows to return 10 to 1.\n\nThis graph also shows when sorts had to scan a whole table or a given range of a table in order to return the results and which could not have been sorted via an index." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Target", - "metadata": { - "name": "mysql-sorts-2" - }, - "spec": { + }, + { "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(rate(mysql_global_status_sort_merge_passes{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(rate(mysql_global_status_sort_merge_passes{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", "format": "time_series", "interval": "1m", "intervalFactor": 1, @@ -6866,22 +7470,15 @@ "metric": "", "refId": "C", "step": 20 - } - }, - { - "annotations": { - "polly.grafana.com/docs": "**MySQL Sorts**\n\nDue to a query's structure, order, or other requirements, MySQL sorts the rows before returning them. For example, if a table is ordered 1 to 10 but you want the results reversed, MySQL then has to sort the rows to return 10 to 1.\n\nThis graph also shows when sorts had to scan a whole table or a given range of a table in order to return the results and which could not have been sorted via an index." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Target", - "metadata": { - "name": "mysql-sorts-3" - }, - "spec": { + }, + { "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(rate(mysql_global_status_sort_scan{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(rate(mysql_global_status_sort_scan{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", "format": "time_series", "interval": "1m", "intervalFactor": 1, @@ -6889,144 +7486,219 @@ "metric": "", "refId": "D", "step": 20 - } - }, - { - "annotations": { - "polly.grafana.com/docs": "**MySQL Slow Queries**\n\nSlow queries are defined as queries being slower than the long_query_time setting. For example, if you have long_query_time set to 3, all queries that take longer than 3 seconds to complete will show on this graph." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Panel", - "metadata": { - "name": "mysql-slow-queries" - }, - "spec": { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "decimals": 2, - "description": "**MySQL Slow Queries**\n\nSlow queries are defined as queries being slower than the long_query_time setting. For example, if you have long_query_time set to 3, all queries that take longer than 3 seconds to complete will show on this graph.", - "editable": true, - "error": false, - "fieldConfig": { - "defaults": { - "custom": { }, - "unit": "short" - }, - "overrides": [ ] - }, - "fill": 2, - "fillGradient": 0, - "grid": { }, - "gridPos": { - "h": 7, - "w": 12, - "x": 12, - "y": 31 - }, - "hiddenSeries": false, - "id": 48, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "max": true, - "min": true, - "show": true, - "sort": "avg", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [ ], - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(rate(mysql_global_status_slow_queries{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Slow Queries", - "metric": "", - "refId": "A", - "step": 20 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "MySQL Slow Queries", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "cumulative" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": "", - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": "", - "logBase": 1, - "max": null, - "min": 0, - "show": true - } + } + ], + "title": "MySQL Sorts", + "type": "timeseries" + } + }, + { + "annotations": { + "polly.grafana.com/docs": "**MySQL Sorts**\n\nDue to a query's structure, order, or other requirements, MySQL sorts the rows before returning them. For example, if a table is ordered 1 to 10 but you want the results reversed, MySQL then has to sort the rows to return 10 to 1.\n\nThis graph also shows when sorts had to scan a whole table or a given range of a table in order to return the results and which could not have been sorted via an index." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "mysql-sorts-0" + }, + "spec": { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(rate(mysql_global_status_sort_rows{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Sort Rows", + "metric": "", + "refId": "A", + "step": 20 + } + }, + { + "annotations": { + "polly.grafana.com/docs": "**MySQL Sorts**\n\nDue to a query's structure, order, or other requirements, MySQL sorts the rows before returning them. For example, if a table is ordered 1 to 10 but you want the results reversed, MySQL then has to sort the rows to return 10 to 1.\n\nThis graph also shows when sorts had to scan a whole table or a given range of a table in order to return the results and which could not have been sorted via an index." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "mysql-sorts-1" + }, + "spec": { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(rate(mysql_global_status_sort_range{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Sort Range", + "metric": "", + "refId": "B", + "step": 20 + } + }, + { + "annotations": { + "polly.grafana.com/docs": "**MySQL Sorts**\n\nDue to a query's structure, order, or other requirements, MySQL sorts the rows before returning them. For example, if a table is ordered 1 to 10 but you want the results reversed, MySQL then has to sort the rows to return 10 to 1.\n\nThis graph also shows when sorts had to scan a whole table or a given range of a table in order to return the results and which could not have been sorted via an index." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "mysql-sorts-2" + }, + "spec": { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(rate(mysql_global_status_sort_merge_passes{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Sort Merge Passes", + "metric": "", + "refId": "C", + "step": 20 + } + }, + { + "annotations": { + "polly.grafana.com/docs": "**MySQL Sorts**\n\nDue to a query's structure, order, or other requirements, MySQL sorts the rows before returning them. For example, if a table is ordered 1 to 10 but you want the results reversed, MySQL then has to sort the rows to return 10 to 1.\n\nThis graph also shows when sorts had to scan a whole table or a given range of a table in order to return the results and which could not have been sorted via an index." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "mysql-sorts-3" + }, + "spec": { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(rate(mysql_global_status_sort_scan{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Sort Scan", + "metric": "", + "refId": "D", + "step": 20 + } + }, + { + "annotations": { + "polly.grafana.com/docs": "**MySQL Slow Queries**\n\nSlow queries are defined as queries being slower than the long_query_time setting. For example, if you have long_query_time set to 3, all queries that take longer than 3 seconds to complete will show on this graph." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Panel", + "metadata": { + "name": "mysql-slow-queries" + }, + "spec": { + "datasource": { + "uid": "$datasource" + }, + "description": "**MySQL Slow Queries**\n\nSlow queries are defined as queries being slower than the long_query_time setting. For example, if you have long_query_time set to 3, all queries that take longer than 3 seconds to complete will show on this graph.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 20, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 31 + }, + "id": 48, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "min" ], - "yaxis": { - "align": false, - "alignLevel": null - } - } - }, - { - "annotations": { - "polly.grafana.com/docs": "**MySQL Slow Queries**\n\nSlow queries are defined as queries being slower than the long_query_time setting. For example, if you have long_query_time set to 3, all queries that take longer than 3 seconds to complete will show on this graph." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Target", - "metadata": { - "name": "mysql-slow-queries-0" - }, - "spec": { + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.0.2", + "targets": [ + { "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(rate(mysql_global_status_slow_queries{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(rate(mysql_global_status_slow_queries{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", "format": "time_series", "interval": "1m", "intervalFactor": 1, @@ -7034,181 +7706,187 @@ "metric": "", "refId": "A", "step": 20 - } - }, - { - "annotations": { }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Panel", - "metadata": { - "name": "aborted" - }, - "spec": { - "collapsed": false, - "datasource": "$datasource", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 38 - }, - "id": 387, - "panels": [ ], - "repeat": null, - "title": "Aborted", - "type": "row" - } - }, - { - "annotations": { - "polly.grafana.com/docs": "**Aborted Connections**\n\nWhen a given host connects to MySQL and the connection is interrupted in the middle (for example due to bad credentials), MySQL keeps that info in a system table (since 5.6 this table is exposed in performance_schema).\n\nIf the amount of failed requests without a successful connection reaches the value of max_connect_errors, mysqld assumes that something is wrong and blocks the host from further connection.\n\nTo allow connections from that host again, you need to issue the ``FLUSH HOSTS`` statement." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Panel", - "metadata": { - "name": "mysql-aborted-connections" - }, - "spec": { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "decimals": 2, - "description": "**Aborted Connections**\n\nWhen a given host connects to MySQL and the connection is interrupted in the middle (for example due to bad credentials), MySQL keeps that info in a system table (since 5.6 this table is exposed in performance_schema).\n\nIf the amount of failed requests without a successful connection reaches the value of max_connect_errors, mysqld assumes that something is wrong and blocks the host from further connection.\n\nTo allow connections from that host again, you need to issue the ``FLUSH HOSTS`` statement.", - "editable": true, - "error": false, - "fieldConfig": { - "defaults": { - "custom": { }, - "unit": "short" - }, - "overrides": [ ] - }, - "fill": 2, - "fillGradient": 0, - "grid": { }, - "gridPos": { - "h": 7, - "w": 12, - "x": 0, - "y": 39 + } + ], + "title": "MySQL Slow Queries", + "type": "timeseries" + } + }, + { + "annotations": { + "polly.grafana.com/docs": "**MySQL Slow Queries**\n\nSlow queries are defined as queries being slower than the long_query_time setting. For example, if you have long_query_time set to 3, all queries that take longer than 3 seconds to complete will show on this graph." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "mysql-slow-queries-0" + }, + "spec": { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(rate(mysql_global_status_slow_queries{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Slow Queries", + "metric": "", + "refId": "A", + "step": 20 + } + }, + { + "annotations": {}, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Panel", + "metadata": { + "name": "aborted" + }, + "spec": { + "collapsed": false, + "datasource": { + "uid": "$datasource" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 38 + }, + "id": 387, + "panels": [], + "targets": [ + { + "datasource": { + "uid": "$datasource" }, - "hiddenSeries": false, - "id": 47, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "max": true, - "min": true, - "show": true, - "sort": "avg", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [ ], - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(rate(mysql_global_status_aborted_connects{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Aborted Connects (attempts)", - "metric": "", - "refId": "A", - "step": 20 - }, - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(rate(mysql_global_status_aborted_clients{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Aborted Clients (timeout)", - "metric": "", - "refId": "B", - "step": 20, - "target": "" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "MySQL Aborted Connections", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "cumulative" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": "", - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": "", - "logBase": 1, - "max": null, - "min": 0, - "show": true - } + "refId": "A" + } + ], + "title": "Aborted", + "type": "row" + } + }, + { + "annotations": {}, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "aborted-0" + }, + "spec": { + "datasource": { + "uid": "$datasource" + }, + "refId": "A" + } + }, + { + "annotations": { + "polly.grafana.com/docs": "**Aborted Connections**\n\nWhen a given host connects to MySQL and the connection is interrupted in the middle (for example due to bad credentials), MySQL keeps that info in a system table (since 5.6 this table is exposed in performance_schema).\n\nIf the amount of failed requests without a successful connection reaches the value of max_connect_errors, mysqld assumes that something is wrong and blocks the host from further connection.\n\nTo allow connections from that host again, you need to issue the ``FLUSH HOSTS`` statement." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Panel", + "metadata": { + "name": "mysql-aborted-connections" + }, + "spec": { + "datasource": { + "uid": "$datasource" + }, + "description": "**Aborted Connections**\n\nWhen a given host connects to MySQL and the connection is interrupted in the middle (for example due to bad credentials), MySQL keeps that info in a system table (since 5.6 this table is exposed in performance_schema).\n\nIf the amount of failed requests without a successful connection reaches the value of max_connect_errors, mysqld assumes that something is wrong and blocks the host from further connection.\n\nTo allow connections from that host again, you need to issue the ``FLUSH HOSTS`` statement.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 20, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 39 + }, + "id": 47, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "min" ], - "yaxis": { - "align": false, - "alignLevel": null - } - } - }, - { - "annotations": { - "polly.grafana.com/docs": "**Aborted Connections**\n\nWhen a given host connects to MySQL and the connection is interrupted in the middle (for example due to bad credentials), MySQL keeps that info in a system table (since 5.6 this table is exposed in performance_schema).\n\nIf the amount of failed requests without a successful connection reaches the value of max_connect_errors, mysqld assumes that something is wrong and blocks the host from further connection.\n\nTo allow connections from that host again, you need to issue the ``FLUSH HOSTS`` statement." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Target", - "metadata": { - "name": "mysql-aborted-connections-0" - }, - "spec": { + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.0.2", + "targets": [ + { "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(rate(mysql_global_status_aborted_connects{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(rate(mysql_global_status_aborted_connects{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", "format": "time_series", "interval": "1m", "intervalFactor": 1, @@ -7216,22 +7894,15 @@ "metric": "", "refId": "A", "step": 20 - } - }, - { - "annotations": { - "polly.grafana.com/docs": "**Aborted Connections**\n\nWhen a given host connects to MySQL and the connection is interrupted in the middle (for example due to bad credentials), MySQL keeps that info in a system table (since 5.6 this table is exposed in performance_schema).\n\nIf the amount of failed requests without a successful connection reaches the value of max_connect_errors, mysqld assumes that something is wrong and blocks the host from further connection.\n\nTo allow connections from that host again, you need to issue the ``FLUSH HOSTS`` statement." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Target", - "metadata": { - "name": "mysql-aborted-connections-1" - }, - "spec": { + }, + { "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(rate(mysql_global_status_aborted_clients{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(rate(mysql_global_status_aborted_clients{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", "format": "time_series", "interval": "1m", "intervalFactor": 1, @@ -7240,156 +7911,168 @@ "refId": "B", "step": 20, "target": "" - } - }, - { - "annotations": { - "polly.grafana.com/docs": "**Table Locks**\n\nMySQL takes a number of different locks for varying reasons. In this graph we see how many Table level locks MySQL has requested from the storage engine. In the case of InnoDB, many times the locks could actually be row locks as it only takes table level locks in a few specific cases.\n\nIt is most useful to compare Locks Immediate and Locks Waited. If Locks waited is rising, it means you have lock contention. Otherwise, Locks Immediate rising and falling is normal activity." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Panel", - "metadata": { - "name": "mysql-table-locks" - }, - "spec": { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "decimals": 2, - "description": "**Table Locks**\n\nMySQL takes a number of different locks for varying reasons. In this graph we see how many Table level locks MySQL has requested from the storage engine. In the case of InnoDB, many times the locks could actually be row locks as it only takes table level locks in a few specific cases.\n\nIt is most useful to compare Locks Immediate and Locks Waited. If Locks waited is rising, it means you have lock contention. Otherwise, Locks Immediate rising and falling is normal activity.", - "editable": true, - "error": false, - "fieldConfig": { - "defaults": { - "custom": { }, - "unit": "short" - }, - "overrides": [ ] - }, - "fill": 2, - "fillGradient": 0, - "grid": { }, - "gridPos": { - "h": 7, - "w": 12, - "x": 12, - "y": 39 - }, - "hiddenSeries": false, - "id": 32, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "sort": "avg", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [ ], - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(rate(mysql_global_status_table_locks_immediate{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Table Locks Immediate", - "metric": "", - "refId": "A", - "step": 20 - }, - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(rate(mysql_global_status_table_locks_waited{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Table Locks Waited", - "metric": "", - "refId": "B", - "step": 20 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "MySQL Table Locks", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "logBase": 1, - "max": null, - "min": 0, - "show": true - } + } + ], + "title": "MySQL Aborted Connections", + "type": "timeseries" + } + }, + { + "annotations": { + "polly.grafana.com/docs": "**Aborted Connections**\n\nWhen a given host connects to MySQL and the connection is interrupted in the middle (for example due to bad credentials), MySQL keeps that info in a system table (since 5.6 this table is exposed in performance_schema).\n\nIf the amount of failed requests without a successful connection reaches the value of max_connect_errors, mysqld assumes that something is wrong and blocks the host from further connection.\n\nTo allow connections from that host again, you need to issue the ``FLUSH HOSTS`` statement." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "mysql-aborted-connections-0" + }, + "spec": { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(rate(mysql_global_status_aborted_connects{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Aborted Connects (attempts)", + "metric": "", + "refId": "A", + "step": 20 + } + }, + { + "annotations": { + "polly.grafana.com/docs": "**Aborted Connections**\n\nWhen a given host connects to MySQL and the connection is interrupted in the middle (for example due to bad credentials), MySQL keeps that info in a system table (since 5.6 this table is exposed in performance_schema).\n\nIf the amount of failed requests without a successful connection reaches the value of max_connect_errors, mysqld assumes that something is wrong and blocks the host from further connection.\n\nTo allow connections from that host again, you need to issue the ``FLUSH HOSTS`` statement." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "mysql-aborted-connections-1" + }, + "spec": { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(rate(mysql_global_status_aborted_clients{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Aborted Clients (timeout)", + "metric": "", + "refId": "B", + "step": 20, + "target": "" + } + }, + { + "annotations": { + "polly.grafana.com/docs": "**Table Locks**\n\nMySQL takes a number of different locks for varying reasons. In this graph we see how many Table level locks MySQL has requested from the storage engine. In the case of InnoDB, many times the locks could actually be row locks as it only takes table level locks in a few specific cases.\n\nIt is most useful to compare Locks Immediate and Locks Waited. If Locks waited is rising, it means you have lock contention. Otherwise, Locks Immediate rising and falling is normal activity." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Panel", + "metadata": { + "name": "mysql-table-locks" + }, + "spec": { + "datasource": { + "uid": "$datasource" + }, + "description": "**Table Locks**\n\nMySQL takes a number of different locks for varying reasons. In this graph we see how many Table level locks MySQL has requested from the storage engine. In the case of InnoDB, many times the locks could actually be row locks as it only takes table level locks in a few specific cases.\n\nIt is most useful to compare Locks Immediate and Locks Waited. If Locks waited is rising, it means you have lock contention. Otherwise, Locks Immediate rising and falling is normal activity.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 20, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 39 + }, + "id": 32, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "min" ], - "yaxis": { - "align": false, - "alignLevel": null - } - } - }, - { - "annotations": { - "polly.grafana.com/docs": "**Table Locks**\n\nMySQL takes a number of different locks for varying reasons. In this graph we see how many Table level locks MySQL has requested from the storage engine. In the case of InnoDB, many times the locks could actually be row locks as it only takes table level locks in a few specific cases.\n\nIt is most useful to compare Locks Immediate and Locks Waited. If Locks waited is rising, it means you have lock contention. Otherwise, Locks Immediate rising and falling is normal activity." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Target", - "metadata": { - "name": "mysql-table-locks-0" - }, - "spec": { + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.0.2", + "targets": [ + { "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(rate(mysql_global_status_table_locks_immediate{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(rate(mysql_global_status_table_locks_immediate{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", "format": "time_series", "interval": "1m", "intervalFactor": 1, @@ -7397,22 +8080,15 @@ "metric": "", "refId": "A", "step": 20 - } - }, - { - "annotations": { - "polly.grafana.com/docs": "**Table Locks**\n\nMySQL takes a number of different locks for varying reasons. In this graph we see how many Table level locks MySQL has requested from the storage engine. In the case of InnoDB, many times the locks could actually be row locks as it only takes table level locks in a few specific cases.\n\nIt is most useful to compare Locks Immediate and Locks Waited. If Locks waited is rising, it means you have lock contention. Otherwise, Locks Immediate rising and falling is normal activity." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Target", - "metadata": { - "name": "mysql-table-locks-1" - }, - "spec": { + }, + { "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(rate(mysql_global_status_table_locks_waited{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(rate(mysql_global_status_table_locks_waited{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", "format": "time_series", "interval": "1m", "intervalFactor": 1, @@ -7420,179 +8096,213 @@ "metric": "", "refId": "B", "step": 20 - } - }, - { - "annotations": { }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Panel", - "metadata": { - "name": "network" - }, - "spec": { - "collapsed": false, - "datasource": "$datasource", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 46 - }, - "id": 388, - "panels": [ ], - "repeat": null, - "title": "Network", - "type": "row" - } - }, - { - "annotations": { - "polly.grafana.com/docs": "**MySQL Network Traffic**\n\nHere we can see how much network traffic is generated by MySQL. Outbound is network traffic sent from MySQL and Inbound is network traffic MySQL has received." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Panel", - "metadata": { - "name": "mysql-network-traffic" - }, - "spec": { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "decimals": 2, - "description": "**MySQL Network Traffic**\n\nHere we can see how much network traffic is generated by MySQL. Outbound is network traffic sent from MySQL and Inbound is network traffic MySQL has received.", - "editable": true, - "error": false, - "fieldConfig": { - "defaults": { - "custom": { }, - "unit": "short" - }, - "overrides": [ ] - }, - "fill": 6, - "fillGradient": 0, - "grid": { }, - "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 47 + } + ], + "title": "MySQL Table Locks", + "type": "timeseries" + } + }, + { + "annotations": { + "polly.grafana.com/docs": "**Table Locks**\n\nMySQL takes a number of different locks for varying reasons. In this graph we see how many Table level locks MySQL has requested from the storage engine. In the case of InnoDB, many times the locks could actually be row locks as it only takes table level locks in a few specific cases.\n\nIt is most useful to compare Locks Immediate and Locks Waited. If Locks waited is rising, it means you have lock contention. Otherwise, Locks Immediate rising and falling is normal activity." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "mysql-table-locks-0" + }, + "spec": { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(rate(mysql_global_status_table_locks_immediate{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Table Locks Immediate", + "metric": "", + "refId": "A", + "step": 20 + } + }, + { + "annotations": { + "polly.grafana.com/docs": "**Table Locks**\n\nMySQL takes a number of different locks for varying reasons. In this graph we see how many Table level locks MySQL has requested from the storage engine. In the case of InnoDB, many times the locks could actually be row locks as it only takes table level locks in a few specific cases.\n\nIt is most useful to compare Locks Immediate and Locks Waited. If Locks waited is rising, it means you have lock contention. Otherwise, Locks Immediate rising and falling is normal activity." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "mysql-table-locks-1" + }, + "spec": { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(rate(mysql_global_status_table_locks_waited{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Table Locks Waited", + "metric": "", + "refId": "B", + "step": 20 + } + }, + { + "annotations": {}, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Panel", + "metadata": { + "name": "network" + }, + "spec": { + "collapsed": false, + "datasource": { + "uid": "$datasource" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 46 + }, + "id": 388, + "panels": [], + "targets": [ + { + "datasource": { + "uid": "$datasource" }, - "hiddenSeries": false, - "id": 9, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "sort": "avg", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [ ], - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(rate(mysql_global_status_bytes_received{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Inbound", - "metric": "", - "refId": "A", - "step": 20 - }, - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(rate(mysql_global_status_bytes_sent{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Outbound", - "metric": "", - "refId": "B", - "step": 20 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "MySQL Network Traffic", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "Bps", - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "none", - "logBase": 1, - "max": null, - "min": 0, - "show": true - } + "refId": "A" + } + ], + "title": "Network", + "type": "row" + } + }, + { + "annotations": {}, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "network-0" + }, + "spec": { + "datasource": { + "uid": "$datasource" + }, + "refId": "A" + } + }, + { + "annotations": { + "polly.grafana.com/docs": "**MySQL Network Traffic**\n\nHere we can see how much network traffic is generated by MySQL. Outbound is network traffic sent from MySQL and Inbound is network traffic MySQL has received." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Panel", + "metadata": { + "name": "mysql-network-traffic" + }, + "spec": { + "datasource": { + "uid": "$datasource" + }, + "description": "**MySQL Network Traffic**\n\nHere we can see how much network traffic is generated by MySQL. Outbound is network traffic sent from MySQL and Inbound is network traffic MySQL has received.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 30, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "Bps" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 47 + }, + "id": 9, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "min" ], - "yaxis": { - "align": false, - "alignLevel": null - } - } - }, - { - "annotations": { - "polly.grafana.com/docs": "**MySQL Network Traffic**\n\nHere we can see how much network traffic is generated by MySQL. Outbound is network traffic sent from MySQL and Inbound is network traffic MySQL has received." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Target", - "metadata": { - "name": "mysql-network-traffic-0" - }, - "spec": { + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.0.2", + "targets": [ + { "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(rate(mysql_global_status_bytes_received{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(rate(mysql_global_status_bytes_received{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", "format": "time_series", "interval": "1m", "intervalFactor": 1, @@ -7600,261 +8310,291 @@ "metric": "", "refId": "A", "step": 20 - } - }, - { - "annotations": { - "polly.grafana.com/docs": "**MySQL Network Traffic**\n\nHere we can see how much network traffic is generated by MySQL. Outbound is network traffic sent from MySQL and Inbound is network traffic MySQL has received." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Target", - "metadata": { - "name": "mysql-network-traffic-1" - }, - "spec": { + }, + { "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "sum(rate(mysql_global_status_bytes_sent{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(rate(mysql_global_status_bytes_sent{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", "format": "time_series", "interval": "1m", "intervalFactor": 1, "legendFormat": "Outbound", - "metric": "", - "refId": "B", - "step": 20 - } - }, - { - "annotations": { }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Panel", - "metadata": { - "name": "memory" - }, - "spec": { - "collapsed": false, - "datasource": "$datasource", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 54 - }, - "id": 389, - "panels": [ ], - "repeat": null, - "title": "Memory", - "type": "row" - } - }, - { - "annotations": { - "polly.grafana.com/docs": "***System Memory***: Total Memory for the system.\\\n***InnoDB Buffer Pool Data***: InnoDB maintains a storage area called the buffer pool for caching data and indexes in memory.\\\n***TokuDB Cache Size***: Similar in function to the InnoDB Buffer Pool, TokuDB will allocate 50% of the installed RAM for its own cache.\\\n***Key Buffer Size***: Index blocks for MYISAM tables are buffered and are shared by all threads. key_buffer_size is the size of the buffer used for index blocks.\\\n***Adaptive Hash Index Size***: When InnoDB notices that some index values are being accessed very frequently, it builds a hash index for them in memory on top of B-Tree indexes.\\\n ***Query Cache Size***: The query cache stores the text of a SELECT statement together with the corresponding result that was sent to the client. The query cache has huge scalability problems in that only one thread can do an operation in the query cache at the same time.\\\n***InnoDB Dictionary Size***: The data dictionary is InnoDB ‘s internal catalog of tables. InnoDB stores the data dictionary on disk, and loads entries into memory while the server is running.\\\n***InnoDB Log Buffer Size***: The MySQL InnoDB log buffer allows transactions to run without having to write the log to disk before the transactions commit." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Panel", - "metadata": { - "name": "mysql-internal-memory-overview" - }, - "spec": { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "decimals": 0, - "description": "***System Memory***: Total Memory for the system.\\\n***InnoDB Buffer Pool Data***: InnoDB maintains a storage area called the buffer pool for caching data and indexes in memory.\\\n***TokuDB Cache Size***: Similar in function to the InnoDB Buffer Pool, TokuDB will allocate 50% of the installed RAM for its own cache.\\\n***Key Buffer Size***: Index blocks for MYISAM tables are buffered and are shared by all threads. key_buffer_size is the size of the buffer used for index blocks.\\\n***Adaptive Hash Index Size***: When InnoDB notices that some index values are being accessed very frequently, it builds a hash index for them in memory on top of B-Tree indexes.\\\n ***Query Cache Size***: The query cache stores the text of a SELECT statement together with the corresponding result that was sent to the client. The query cache has huge scalability problems in that only one thread can do an operation in the query cache at the same time.\\\n***InnoDB Dictionary Size***: The data dictionary is InnoDB ‘s internal catalog of tables. InnoDB stores the data dictionary on disk, and loads entries into memory while the server is running.\\\n***InnoDB Log Buffer Size***: The MySQL InnoDB log buffer allows transactions to run without having to write the log to disk before the transactions commit.", - "editable": true, - "error": false, - "fieldConfig": { - "defaults": { - "custom": { }, - "unit": "short" - }, - "overrides": [ ] - }, - "fill": 6, - "fillGradient": 0, - "grid": { }, - "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 55 + "metric": "", + "refId": "B", + "step": 20 + } + ], + "title": "MySQL Network Traffic", + "type": "timeseries" + } + }, + { + "annotations": { + "polly.grafana.com/docs": "**MySQL Network Traffic**\n\nHere we can see how much network traffic is generated by MySQL. Outbound is network traffic sent from MySQL and Inbound is network traffic MySQL has received." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "mysql-network-traffic-0" + }, + "spec": { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(rate(mysql_global_status_bytes_received{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Inbound", + "metric": "", + "refId": "A", + "step": 20 + } + }, + { + "annotations": { + "polly.grafana.com/docs": "**MySQL Network Traffic**\n\nHere we can see how much network traffic is generated by MySQL. Outbound is network traffic sent from MySQL and Inbound is network traffic MySQL has received." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "mysql-network-traffic-1" + }, + "spec": { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(rate(mysql_global_status_bytes_sent{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Outbound", + "metric": "", + "refId": "B", + "step": 20 + } + }, + { + "annotations": {}, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Panel", + "metadata": { + "name": "memory" + }, + "spec": { + "collapsed": false, + "datasource": { + "uid": "$datasource" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 54 + }, + "id": 389, + "panels": [], + "targets": [ + { + "datasource": { + "uid": "$datasource" }, - "hiddenSeries": false, - "id": 50, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "hideEmpty": true, - "hideZero": true, - "max": true, - "min": true, - "rightSide": true, - "show": true, - "sort": "avg", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [ - { - "title": "Detailed descriptions about metrics", - "url": "https://www.percona.com/doc/percona-monitoring-and-management/dashboard.mysql-overview.html#mysql-internal-memory-overview" - } - ], - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "System Memory", - "fill": 0, - "stack": false - } - ], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "expr": "sum(mysql_global_status_innodb_page_size{job=~\"$job\", instance=~\"$instance\"} * on (instance) mysql_global_status_buffer_pool_pages{job=~\"$job\", instance=~\"$instance\", state=\"data\"})", - "format": "time_series", - "hide": false, - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "InnoDB Buffer Pool Data", - "refId": "A", - "step": 20 - }, - { - "expr": "sum(mysql_global_variables_innodb_log_buffer_size{job=~\"$job\", instance=~\"$instance\"})", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "InnoDB Log Buffer Size", - "refId": "D", - "step": 20 - }, - { - "expr": "sum(mysql_global_variables_innodb_additional_mem_pool_size{job=~\"$job\", instance=~\"$instance\"})", - "format": "time_series", - "interval": "1m", - "intervalFactor": 2, - "legendFormat": "InnoDB Additional Memory Pool Size", - "refId": "H", - "step": 40 - }, - { - "expr": "sum(mysql_global_status_innodb_mem_dictionary{job=~\"$job\", instance=~\"$instance\"})", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "InnoDB Dictionary Size", - "refId": "F", - "step": 20 - }, - { - "expr": "sum(mysql_global_variables_key_buffer_size{job=~\"$job\", instance=~\"$instance\"})", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Key Buffer Size", - "refId": "B", - "step": 20 - }, - { - "expr": "sum(mysql_global_variables_query_cache_size{job=~\"$job\", instance=~\"$instance\"})", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Query Cache Size", - "refId": "C", - "step": 20 - }, - { - "expr": "sum(mysql_global_status_innodb_mem_adaptive_hash{job=~\"$job\", instance=~\"$instance\"})", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Adaptive Hash Index Size", - "refId": "E", - "step": 20 - }, - { - "expr": "sum(mysql_global_variables_tokudb_cache_size{job=~\"$job\", instance=~\"$instance\"})", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "TokuDB Cache Size", - "refId": "I", - "step": 20 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "MySQL Internal Memory Overview", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "bytes", - "label": "", - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null + "refId": "A" + } + ], + "title": "Memory", + "type": "row" + } + }, + { + "annotations": {}, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "memory-0" + }, + "spec": { + "datasource": { + "uid": "$datasource" + }, + "refId": "A" + } + }, + { + "annotations": { + "polly.grafana.com/docs": "***System Memory***: Total Memory for the system.\\\n***InnoDB Buffer Pool Data***: InnoDB maintains a storage area called the buffer pool for caching data and indexes in memory.\\\n***TokuDB Cache Size***: Similar in function to the InnoDB Buffer Pool, TokuDB will allocate 50% of the installed RAM for its own cache.\\\n***Key Buffer Size***: Index blocks for MYISAM tables are buffered and are shared by all threads. key_buffer_size is the size of the buffer used for index blocks.\\\n***Adaptive Hash Index Size***: When InnoDB notices that some index values are being accessed very frequently, it builds a hash index for them in memory on top of B-Tree indexes.\\\n ***Query Cache Size***: The query cache stores the text of a SELECT statement together with the corresponding result that was sent to the client. The query cache has huge scalability problems in that only one thread can do an operation in the query cache at the same time.\\\n***InnoDB Dictionary Size***: The data dictionary is InnoDB ‘s internal catalog of tables. InnoDB stores the data dictionary on disk, and loads entries into memory while the server is running.\\\n***InnoDB Log Buffer Size***: The MySQL InnoDB log buffer allows transactions to run without having to write the log to disk before the transactions commit." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Panel", + "metadata": { + "name": "mysql-internal-memory-overview" + }, + "spec": { + "datasource": { + "uid": "$datasource" + }, + "description": "***System Memory***: Total Memory for the system.\\\n***InnoDB Buffer Pool Data***: InnoDB maintains a storage area called the buffer pool for caching data and indexes in memory.\\\n***TokuDB Cache Size***: Similar in function to the InnoDB Buffer Pool, TokuDB will allocate 50% of the installed RAM for its own cache.\\\n***Key Buffer Size***: Index blocks for MYISAM tables are buffered and are shared by all threads. key_buffer_size is the size of the buffer used for index blocks.\\\n***Adaptive Hash Index Size***: When InnoDB notices that some index values are being accessed very frequently, it builds a hash index for them in memory on top of B-Tree indexes.\\\n ***Query Cache Size***: The query cache stores the text of a SELECT statement together with the corresponding result that was sent to the client. The query cache has huge scalability problems in that only one thread can do an operation in the query cache at the same time.\\\n***InnoDB Dictionary Size***: The data dictionary is InnoDB ‘s internal catalog of tables. InnoDB stores the data dictionary on disk, and loads entries into memory while the server is running.\\\n***InnoDB Log Buffer Size***: The MySQL InnoDB log buffer allows transactions to run without having to write the log to disk before the transactions commit.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 30, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "System Memory" + }, + "properties": [ + { + "id": "custom.fillOpacity", + "value": 0 + }, + { + "id": "custom.stacking", + "value": { + "group": "A", + "mode": "none" + } + } + ] + }, + { + "matcher": { + "id": "byValue", + "options": { + "op": "gte", + "reducer": "allIsZero", + "value": 0 + } + }, + "properties": [ + { + "id": "custom.hideFrom", + "value": { + "legend": true, + "tooltip": true, + "viz": false + } + } + ] + }, + { + "matcher": { + "id": "byValue", + "options": { + "op": "gte", + "reducer": "allIsNull", + "value": 0 + } + }, + "properties": [ + { + "id": "custom.hideFrom", + "value": { + "legend": true, + "tooltip": true, + "viz": false + } + } + ] } - } - }, - { - "annotations": { - "polly.grafana.com/docs": "***System Memory***: Total Memory for the system.\\\n***InnoDB Buffer Pool Data***: InnoDB maintains a storage area called the buffer pool for caching data and indexes in memory.\\\n***TokuDB Cache Size***: Similar in function to the InnoDB Buffer Pool, TokuDB will allocate 50% of the installed RAM for its own cache.\\\n***Key Buffer Size***: Index blocks for MYISAM tables are buffered and are shared by all threads. key_buffer_size is the size of the buffer used for index blocks.\\\n***Adaptive Hash Index Size***: When InnoDB notices that some index values are being accessed very frequently, it builds a hash index for them in memory on top of B-Tree indexes.\\\n ***Query Cache Size***: The query cache stores the text of a SELECT statement together with the corresponding result that was sent to the client. The query cache has huge scalability problems in that only one thread can do an operation in the query cache at the same time.\\\n***InnoDB Dictionary Size***: The data dictionary is InnoDB ‘s internal catalog of tables. InnoDB stores the data dictionary on disk, and loads entries into memory while the server is running.\\\n***InnoDB Log Buffer Size***: The MySQL InnoDB log buffer allows transactions to run without having to write the log to disk before the transactions commit." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Target", - "metadata": { - "name": "mysql-internal-memory-overview-0" - }, - "spec": { - "expr": "sum(mysql_global_status_innodb_page_size{job=~\"$job\", instance=~\"$instance\"} * on (instance) mysql_global_status_buffer_pool_pages{job=~\"$job\", instance=~\"$instance\", state=\"data\"})", + ] + }, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 55 + }, + "id": 50, + "links": [ + { + "title": "Detailed descriptions about metrics", + "url": "https://www.percona.com/doc/percona-monitoring-and-management/dashboard.mysql-overview.html#mysql-internal-memory-overview" + } + ], + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "min" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.0.2", + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "expr": "sum(mysql_global_status_innodb_page_size{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"} * on (instance) mysql_global_status_buffer_pool_pages{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\", state=\"data\"})", "format": "time_series", "hide": false, "interval": "1m", @@ -7862,307 +8602,427 @@ "legendFormat": "InnoDB Buffer Pool Data", "refId": "A", "step": 20 - } - }, - { - "annotations": { - "polly.grafana.com/docs": "***System Memory***: Total Memory for the system.\\\n***InnoDB Buffer Pool Data***: InnoDB maintains a storage area called the buffer pool for caching data and indexes in memory.\\\n***TokuDB Cache Size***: Similar in function to the InnoDB Buffer Pool, TokuDB will allocate 50% of the installed RAM for its own cache.\\\n***Key Buffer Size***: Index blocks for MYISAM tables are buffered and are shared by all threads. key_buffer_size is the size of the buffer used for index blocks.\\\n***Adaptive Hash Index Size***: When InnoDB notices that some index values are being accessed very frequently, it builds a hash index for them in memory on top of B-Tree indexes.\\\n ***Query Cache Size***: The query cache stores the text of a SELECT statement together with the corresponding result that was sent to the client. The query cache has huge scalability problems in that only one thread can do an operation in the query cache at the same time.\\\n***InnoDB Dictionary Size***: The data dictionary is InnoDB ‘s internal catalog of tables. InnoDB stores the data dictionary on disk, and loads entries into memory while the server is running.\\\n***InnoDB Log Buffer Size***: The MySQL InnoDB log buffer allows transactions to run without having to write the log to disk before the transactions commit." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Target", - "metadata": { - "name": "mysql-internal-memory-overview-1" - }, - "spec": { - "expr": "sum(mysql_global_variables_innodb_log_buffer_size{job=~\"$job\", instance=~\"$instance\"})", + }, + { + "datasource": { + "uid": "$datasource" + }, + "expr": "sum(mysql_global_variables_innodb_log_buffer_size{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"})", "format": "time_series", "interval": "1m", "intervalFactor": 1, "legendFormat": "InnoDB Log Buffer Size", "refId": "D", "step": 20 - } - }, - { - "annotations": { - "polly.grafana.com/docs": "***System Memory***: Total Memory for the system.\\\n***InnoDB Buffer Pool Data***: InnoDB maintains a storage area called the buffer pool for caching data and indexes in memory.\\\n***TokuDB Cache Size***: Similar in function to the InnoDB Buffer Pool, TokuDB will allocate 50% of the installed RAM for its own cache.\\\n***Key Buffer Size***: Index blocks for MYISAM tables are buffered and are shared by all threads. key_buffer_size is the size of the buffer used for index blocks.\\\n***Adaptive Hash Index Size***: When InnoDB notices that some index values are being accessed very frequently, it builds a hash index for them in memory on top of B-Tree indexes.\\\n ***Query Cache Size***: The query cache stores the text of a SELECT statement together with the corresponding result that was sent to the client. The query cache has huge scalability problems in that only one thread can do an operation in the query cache at the same time.\\\n***InnoDB Dictionary Size***: The data dictionary is InnoDB ‘s internal catalog of tables. InnoDB stores the data dictionary on disk, and loads entries into memory while the server is running.\\\n***InnoDB Log Buffer Size***: The MySQL InnoDB log buffer allows transactions to run without having to write the log to disk before the transactions commit." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Target", - "metadata": { - "name": "mysql-internal-memory-overview-2" - }, - "spec": { - "expr": "sum(mysql_global_variables_innodb_additional_mem_pool_size{job=~\"$job\", instance=~\"$instance\"})", + }, + { + "datasource": { + "uid": "$datasource" + }, + "expr": "sum(mysql_global_variables_innodb_additional_mem_pool_size{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"})", "format": "time_series", "interval": "1m", "intervalFactor": 2, "legendFormat": "InnoDB Additional Memory Pool Size", "refId": "H", "step": 40 - } - }, - { - "annotations": { - "polly.grafana.com/docs": "***System Memory***: Total Memory for the system.\\\n***InnoDB Buffer Pool Data***: InnoDB maintains a storage area called the buffer pool for caching data and indexes in memory.\\\n***TokuDB Cache Size***: Similar in function to the InnoDB Buffer Pool, TokuDB will allocate 50% of the installed RAM for its own cache.\\\n***Key Buffer Size***: Index blocks for MYISAM tables are buffered and are shared by all threads. key_buffer_size is the size of the buffer used for index blocks.\\\n***Adaptive Hash Index Size***: When InnoDB notices that some index values are being accessed very frequently, it builds a hash index for them in memory on top of B-Tree indexes.\\\n ***Query Cache Size***: The query cache stores the text of a SELECT statement together with the corresponding result that was sent to the client. The query cache has huge scalability problems in that only one thread can do an operation in the query cache at the same time.\\\n***InnoDB Dictionary Size***: The data dictionary is InnoDB ‘s internal catalog of tables. InnoDB stores the data dictionary on disk, and loads entries into memory while the server is running.\\\n***InnoDB Log Buffer Size***: The MySQL InnoDB log buffer allows transactions to run without having to write the log to disk before the transactions commit." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Target", - "metadata": { - "name": "mysql-internal-memory-overview-3" - }, - "spec": { - "expr": "sum(mysql_global_status_innodb_mem_dictionary{job=~\"$job\", instance=~\"$instance\"})", + }, + { + "datasource": { + "uid": "$datasource" + }, + "expr": "sum(mysql_global_status_innodb_mem_dictionary{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"})", "format": "time_series", "interval": "1m", "intervalFactor": 1, "legendFormat": "InnoDB Dictionary Size", "refId": "F", "step": 20 - } - }, - { - "annotations": { - "polly.grafana.com/docs": "***System Memory***: Total Memory for the system.\\\n***InnoDB Buffer Pool Data***: InnoDB maintains a storage area called the buffer pool for caching data and indexes in memory.\\\n***TokuDB Cache Size***: Similar in function to the InnoDB Buffer Pool, TokuDB will allocate 50% of the installed RAM for its own cache.\\\n***Key Buffer Size***: Index blocks for MYISAM tables are buffered and are shared by all threads. key_buffer_size is the size of the buffer used for index blocks.\\\n***Adaptive Hash Index Size***: When InnoDB notices that some index values are being accessed very frequently, it builds a hash index for them in memory on top of B-Tree indexes.\\\n ***Query Cache Size***: The query cache stores the text of a SELECT statement together with the corresponding result that was sent to the client. The query cache has huge scalability problems in that only one thread can do an operation in the query cache at the same time.\\\n***InnoDB Dictionary Size***: The data dictionary is InnoDB ‘s internal catalog of tables. InnoDB stores the data dictionary on disk, and loads entries into memory while the server is running.\\\n***InnoDB Log Buffer Size***: The MySQL InnoDB log buffer allows transactions to run without having to write the log to disk before the transactions commit." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Target", - "metadata": { - "name": "mysql-internal-memory-overview-4" - }, - "spec": { - "expr": "sum(mysql_global_variables_key_buffer_size{job=~\"$job\", instance=~\"$instance\"})", + }, + { + "datasource": { + "uid": "$datasource" + }, + "expr": "sum(mysql_global_variables_key_buffer_size{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"})", "format": "time_series", "interval": "1m", "intervalFactor": 1, "legendFormat": "Key Buffer Size", "refId": "B", "step": 20 - } - }, - { - "annotations": { - "polly.grafana.com/docs": "***System Memory***: Total Memory for the system.\\\n***InnoDB Buffer Pool Data***: InnoDB maintains a storage area called the buffer pool for caching data and indexes in memory.\\\n***TokuDB Cache Size***: Similar in function to the InnoDB Buffer Pool, TokuDB will allocate 50% of the installed RAM for its own cache.\\\n***Key Buffer Size***: Index blocks for MYISAM tables are buffered and are shared by all threads. key_buffer_size is the size of the buffer used for index blocks.\\\n***Adaptive Hash Index Size***: When InnoDB notices that some index values are being accessed very frequently, it builds a hash index for them in memory on top of B-Tree indexes.\\\n ***Query Cache Size***: The query cache stores the text of a SELECT statement together with the corresponding result that was sent to the client. The query cache has huge scalability problems in that only one thread can do an operation in the query cache at the same time.\\\n***InnoDB Dictionary Size***: The data dictionary is InnoDB ‘s internal catalog of tables. InnoDB stores the data dictionary on disk, and loads entries into memory while the server is running.\\\n***InnoDB Log Buffer Size***: The MySQL InnoDB log buffer allows transactions to run without having to write the log to disk before the transactions commit." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Target", - "metadata": { - "name": "mysql-internal-memory-overview-5" - }, - "spec": { - "expr": "sum(mysql_global_variables_query_cache_size{job=~\"$job\", instance=~\"$instance\"})", + }, + { + "datasource": { + "uid": "$datasource" + }, + "expr": "sum(mysql_global_variables_query_cache_size{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"})", "format": "time_series", "interval": "1m", "intervalFactor": 1, "legendFormat": "Query Cache Size", "refId": "C", "step": 20 - } - }, - { - "annotations": { - "polly.grafana.com/docs": "***System Memory***: Total Memory for the system.\\\n***InnoDB Buffer Pool Data***: InnoDB maintains a storage area called the buffer pool for caching data and indexes in memory.\\\n***TokuDB Cache Size***: Similar in function to the InnoDB Buffer Pool, TokuDB will allocate 50% of the installed RAM for its own cache.\\\n***Key Buffer Size***: Index blocks for MYISAM tables are buffered and are shared by all threads. key_buffer_size is the size of the buffer used for index blocks.\\\n***Adaptive Hash Index Size***: When InnoDB notices that some index values are being accessed very frequently, it builds a hash index for them in memory on top of B-Tree indexes.\\\n ***Query Cache Size***: The query cache stores the text of a SELECT statement together with the corresponding result that was sent to the client. The query cache has huge scalability problems in that only one thread can do an operation in the query cache at the same time.\\\n***InnoDB Dictionary Size***: The data dictionary is InnoDB ‘s internal catalog of tables. InnoDB stores the data dictionary on disk, and loads entries into memory while the server is running.\\\n***InnoDB Log Buffer Size***: The MySQL InnoDB log buffer allows transactions to run without having to write the log to disk before the transactions commit." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Target", - "metadata": { - "name": "mysql-internal-memory-overview-6" - }, - "spec": { - "expr": "sum(mysql_global_status_innodb_mem_adaptive_hash{job=~\"$job\", instance=~\"$instance\"})", + }, + { + "datasource": { + "uid": "$datasource" + }, + "expr": "sum(mysql_global_status_innodb_mem_adaptive_hash{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"})", "format": "time_series", "interval": "1m", "intervalFactor": 1, "legendFormat": "Adaptive Hash Index Size", "refId": "E", "step": 20 - } - }, - { - "annotations": { - "polly.grafana.com/docs": "***System Memory***: Total Memory for the system.\\\n***InnoDB Buffer Pool Data***: InnoDB maintains a storage area called the buffer pool for caching data and indexes in memory.\\\n***TokuDB Cache Size***: Similar in function to the InnoDB Buffer Pool, TokuDB will allocate 50% of the installed RAM for its own cache.\\\n***Key Buffer Size***: Index blocks for MYISAM tables are buffered and are shared by all threads. key_buffer_size is the size of the buffer used for index blocks.\\\n***Adaptive Hash Index Size***: When InnoDB notices that some index values are being accessed very frequently, it builds a hash index for them in memory on top of B-Tree indexes.\\\n ***Query Cache Size***: The query cache stores the text of a SELECT statement together with the corresponding result that was sent to the client. The query cache has huge scalability problems in that only one thread can do an operation in the query cache at the same time.\\\n***InnoDB Dictionary Size***: The data dictionary is InnoDB ‘s internal catalog of tables. InnoDB stores the data dictionary on disk, and loads entries into memory while the server is running.\\\n***InnoDB Log Buffer Size***: The MySQL InnoDB log buffer allows transactions to run without having to write the log to disk before the transactions commit." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Target", - "metadata": { - "name": "mysql-internal-memory-overview-7" - }, - "spec": { - "expr": "sum(mysql_global_variables_tokudb_cache_size{job=~\"$job\", instance=~\"$instance\"})", + }, + { + "datasource": { + "uid": "$datasource" + }, + "expr": "sum(mysql_global_variables_tokudb_cache_size{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"})", "format": "time_series", "interval": "1m", "intervalFactor": 1, "legendFormat": "TokuDB Cache Size", "refId": "I", "step": 20 - } - }, - { - "annotations": { }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Panel", - "metadata": { - "name": "command-handlers-processes" - }, - "spec": { - "collapsed": false, - "datasource": "$datasource", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 62 - }, - "id": 390, - "panels": [ ], - "repeat": null, - "title": "Command, Handlers, Processes", - "type": "row" - } - }, - { - "annotations": { - "polly.grafana.com/docs": "**Top Command Counters**\n\nThe Com_{{xxx}} statement counter variables indicate the number of times each xxx statement has been executed. There is one status variable for each type of statement. For example, Com_delete and Com_update count [``DELETE``](https://dev.mysql.com/doc/refman/5.7/en/delete.html) and [``UPDATE``](https://dev.mysql.com/doc/refman/5.7/en/update.html) statements, respectively. Com_delete_multi and Com_update_multi are similar but apply to [``DELETE``](https://dev.mysql.com/doc/refman/5.7/en/delete.html) and [``UPDATE``](https://dev.mysql.com/doc/refman/5.7/en/update.html) statements that use multiple-table syntax." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Panel", - "metadata": { - "name": "top-command-counters" - }, - "spec": { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "decimals": 2, - "description": "**Top Command Counters**\n\nThe Com_{{xxx}} statement counter variables indicate the number of times each xxx statement has been executed. There is one status variable for each type of statement. For example, Com_delete and Com_update count [``DELETE``](https://dev.mysql.com/doc/refman/5.7/en/delete.html) and [``UPDATE``](https://dev.mysql.com/doc/refman/5.7/en/update.html) statements, respectively. Com_delete_multi and Com_update_multi are similar but apply to [``DELETE``](https://dev.mysql.com/doc/refman/5.7/en/delete.html) and [``UPDATE``](https://dev.mysql.com/doc/refman/5.7/en/update.html) statements that use multiple-table syntax.", - "editable": true, - "error": false, - "fieldConfig": { - "defaults": { - "custom": { }, - "unit": "short" - }, - "overrides": [ ] - }, - "fill": 2, - "fillGradient": 0, - "grid": { }, - "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 63 + } + ], + "title": "MySQL Internal Memory Overview", + "type": "timeseries" + } + }, + { + "annotations": { + "polly.grafana.com/docs": "***System Memory***: Total Memory for the system.\\\n***InnoDB Buffer Pool Data***: InnoDB maintains a storage area called the buffer pool for caching data and indexes in memory.\\\n***TokuDB Cache Size***: Similar in function to the InnoDB Buffer Pool, TokuDB will allocate 50% of the installed RAM for its own cache.\\\n***Key Buffer Size***: Index blocks for MYISAM tables are buffered and are shared by all threads. key_buffer_size is the size of the buffer used for index blocks.\\\n***Adaptive Hash Index Size***: When InnoDB notices that some index values are being accessed very frequently, it builds a hash index for them in memory on top of B-Tree indexes.\\\n ***Query Cache Size***: The query cache stores the text of a SELECT statement together with the corresponding result that was sent to the client. The query cache has huge scalability problems in that only one thread can do an operation in the query cache at the same time.\\\n***InnoDB Dictionary Size***: The data dictionary is InnoDB ‘s internal catalog of tables. InnoDB stores the data dictionary on disk, and loads entries into memory while the server is running.\\\n***InnoDB Log Buffer Size***: The MySQL InnoDB log buffer allows transactions to run without having to write the log to disk before the transactions commit." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "mysql-internal-memory-overview-0" + }, + "spec": { + "datasource": { + "uid": "$datasource" + }, + "expr": "sum(mysql_global_status_innodb_page_size{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"} * on (instance) mysql_global_status_buffer_pool_pages{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\", state=\"data\"})", + "format": "time_series", + "hide": false, + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "InnoDB Buffer Pool Data", + "refId": "A", + "step": 20 + } + }, + { + "annotations": { + "polly.grafana.com/docs": "***System Memory***: Total Memory for the system.\\\n***InnoDB Buffer Pool Data***: InnoDB maintains a storage area called the buffer pool for caching data and indexes in memory.\\\n***TokuDB Cache Size***: Similar in function to the InnoDB Buffer Pool, TokuDB will allocate 50% of the installed RAM for its own cache.\\\n***Key Buffer Size***: Index blocks for MYISAM tables are buffered and are shared by all threads. key_buffer_size is the size of the buffer used for index blocks.\\\n***Adaptive Hash Index Size***: When InnoDB notices that some index values are being accessed very frequently, it builds a hash index for them in memory on top of B-Tree indexes.\\\n ***Query Cache Size***: The query cache stores the text of a SELECT statement together with the corresponding result that was sent to the client. The query cache has huge scalability problems in that only one thread can do an operation in the query cache at the same time.\\\n***InnoDB Dictionary Size***: The data dictionary is InnoDB ‘s internal catalog of tables. InnoDB stores the data dictionary on disk, and loads entries into memory while the server is running.\\\n***InnoDB Log Buffer Size***: The MySQL InnoDB log buffer allows transactions to run without having to write the log to disk before the transactions commit." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "mysql-internal-memory-overview-1" + }, + "spec": { + "datasource": { + "uid": "$datasource" + }, + "expr": "sum(mysql_global_variables_innodb_log_buffer_size{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"})", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "InnoDB Log Buffer Size", + "refId": "D", + "step": 20 + } + }, + { + "annotations": { + "polly.grafana.com/docs": "***System Memory***: Total Memory for the system.\\\n***InnoDB Buffer Pool Data***: InnoDB maintains a storage area called the buffer pool for caching data and indexes in memory.\\\n***TokuDB Cache Size***: Similar in function to the InnoDB Buffer Pool, TokuDB will allocate 50% of the installed RAM for its own cache.\\\n***Key Buffer Size***: Index blocks for MYISAM tables are buffered and are shared by all threads. key_buffer_size is the size of the buffer used for index blocks.\\\n***Adaptive Hash Index Size***: When InnoDB notices that some index values are being accessed very frequently, it builds a hash index for them in memory on top of B-Tree indexes.\\\n ***Query Cache Size***: The query cache stores the text of a SELECT statement together with the corresponding result that was sent to the client. The query cache has huge scalability problems in that only one thread can do an operation in the query cache at the same time.\\\n***InnoDB Dictionary Size***: The data dictionary is InnoDB ‘s internal catalog of tables. InnoDB stores the data dictionary on disk, and loads entries into memory while the server is running.\\\n***InnoDB Log Buffer Size***: The MySQL InnoDB log buffer allows transactions to run without having to write the log to disk before the transactions commit." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "mysql-internal-memory-overview-2" + }, + "spec": { + "datasource": { + "uid": "$datasource" + }, + "expr": "sum(mysql_global_variables_innodb_additional_mem_pool_size{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"})", + "format": "time_series", + "interval": "1m", + "intervalFactor": 2, + "legendFormat": "InnoDB Additional Memory Pool Size", + "refId": "H", + "step": 40 + } + }, + { + "annotations": { + "polly.grafana.com/docs": "***System Memory***: Total Memory for the system.\\\n***InnoDB Buffer Pool Data***: InnoDB maintains a storage area called the buffer pool for caching data and indexes in memory.\\\n***TokuDB Cache Size***: Similar in function to the InnoDB Buffer Pool, TokuDB will allocate 50% of the installed RAM for its own cache.\\\n***Key Buffer Size***: Index blocks for MYISAM tables are buffered and are shared by all threads. key_buffer_size is the size of the buffer used for index blocks.\\\n***Adaptive Hash Index Size***: When InnoDB notices that some index values are being accessed very frequently, it builds a hash index for them in memory on top of B-Tree indexes.\\\n ***Query Cache Size***: The query cache stores the text of a SELECT statement together with the corresponding result that was sent to the client. The query cache has huge scalability problems in that only one thread can do an operation in the query cache at the same time.\\\n***InnoDB Dictionary Size***: The data dictionary is InnoDB ‘s internal catalog of tables. InnoDB stores the data dictionary on disk, and loads entries into memory while the server is running.\\\n***InnoDB Log Buffer Size***: The MySQL InnoDB log buffer allows transactions to run without having to write the log to disk before the transactions commit." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "mysql-internal-memory-overview-3" + }, + "spec": { + "datasource": { + "uid": "$datasource" + }, + "expr": "sum(mysql_global_status_innodb_mem_dictionary{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"})", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "InnoDB Dictionary Size", + "refId": "F", + "step": 20 + } + }, + { + "annotations": { + "polly.grafana.com/docs": "***System Memory***: Total Memory for the system.\\\n***InnoDB Buffer Pool Data***: InnoDB maintains a storage area called the buffer pool for caching data and indexes in memory.\\\n***TokuDB Cache Size***: Similar in function to the InnoDB Buffer Pool, TokuDB will allocate 50% of the installed RAM for its own cache.\\\n***Key Buffer Size***: Index blocks for MYISAM tables are buffered and are shared by all threads. key_buffer_size is the size of the buffer used for index blocks.\\\n***Adaptive Hash Index Size***: When InnoDB notices that some index values are being accessed very frequently, it builds a hash index for them in memory on top of B-Tree indexes.\\\n ***Query Cache Size***: The query cache stores the text of a SELECT statement together with the corresponding result that was sent to the client. The query cache has huge scalability problems in that only one thread can do an operation in the query cache at the same time.\\\n***InnoDB Dictionary Size***: The data dictionary is InnoDB ‘s internal catalog of tables. InnoDB stores the data dictionary on disk, and loads entries into memory while the server is running.\\\n***InnoDB Log Buffer Size***: The MySQL InnoDB log buffer allows transactions to run without having to write the log to disk before the transactions commit." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "mysql-internal-memory-overview-4" + }, + "spec": { + "datasource": { + "uid": "$datasource" + }, + "expr": "sum(mysql_global_variables_key_buffer_size{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"})", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Key Buffer Size", + "refId": "B", + "step": 20 + } + }, + { + "annotations": { + "polly.grafana.com/docs": "***System Memory***: Total Memory for the system.\\\n***InnoDB Buffer Pool Data***: InnoDB maintains a storage area called the buffer pool for caching data and indexes in memory.\\\n***TokuDB Cache Size***: Similar in function to the InnoDB Buffer Pool, TokuDB will allocate 50% of the installed RAM for its own cache.\\\n***Key Buffer Size***: Index blocks for MYISAM tables are buffered and are shared by all threads. key_buffer_size is the size of the buffer used for index blocks.\\\n***Adaptive Hash Index Size***: When InnoDB notices that some index values are being accessed very frequently, it builds a hash index for them in memory on top of B-Tree indexes.\\\n ***Query Cache Size***: The query cache stores the text of a SELECT statement together with the corresponding result that was sent to the client. The query cache has huge scalability problems in that only one thread can do an operation in the query cache at the same time.\\\n***InnoDB Dictionary Size***: The data dictionary is InnoDB ‘s internal catalog of tables. InnoDB stores the data dictionary on disk, and loads entries into memory while the server is running.\\\n***InnoDB Log Buffer Size***: The MySQL InnoDB log buffer allows transactions to run without having to write the log to disk before the transactions commit." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "mysql-internal-memory-overview-5" + }, + "spec": { + "datasource": { + "uid": "$datasource" + }, + "expr": "sum(mysql_global_variables_query_cache_size{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"})", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Query Cache Size", + "refId": "C", + "step": 20 + } + }, + { + "annotations": { + "polly.grafana.com/docs": "***System Memory***: Total Memory for the system.\\\n***InnoDB Buffer Pool Data***: InnoDB maintains a storage area called the buffer pool for caching data and indexes in memory.\\\n***TokuDB Cache Size***: Similar in function to the InnoDB Buffer Pool, TokuDB will allocate 50% of the installed RAM for its own cache.\\\n***Key Buffer Size***: Index blocks for MYISAM tables are buffered and are shared by all threads. key_buffer_size is the size of the buffer used for index blocks.\\\n***Adaptive Hash Index Size***: When InnoDB notices that some index values are being accessed very frequently, it builds a hash index for them in memory on top of B-Tree indexes.\\\n ***Query Cache Size***: The query cache stores the text of a SELECT statement together with the corresponding result that was sent to the client. The query cache has huge scalability problems in that only one thread can do an operation in the query cache at the same time.\\\n***InnoDB Dictionary Size***: The data dictionary is InnoDB ‘s internal catalog of tables. InnoDB stores the data dictionary on disk, and loads entries into memory while the server is running.\\\n***InnoDB Log Buffer Size***: The MySQL InnoDB log buffer allows transactions to run without having to write the log to disk before the transactions commit." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "mysql-internal-memory-overview-6" + }, + "spec": { + "datasource": { + "uid": "$datasource" + }, + "expr": "sum(mysql_global_status_innodb_mem_adaptive_hash{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"})", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Adaptive Hash Index Size", + "refId": "E", + "step": 20 + } + }, + { + "annotations": { + "polly.grafana.com/docs": "***System Memory***: Total Memory for the system.\\\n***InnoDB Buffer Pool Data***: InnoDB maintains a storage area called the buffer pool for caching data and indexes in memory.\\\n***TokuDB Cache Size***: Similar in function to the InnoDB Buffer Pool, TokuDB will allocate 50% of the installed RAM for its own cache.\\\n***Key Buffer Size***: Index blocks for MYISAM tables are buffered and are shared by all threads. key_buffer_size is the size of the buffer used for index blocks.\\\n***Adaptive Hash Index Size***: When InnoDB notices that some index values are being accessed very frequently, it builds a hash index for them in memory on top of B-Tree indexes.\\\n ***Query Cache Size***: The query cache stores the text of a SELECT statement together with the corresponding result that was sent to the client. The query cache has huge scalability problems in that only one thread can do an operation in the query cache at the same time.\\\n***InnoDB Dictionary Size***: The data dictionary is InnoDB ‘s internal catalog of tables. InnoDB stores the data dictionary on disk, and loads entries into memory while the server is running.\\\n***InnoDB Log Buffer Size***: The MySQL InnoDB log buffer allows transactions to run without having to write the log to disk before the transactions commit." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "mysql-internal-memory-overview-7" + }, + "spec": { + "datasource": { + "uid": "$datasource" + }, + "expr": "sum(mysql_global_variables_tokudb_cache_size{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"})", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "TokuDB Cache Size", + "refId": "I", + "step": 20 + } + }, + { + "annotations": {}, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Panel", + "metadata": { + "name": "command-handlers-processes" + }, + "spec": { + "collapsed": false, + "datasource": { + "uid": "$datasource" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 62 + }, + "id": 390, + "panels": [], + "targets": [ + { + "datasource": { + "uid": "$datasource" }, - "hiddenSeries": false, - "id": 14, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "hideEmpty": false, - "hideZero": false, - "max": true, - "min": true, - "rightSide": true, - "show": true, - "sort": "avg", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [ - { - "title": "Server Status Variables (Com_xxx)", - "url": "https://dev.mysql.com/doc/refman/5.7/en/server-status-variables.html#statvar_Com_xxx" - } - ], - "nullPointMode": "null as zero", - "options": { - "dataLinks": [ ] - }, - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "topk(5, rate(mysql_global_status_commands_total{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])>0)", - "format": "time_series", - "hide": false, - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Com_{{ command }}", - "metric": "", - "refId": "B", - "step": 20 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "Top Command Counters", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "logBase": 1, - "max": null, - "min": 0, - "show": true - } + "refId": "A" + } + ], + "title": "Command, Handlers, Processes", + "type": "row" + } + }, + { + "annotations": {}, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "command-handlers-processes-0" + }, + "spec": { + "datasource": { + "uid": "$datasource" + }, + "refId": "A" + } + }, + { + "annotations": { + "polly.grafana.com/docs": "**Top Command Counters**\n\nThe Com_{{xxx}} statement counter variables indicate the number of times each xxx statement has been executed. There is one status variable for each type of statement. For example, Com_delete and Com_update count [``DELETE``](https://dev.mysql.com/doc/refman/5.7/en/delete.html) and [``UPDATE``](https://dev.mysql.com/doc/refman/5.7/en/update.html) statements, respectively. Com_delete_multi and Com_update_multi are similar but apply to [``DELETE``](https://dev.mysql.com/doc/refman/5.7/en/delete.html) and [``UPDATE``](https://dev.mysql.com/doc/refman/5.7/en/update.html) statements that use multiple-table syntax." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Panel", + "metadata": { + "name": "top-command-counters" + }, + "spec": { + "datasource": { + "uid": "$datasource" + }, + "description": "**Top Command Counters**\n\nThe Com_{{xxx}} statement counter variables indicate the number of times each xxx statement has been executed. There is one status variable for each type of statement. For example, Com_delete and Com_update count [``DELETE``](https://dev.mysql.com/doc/refman/5.7/en/delete.html) and [``UPDATE``](https://dev.mysql.com/doc/refman/5.7/en/update.html) statements, respectively. Com_delete_multi and Com_update_multi are similar but apply to [``DELETE``](https://dev.mysql.com/doc/refman/5.7/en/delete.html) and [``UPDATE``](https://dev.mysql.com/doc/refman/5.7/en/update.html) statements that use multiple-table syntax.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 20, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 63 + }, + "id": 14, + "links": [ + { + "title": "Server Status Variables (Com_xxx)", + "url": "https://dev.mysql.com/doc/refman/5.7/en/server-status-variables.html#statvar_Com_xxx" + } + ], + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "min" ], - "yaxis": { - "align": false, - "alignLevel": null - } - } - }, - { - "annotations": { - "polly.grafana.com/docs": "**Top Command Counters**\n\nThe Com_{{xxx}} statement counter variables indicate the number of times each xxx statement has been executed. There is one status variable for each type of statement. For example, Com_delete and Com_update count [``DELETE``](https://dev.mysql.com/doc/refman/5.7/en/delete.html) and [``UPDATE``](https://dev.mysql.com/doc/refman/5.7/en/update.html) statements, respectively. Com_delete_multi and Com_update_multi are similar but apply to [``DELETE``](https://dev.mysql.com/doc/refman/5.7/en/delete.html) and [``UPDATE``](https://dev.mysql.com/doc/refman/5.7/en/update.html) statements that use multiple-table syntax." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Target", - "metadata": { - "name": "top-command-counters-0" - }, - "spec": { + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.0.2", + "targets": [ + { "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "topk(5, rate(mysql_global_status_commands_total{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])>0)", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "topk(5, rate(mysql_global_status_commands_total{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])\u003e0)", "format": "time_series", "hide": false, "interval": "1m", @@ -8171,144 +9031,163 @@ "metric": "", "refId": "B", "step": 20 - } - }, - { - "annotations": { - "polly.grafana.com/docs": "**MySQL Handlers**\n\nHandler statistics are internal statistics on how MySQL is selecting, updating, inserting, and modifying rows, tables, and indexes.\n\nThis is in fact the layer between the Storage Engine and MySQL.\n\n* `read_rnd_next` is incremented when the server performs a full table scan and this is a counter you don't really want to see with a high value.\n* `read_key` is incremented when a read is done with an index.\n* `read_next` is incremented when the storage engine is asked to 'read the next index entry'. A high value means a lot of index scans are being done." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Panel", - "metadata": { - "name": "mysql-handlers" - }, - "spec": { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "decimals": 2, - "description": "**MySQL Handlers**\n\nHandler statistics are internal statistics on how MySQL is selecting, updating, inserting, and modifying rows, tables, and indexes.\n\nThis is in fact the layer between the Storage Engine and MySQL.\n\n* `read_rnd_next` is incremented when the server performs a full table scan and this is a counter you don't really want to see with a high value.\n* `read_key` is incremented when a read is done with an index.\n* `read_next` is incremented when the storage engine is asked to 'read the next index entry'. A high value means a lot of index scans are being done.", - "editable": true, - "error": false, - "fieldConfig": { - "defaults": { - "custom": { }, - "unit": "short" - }, - "overrides": [ ] - }, - "fill": 2, - "fillGradient": 0, - "grid": { }, - "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 70 - }, - "hiddenSeries": false, - "id": 8, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "hideZero": true, - "max": true, - "min": true, - "rightSide": true, - "show": true, - "sort": "avg", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [ ], - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "rate(mysql_global_status_handlers_total{job=~\"$job\",instance=~\"$instance\", handler!~\"commit|rollback|savepoint.*|prepare\"}[$__rate_interval])", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "{{ handler }}", - "metric": "", - "refId": "J", - "step": 20 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "MySQL Handlers", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "logBase": 1, - "max": null, - "min": 0, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null + } + ], + "title": "Top Command Counters", + "type": "timeseries" + } + }, + { + "annotations": { + "polly.grafana.com/docs": "**Top Command Counters**\n\nThe Com_{{xxx}} statement counter variables indicate the number of times each xxx statement has been executed. There is one status variable for each type of statement. For example, Com_delete and Com_update count [``DELETE``](https://dev.mysql.com/doc/refman/5.7/en/delete.html) and [``UPDATE``](https://dev.mysql.com/doc/refman/5.7/en/update.html) statements, respectively. Com_delete_multi and Com_update_multi are similar but apply to [``DELETE``](https://dev.mysql.com/doc/refman/5.7/en/delete.html) and [``UPDATE``](https://dev.mysql.com/doc/refman/5.7/en/update.html) statements that use multiple-table syntax." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "top-command-counters-0" + }, + "spec": { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "topk(5, rate(mysql_global_status_commands_total{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])\u003e0)", + "format": "time_series", + "hide": false, + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Com_{{ command }}", + "metric": "", + "refId": "B", + "step": 20 + } + }, + { + "annotations": { + "polly.grafana.com/docs": "**MySQL Handlers**\n\nHandler statistics are internal statistics on how MySQL is selecting, updating, inserting, and modifying rows, tables, and indexes.\n\nThis is in fact the layer between the Storage Engine and MySQL.\n\n* `read_rnd_next` is incremented when the server performs a full table scan and this is a counter you don't really want to see with a high value.\n* `read_key` is incremented when a read is done with an index.\n* `read_next` is incremented when the storage engine is asked to 'read the next index entry'. A high value means a lot of index scans are being done." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Panel", + "metadata": { + "name": "mysql-handlers" + }, + "spec": { + "datasource": { + "uid": "$datasource" + }, + "description": "**MySQL Handlers**\n\nHandler statistics are internal statistics on how MySQL is selecting, updating, inserting, and modifying rows, tables, and indexes.\n\nThis is in fact the layer between the Storage Engine and MySQL.\n\n* `read_rnd_next` is incremented when the server performs a full table scan and this is a counter you don't really want to see with a high value.\n* `read_key` is incremented when a read is done with an index.\n* `read_next` is incremented when the storage engine is asked to 'read the next index entry'. A high value means a lot of index scans are being done.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 20, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byValue", + "options": { + "op": "gte", + "reducer": "allIsZero", + "value": 0 + } + }, + "properties": [ + { + "id": "custom.hideFrom", + "value": { + "legend": true, + "tooltip": true, + "viz": false + } + } + ] } - } - }, - { - "annotations": { - "polly.grafana.com/docs": "**MySQL Handlers**\n\nHandler statistics are internal statistics on how MySQL is selecting, updating, inserting, and modifying rows, tables, and indexes.\n\nThis is in fact the layer between the Storage Engine and MySQL.\n\n* `read_rnd_next` is incremented when the server performs a full table scan and this is a counter you don't really want to see with a high value.\n* `read_key` is incremented when a read is done with an index.\n* `read_next` is incremented when the storage engine is asked to 'read the next index entry'. A high value means a lot of index scans are being done." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Target", - "metadata": { - "name": "mysql-handlers-0" - }, - "spec": { + ] + }, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 70 + }, + "id": 8, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "min" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.0.2", + "targets": [ + { "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "rate(mysql_global_status_handlers_total{job=~\"$job\",instance=~\"$instance\", handler!~\"commit|rollback|savepoint.*|prepare\"}[$__rate_interval])", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "rate(mysql_global_status_handlers_total{cluster=~\"$cluster\", job=~\"$job\",instance=~\"$instance\", handler!~\"commit|rollback|savepoint.*|prepare\"}[$__rate_interval])", "format": "time_series", "interval": "1m", "intervalFactor": 1, @@ -8316,287 +9195,322 @@ "metric": "", "refId": "J", "step": 20 - } - }, - { - "annotations": { - "polly.grafana.com/docs": "MySQL Transaction Handlers" - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Panel", - "metadata": { - "name": "mysql-transaction-handlers" - }, - "spec": { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "decimals": 2, - "description": "MySQL Transaction Handlers", - "editable": true, - "error": false, - "fieldConfig": { - "defaults": { - "custom": { }, - "unit": "short" - }, - "overrides": [ ] - }, - "fill": 2, - "fillGradient": 0, - "grid": { }, - "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 77 - }, - "hiddenSeries": false, - "id": 28, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "hideZero": true, - "max": true, - "min": true, - "rightSide": true, - "show": true, - "sort": "avg", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [ ], - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "rate(mysql_global_status_handlers_total{job=~\"$job\",instance=~\"$instance\", handler=~\"commit|rollback|savepoint.*|prepare\"}[$__rate_interval])", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "{{ handler }}", - "metric": "", - "refId": "A", - "step": 20 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "MySQL Transaction Handlers", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "logBase": 1, - "max": null, - "min": 0, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null + } + ], + "title": "MySQL Handlers", + "type": "timeseries" + } + }, + { + "annotations": { + "polly.grafana.com/docs": "**MySQL Handlers**\n\nHandler statistics are internal statistics on how MySQL is selecting, updating, inserting, and modifying rows, tables, and indexes.\n\nThis is in fact the layer between the Storage Engine and MySQL.\n\n* `read_rnd_next` is incremented when the server performs a full table scan and this is a counter you don't really want to see with a high value.\n* `read_key` is incremented when a read is done with an index.\n* `read_next` is incremented when the storage engine is asked to 'read the next index entry'. A high value means a lot of index scans are being done." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "mysql-handlers-0" + }, + "spec": { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "rate(mysql_global_status_handlers_total{cluster=~\"$cluster\", job=~\"$job\",instance=~\"$instance\", handler!~\"commit|rollback|savepoint.*|prepare\"}[$__rate_interval])", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "{{ handler }}", + "metric": "", + "refId": "J", + "step": 20 + } + }, + { + "annotations": { + "polly.grafana.com/docs": "MySQL Transaction Handlers" + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Panel", + "metadata": { + "name": "mysql-transaction-handlers" + }, + "spec": { + "datasource": { + "uid": "$datasource" + }, + "description": "MySQL Transaction Handlers", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 20, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byValue", + "options": { + "op": "gte", + "reducer": "allIsZero", + "value": 0 + } + }, + "properties": [ + { + "id": "custom.hideFrom", + "value": { + "legend": true, + "tooltip": true, + "viz": false + } + } + ] } - } - }, - { - "annotations": { - "polly.grafana.com/docs": "MySQL Transaction Handlers" - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Target", - "metadata": { - "name": "mysql-transaction-handlers-0" - }, - "spec": { + ] + }, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 77 + }, + "id": 28, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "min" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.0.2", + "targets": [ + { "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "rate(mysql_global_status_handlers_total{job=~\"$job\",instance=~\"$instance\", handler=~\"commit|rollback|savepoint.*|prepare\"}[$__rate_interval])", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "rate(mysql_global_status_handlers_total{cluster=~\"$cluster\", job=~\"$job\",instance=~\"$instance\", handler=~\"commit|rollback|savepoint.*|prepare\"}[$__rate_interval])", "interval": "1m", "intervalFactor": 1, "legendFormat": "{{ handler }}", "metric": "", "refId": "A", "step": 20 - } - }, - { - "annotations": { - "polly.grafana.com/docs": "Process States" - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Panel", - "metadata": { - "name": "process-states" - }, - "spec": { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "decimals": 2, - "description": "Process States", - "editable": true, - "error": false, - "fieldConfig": { - "defaults": { - "custom": { }, - "unit": "short" - }, - "overrides": [ ] - }, - "fill": 0, - "fillGradient": 0, - "grid": { }, - "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 84 - }, - "hiddenSeries": false, - "id": 40, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "hideZero": true, - "max": true, - "min": false, - "rightSide": true, - "show": true, - "sort": "avg", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [ ], - "nullPointMode": "null as zero", - "options": { - "dataLinks": [ ] - }, - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "mysql_info_schema_processlist_threads{job=~\"$job\", instance=~\"$instance\"}", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "{{ state }}", - "metric": "", - "refId": "A", - "step": 20 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "Process States", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "logBase": 1, - "max": null, - "min": 0, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null + } + ], + "title": "MySQL Transaction Handlers", + "type": "timeseries" + } + }, + { + "annotations": { + "polly.grafana.com/docs": "MySQL Transaction Handlers" + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "mysql-transaction-handlers-0" + }, + "spec": { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "rate(mysql_global_status_handlers_total{cluster=~\"$cluster\", job=~\"$job\",instance=~\"$instance\", handler=~\"commit|rollback|savepoint.*|prepare\"}[$__rate_interval])", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "{{ handler }}", + "metric": "", + "refId": "A", + "step": 20 + } + }, + { + "annotations": { + "polly.grafana.com/docs": "Process States" + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Panel", + "metadata": { + "name": "process-states" + }, + "spec": { + "datasource": { + "uid": "$datasource" + }, + "description": "Process States", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byValue", + "options": { + "op": "gte", + "reducer": "allIsZero", + "value": 0 + } + }, + "properties": [ + { + "id": "custom.hideFrom", + "value": { + "legend": true, + "tooltip": true, + "viz": false + } + } + ] } - } - }, - { - "annotations": { - "polly.grafana.com/docs": "Process States" - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Target", - "metadata": { - "name": "process-states-0" - }, - "spec": { + ] + }, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 84 + }, + "id": 40, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.0.2", + "targets": [ + { "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "mysql_info_schema_processlist_threads{job=~\"$job\", instance=~\"$instance\"}", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "mysql_info_schema_processlist_threads{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}", "format": "time_series", "interval": "1m", "intervalFactor": 1, @@ -8604,322 +9518,348 @@ "metric": "", "refId": "A", "step": 20 - } - }, - { - "annotations": { - "polly.grafana.com/docs": "Top Process States Hourly" - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Panel", - "metadata": { - "name": "top-process-states-hourly" - }, - "spec": { - "aliasColors": { }, - "bars": true, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "decimals": 2, - "description": "Top Process States Hourly", - "editable": true, - "error": false, - "fieldConfig": { - "defaults": { - "custom": { }, - "unit": "short" - }, - "overrides": [ ] - }, - "fill": 6, - "fillGradient": 0, - "grid": { }, - "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 91 - }, - "hiddenSeries": false, - "id": 49, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "hideZero": true, - "max": true, - "min": false, - "rightSide": true, - "show": true, - "sort": "avg", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": false, - "linewidth": 2, - "links": [ ], - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "topk(5, avg_over_time(mysql_info_schema_processlist_threads{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "{{ state }}", - "metric": "", - "refId": "A", - "step": 3600 - } - ], - "thresholds": [ ], - "timeFrom": "24h", - "timeRegions": [ ], - "timeShift": null, - "title": "Top Process States Hourly", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "logBase": 1, - "max": null, - "min": 0, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null + } + ], + "title": "Process States", + "type": "timeseries" + } + }, + { + "annotations": { + "polly.grafana.com/docs": "Process States" + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "process-states-0" + }, + "spec": { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "mysql_info_schema_processlist_threads{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "{{ state }}", + "metric": "", + "refId": "A", + "step": 20 + } + }, + { + "annotations": { + "polly.grafana.com/docs": "Top Process States Hourly" + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Panel", + "metadata": { + "name": "top-process-states-hourly" + }, + "spec": { + "datasource": { + "uid": "$datasource" + }, + "description": "Top Process States Hourly", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "bars", + "fillOpacity": 100, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byValue", + "options": { + "op": "gte", + "reducer": "allIsZero", + "value": 0 + } + }, + "properties": [ + { + "id": "custom.hideFrom", + "value": { + "legend": true, + "tooltip": true, + "viz": false + } + } + ] } - } - }, - { - "annotations": { - "polly.grafana.com/docs": "Top Process States Hourly" - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Target", - "metadata": { - "name": "top-process-states-hourly-0" - }, - "spec": { + ] + }, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 91 + }, + "id": 49, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.0.2", + "targets": [ + { "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "topk(5, avg_over_time(mysql_info_schema_processlist_threads{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "topk(5, avg_over_time(mysql_info_schema_processlist_threads{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", "interval": "1m", "intervalFactor": 1, "legendFormat": "{{ state }}", "metric": "", "refId": "A", "step": 3600 - } - }, - { - "annotations": { }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Panel", - "metadata": { - "name": "query-cache" - }, - "spec": { - "collapsed": false, - "datasource": "$datasource", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 98 - }, - "id": 391, - "panels": [ ], - "repeat": null, - "title": "Query Cache", - "type": "row" - } - }, - { - "annotations": { - "polly.grafana.com/docs": "**MySQL Query Cache Memory**\n\nThe query cache has huge scalability problems in that only one thread can do an operation in the query cache at the same time. This serialization is true not only for SELECTs, but also for INSERT/UPDATE/DELETE.\n\nThis also means that the larger the `query_cache_size` is set to, the slower those operations become. In concurrent environments, the MySQL Query Cache quickly becomes a contention point, decreasing performance. MariaDB and AWS Aurora have done work to try and eliminate the query cache contention in their flavors of MySQL, while MySQL 8.0 has eliminated the query cache feature.\n\nThe recommended settings for most environments is to set:\n ``query_cache_type=0``\n ``query_cache_size=0``\n\nNote that while you can dynamically change these values, to completely remove the contention point you have to restart the database." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Panel", - "metadata": { - "name": "mysql-query-cache-memory" - }, - "spec": { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "decimals": 2, - "description": "**MySQL Query Cache Memory**\n\nThe query cache has huge scalability problems in that only one thread can do an operation in the query cache at the same time. This serialization is true not only for SELECTs, but also for INSERT/UPDATE/DELETE.\n\nThis also means that the larger the `query_cache_size` is set to, the slower those operations become. In concurrent environments, the MySQL Query Cache quickly becomes a contention point, decreasing performance. MariaDB and AWS Aurora have done work to try and eliminate the query cache contention in their flavors of MySQL, while MySQL 8.0 has eliminated the query cache feature.\n\nThe recommended settings for most environments is to set:\n ``query_cache_type=0``\n ``query_cache_size=0``\n\nNote that while you can dynamically change these values, to completely remove the contention point you have to restart the database.", - "editable": true, - "error": false, - "fieldConfig": { - "defaults": { - "custom": { }, - "unit": "short" - }, - "overrides": [ ] - }, - "fill": 2, - "fillGradient": 0, - "grid": { }, - "gridPos": { - "h": 7, - "w": 12, - "x": 0, - "y": 99 + } + ], + "timeFrom": "24h", + "title": "Top Process States Hourly", + "type": "timeseries" + } + }, + { + "annotations": { + "polly.grafana.com/docs": "Top Process States Hourly" + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "top-process-states-hourly-0" + }, + "spec": { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "topk(5, avg_over_time(mysql_info_schema_processlist_threads{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "{{ state }}", + "metric": "", + "refId": "A", + "step": 3600 + } + }, + { + "annotations": {}, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Panel", + "metadata": { + "name": "query-cache" + }, + "spec": { + "collapsed": false, + "datasource": { + "uid": "$datasource" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 98 + }, + "id": 391, + "panels": [], + "targets": [ + { + "datasource": { + "uid": "$datasource" }, - "hiddenSeries": false, - "id": 46, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "sort": "avg", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [ ], - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "mysql_global_status_qcache_free_memory{job=~\"$job\", instance=~\"$instance\"}", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Free Memory", - "metric": "", - "refId": "F", - "step": 20 - }, - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "mysql_global_variables_query_cache_size{job=~\"$job\", instance=~\"$instance\"}", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Query Cache Size", - "metric": "", - "refId": "E", - "step": 20 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "MySQL Query Cache Memory", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "bytes", - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "logBase": 1, - "max": null, - "min": 0, - "show": true - } + "refId": "A" + } + ], + "title": "Query Cache", + "type": "row" + } + }, + { + "annotations": {}, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "query-cache-0" + }, + "spec": { + "datasource": { + "uid": "$datasource" + }, + "refId": "A" + } + }, + { + "annotations": { + "polly.grafana.com/docs": "**MySQL Query Cache Memory**\n\nThe query cache has huge scalability problems in that only one thread can do an operation in the query cache at the same time. This serialization is true not only for SELECTs, but also for INSERT/UPDATE/DELETE.\n\nThis also means that the larger the `query_cache_size` is set to, the slower those operations become. In concurrent environments, the MySQL Query Cache quickly becomes a contention point, decreasing performance. MariaDB and AWS Aurora have done work to try and eliminate the query cache contention in their flavors of MySQL, while MySQL 8.0 has eliminated the query cache feature.\n\nThe recommended settings for most environments is to set:\n ``query_cache_type=0``\n ``query_cache_size=0``\n\nNote that while you can dynamically change these values, to completely remove the contention point you have to restart the database." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Panel", + "metadata": { + "name": "mysql-query-cache-memory" + }, + "spec": { + "datasource": { + "uid": "$datasource" + }, + "description": "**MySQL Query Cache Memory**\n\nThe query cache has huge scalability problems in that only one thread can do an operation in the query cache at the same time. This serialization is true not only for SELECTs, but also for INSERT/UPDATE/DELETE.\n\nThis also means that the larger the `query_cache_size` is set to, the slower those operations become. In concurrent environments, the MySQL Query Cache quickly becomes a contention point, decreasing performance. MariaDB and AWS Aurora have done work to try and eliminate the query cache contention in their flavors of MySQL, while MySQL 8.0 has eliminated the query cache feature.\n\nThe recommended settings for most environments is to set:\n ``query_cache_type=0``\n ``query_cache_size=0``\n\nNote that while you can dynamically change these values, to completely remove the contention point you have to restart the database.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 20, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 99 + }, + "id": 46, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "min" ], - "yaxis": { - "align": false, - "alignLevel": null - } - } - }, - { - "annotations": { - "polly.grafana.com/docs": "**MySQL Query Cache Memory**\n\nThe query cache has huge scalability problems in that only one thread can do an operation in the query cache at the same time. This serialization is true not only for SELECTs, but also for INSERT/UPDATE/DELETE.\n\nThis also means that the larger the `query_cache_size` is set to, the slower those operations become. In concurrent environments, the MySQL Query Cache quickly becomes a contention point, decreasing performance. MariaDB and AWS Aurora have done work to try and eliminate the query cache contention in their flavors of MySQL, while MySQL 8.0 has eliminated the query cache feature.\n\nThe recommended settings for most environments is to set:\n ``query_cache_type=0``\n ``query_cache_size=0``\n\nNote that while you can dynamically change these values, to completely remove the contention point you have to restart the database." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Target", - "metadata": { - "name": "mysql-query-cache-memory-0" - }, - "spec": { + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.0.2", + "targets": [ + { "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "mysql_global_status_qcache_free_memory{job=~\"$job\", instance=~\"$instance\"}", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "mysql_global_status_qcache_free_memory{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}", "format": "time_series", "interval": "1m", "intervalFactor": 1, @@ -8927,22 +9867,15 @@ "metric": "", "refId": "F", "step": 20 - } - }, - { - "annotations": { - "polly.grafana.com/docs": "**MySQL Query Cache Memory**\n\nThe query cache has huge scalability problems in that only one thread can do an operation in the query cache at the same time. This serialization is true not only for SELECTs, but also for INSERT/UPDATE/DELETE.\n\nThis also means that the larger the `query_cache_size` is set to, the slower those operations become. In concurrent environments, the MySQL Query Cache quickly becomes a contention point, decreasing performance. MariaDB and AWS Aurora have done work to try and eliminate the query cache contention in their flavors of MySQL, while MySQL 8.0 has eliminated the query cache feature.\n\nThe recommended settings for most environments is to set:\n ``query_cache_type=0``\n ``query_cache_size=0``\n\nNote that while you can dynamically change these values, to completely remove the contention point you have to restart the database." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Target", - "metadata": { - "name": "mysql-query-cache-memory-1" - }, - "spec": { + }, + { "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "mysql_global_variables_query_cache_size{job=~\"$job\", instance=~\"$instance\"}", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "mysql_global_variables_query_cache_size{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}", "format": "time_series", "interval": "1m", "intervalFactor": 1, @@ -8950,196 +9883,167 @@ "metric": "", "refId": "E", "step": 20 - } - }, - { - "annotations": { - "polly.grafana.com/docs": "**MySQL Query Cache Activity**\n\nThe query cache has huge scalability problems in that only one thread can do an operation in the query cache at the same time. This serialization is true not only for SELECTs, but also for INSERT/UPDATE/DELETE.\n\nThis also means that the larger the `query_cache_size` is set to, the slower those operations become. In concurrent environments, the MySQL Query Cache quickly becomes a contention point, decreasing performance. MariaDB and AWS Aurora have done work to try and eliminate the query cache contention in their flavors of MySQL, while MySQL 8.0 has eliminated the query cache feature.\n\nThe recommended settings for most environments is to set:\n``query_cache_type=0``\n``query_cache_size=0``\n\nNote that while you can dynamically change these values, to completely remove the contention point you have to restart the database." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Panel", - "metadata": { - "name": "mysql-query-cache-activity" - }, - "spec": { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "decimals": 2, - "description": "**MySQL Query Cache Activity**\n\nThe query cache has huge scalability problems in that only one thread can do an operation in the query cache at the same time. This serialization is true not only for SELECTs, but also for INSERT/UPDATE/DELETE.\n\nThis also means that the larger the `query_cache_size` is set to, the slower those operations become. In concurrent environments, the MySQL Query Cache quickly becomes a contention point, decreasing performance. MariaDB and AWS Aurora have done work to try and eliminate the query cache contention in their flavors of MySQL, while MySQL 8.0 has eliminated the query cache feature.\n\nThe recommended settings for most environments is to set:\n``query_cache_type=0``\n``query_cache_size=0``\n\nNote that while you can dynamically change these values, to completely remove the contention point you have to restart the database.", - "editable": true, - "error": false, - "fieldConfig": { - "defaults": { - "custom": { }, - "unit": "short" - }, - "overrides": [ ] - }, - "fill": 2, - "fillGradient": 0, - "grid": { }, - "gridPos": { - "h": 7, - "w": 12, - "x": 12, - "y": 99 - }, - "height": "", - "hiddenSeries": false, - "id": 45, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "sort": "avg", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [ ], - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "rate(mysql_global_status_qcache_hits{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Hits", - "metric": "", - "refId": "B", - "step": 20 - }, - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "rate(mysql_global_status_qcache_inserts{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Inserts", - "metric": "", - "refId": "C", - "step": 20 - }, - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "rate(mysql_global_status_qcache_not_cached{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Not Cached", - "metric": "", - "refId": "D", - "step": 20 - }, - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "rate(mysql_global_status_qcache_lowmem_prunes{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Prunes", - "metric": "", - "refId": "F", - "step": 20 - }, - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "mysql_global_status_qcache_queries_in_cache{job=~\"$job\", instance=~\"$instance\"}", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Queries in Cache", - "metric": "", - "refId": "E", - "step": 20 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "MySQL Query Cache Activity", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "logBase": 1, - "max": null, - "min": 0, - "show": true - } + } + ], + "title": "MySQL Query Cache Memory", + "type": "timeseries" + } + }, + { + "annotations": { + "polly.grafana.com/docs": "**MySQL Query Cache Memory**\n\nThe query cache has huge scalability problems in that only one thread can do an operation in the query cache at the same time. This serialization is true not only for SELECTs, but also for INSERT/UPDATE/DELETE.\n\nThis also means that the larger the `query_cache_size` is set to, the slower those operations become. In concurrent environments, the MySQL Query Cache quickly becomes a contention point, decreasing performance. MariaDB and AWS Aurora have done work to try and eliminate the query cache contention in their flavors of MySQL, while MySQL 8.0 has eliminated the query cache feature.\n\nThe recommended settings for most environments is to set:\n ``query_cache_type=0``\n ``query_cache_size=0``\n\nNote that while you can dynamically change these values, to completely remove the contention point you have to restart the database." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "mysql-query-cache-memory-0" + }, + "spec": { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "mysql_global_status_qcache_free_memory{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Free Memory", + "metric": "", + "refId": "F", + "step": 20 + } + }, + { + "annotations": { + "polly.grafana.com/docs": "**MySQL Query Cache Memory**\n\nThe query cache has huge scalability problems in that only one thread can do an operation in the query cache at the same time. This serialization is true not only for SELECTs, but also for INSERT/UPDATE/DELETE.\n\nThis also means that the larger the `query_cache_size` is set to, the slower those operations become. In concurrent environments, the MySQL Query Cache quickly becomes a contention point, decreasing performance. MariaDB and AWS Aurora have done work to try and eliminate the query cache contention in their flavors of MySQL, while MySQL 8.0 has eliminated the query cache feature.\n\nThe recommended settings for most environments is to set:\n ``query_cache_type=0``\n ``query_cache_size=0``\n\nNote that while you can dynamically change these values, to completely remove the contention point you have to restart the database." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "mysql-query-cache-memory-1" + }, + "spec": { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "mysql_global_variables_query_cache_size{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Query Cache Size", + "metric": "", + "refId": "E", + "step": 20 + } + }, + { + "annotations": { + "polly.grafana.com/docs": "**MySQL Query Cache Activity**\n\nThe query cache has huge scalability problems in that only one thread can do an operation in the query cache at the same time. This serialization is true not only for SELECTs, but also for INSERT/UPDATE/DELETE.\n\nThis also means that the larger the `query_cache_size` is set to, the slower those operations become. In concurrent environments, the MySQL Query Cache quickly becomes a contention point, decreasing performance. MariaDB and AWS Aurora have done work to try and eliminate the query cache contention in their flavors of MySQL, while MySQL 8.0 has eliminated the query cache feature.\n\nThe recommended settings for most environments is to set:\n``query_cache_type=0``\n``query_cache_size=0``\n\nNote that while you can dynamically change these values, to completely remove the contention point you have to restart the database." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Panel", + "metadata": { + "name": "mysql-query-cache-activity" + }, + "spec": { + "datasource": { + "uid": "$datasource" + }, + "description": "**MySQL Query Cache Activity**\n\nThe query cache has huge scalability problems in that only one thread can do an operation in the query cache at the same time. This serialization is true not only for SELECTs, but also for INSERT/UPDATE/DELETE.\n\nThis also means that the larger the `query_cache_size` is set to, the slower those operations become. In concurrent environments, the MySQL Query Cache quickly becomes a contention point, decreasing performance. MariaDB and AWS Aurora have done work to try and eliminate the query cache contention in their flavors of MySQL, while MySQL 8.0 has eliminated the query cache feature.\n\nThe recommended settings for most environments is to set:\n``query_cache_type=0``\n``query_cache_size=0``\n\nNote that while you can dynamically change these values, to completely remove the contention point you have to restart the database.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 20, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 99 + }, + "id": 45, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "min" ], - "yaxis": { - "align": false, - "alignLevel": null - } - } - }, - { - "annotations": { - "polly.grafana.com/docs": "**MySQL Query Cache Activity**\n\nThe query cache has huge scalability problems in that only one thread can do an operation in the query cache at the same time. This serialization is true not only for SELECTs, but also for INSERT/UPDATE/DELETE.\n\nThis also means that the larger the `query_cache_size` is set to, the slower those operations become. In concurrent environments, the MySQL Query Cache quickly becomes a contention point, decreasing performance. MariaDB and AWS Aurora have done work to try and eliminate the query cache contention in their flavors of MySQL, while MySQL 8.0 has eliminated the query cache feature.\n\nThe recommended settings for most environments is to set:\n``query_cache_type=0``\n``query_cache_size=0``\n\nNote that while you can dynamically change these values, to completely remove the contention point you have to restart the database." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Target", - "metadata": { - "name": "mysql-query-cache-activity-0" - }, - "spec": { + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.0.2", + "targets": [ + { "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "rate(mysql_global_status_qcache_hits{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "rate(mysql_global_status_qcache_hits{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", "format": "time_series", "interval": "1m", "intervalFactor": 1, @@ -9147,22 +10051,15 @@ "metric": "", "refId": "B", "step": 20 - } - }, - { - "annotations": { - "polly.grafana.com/docs": "**MySQL Query Cache Activity**\n\nThe query cache has huge scalability problems in that only one thread can do an operation in the query cache at the same time. This serialization is true not only for SELECTs, but also for INSERT/UPDATE/DELETE.\n\nThis also means that the larger the `query_cache_size` is set to, the slower those operations become. In concurrent environments, the MySQL Query Cache quickly becomes a contention point, decreasing performance. MariaDB and AWS Aurora have done work to try and eliminate the query cache contention in their flavors of MySQL, while MySQL 8.0 has eliminated the query cache feature.\n\nThe recommended settings for most environments is to set:\n``query_cache_type=0``\n``query_cache_size=0``\n\nNote that while you can dynamically change these values, to completely remove the contention point you have to restart the database." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Target", - "metadata": { - "name": "mysql-query-cache-activity-1" - }, - "spec": { + }, + { "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "rate(mysql_global_status_qcache_inserts{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "rate(mysql_global_status_qcache_inserts{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", "format": "time_series", "interval": "1m", "intervalFactor": 1, @@ -9170,22 +10067,15 @@ "metric": "", "refId": "C", "step": 20 - } - }, - { - "annotations": { - "polly.grafana.com/docs": "**MySQL Query Cache Activity**\n\nThe query cache has huge scalability problems in that only one thread can do an operation in the query cache at the same time. This serialization is true not only for SELECTs, but also for INSERT/UPDATE/DELETE.\n\nThis also means that the larger the `query_cache_size` is set to, the slower those operations become. In concurrent environments, the MySQL Query Cache quickly becomes a contention point, decreasing performance. MariaDB and AWS Aurora have done work to try and eliminate the query cache contention in their flavors of MySQL, while MySQL 8.0 has eliminated the query cache feature.\n\nThe recommended settings for most environments is to set:\n``query_cache_type=0``\n``query_cache_size=0``\n\nNote that while you can dynamically change these values, to completely remove the contention point you have to restart the database." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Target", - "metadata": { - "name": "mysql-query-cache-activity-2" - }, - "spec": { + }, + { "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "rate(mysql_global_status_qcache_not_cached{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "rate(mysql_global_status_qcache_not_cached{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", "format": "time_series", "interval": "1m", "intervalFactor": 1, @@ -9193,22 +10083,15 @@ "metric": "", "refId": "D", "step": 20 - } - }, - { - "annotations": { - "polly.grafana.com/docs": "**MySQL Query Cache Activity**\n\nThe query cache has huge scalability problems in that only one thread can do an operation in the query cache at the same time. This serialization is true not only for SELECTs, but also for INSERT/UPDATE/DELETE.\n\nThis also means that the larger the `query_cache_size` is set to, the slower those operations become. In concurrent environments, the MySQL Query Cache quickly becomes a contention point, decreasing performance. MariaDB and AWS Aurora have done work to try and eliminate the query cache contention in their flavors of MySQL, while MySQL 8.0 has eliminated the query cache feature.\n\nThe recommended settings for most environments is to set:\n``query_cache_type=0``\n``query_cache_size=0``\n\nNote that while you can dynamically change these values, to completely remove the contention point you have to restart the database." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Target", - "metadata": { - "name": "mysql-query-cache-activity-3" - }, - "spec": { + }, + { "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "rate(mysql_global_status_qcache_lowmem_prunes{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "rate(mysql_global_status_qcache_lowmem_prunes{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", "format": "time_series", "interval": "1m", "intervalFactor": 1, @@ -9216,22 +10099,15 @@ "metric": "", "refId": "F", "step": 20 - } - }, - { - "annotations": { - "polly.grafana.com/docs": "**MySQL Query Cache Activity**\n\nThe query cache has huge scalability problems in that only one thread can do an operation in the query cache at the same time. This serialization is true not only for SELECTs, but also for INSERT/UPDATE/DELETE.\n\nThis also means that the larger the `query_cache_size` is set to, the slower those operations become. In concurrent environments, the MySQL Query Cache quickly becomes a contention point, decreasing performance. MariaDB and AWS Aurora have done work to try and eliminate the query cache contention in their flavors of MySQL, while MySQL 8.0 has eliminated the query cache feature.\n\nThe recommended settings for most environments is to set:\n``query_cache_type=0``\n``query_cache_size=0``\n\nNote that while you can dynamically change these values, to completely remove the contention point you have to restart the database." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Target", - "metadata": { - "name": "mysql-query-cache-activity-4" - }, - "spec": { + }, + { "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "mysql_global_status_qcache_queries_in_cache{job=~\"$job\", instance=~\"$instance\"}", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "mysql_global_status_qcache_queries_in_cache{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}", "format": "time_series", "interval": "1m", "intervalFactor": 1, @@ -9239,579 +10115,707 @@ "metric": "", "refId": "E", "step": 20 - } - }, - { - "annotations": { }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Panel", - "metadata": { - "name": "files-and-tables" - }, - "spec": { - "collapsed": false, - "datasource": "$datasource", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 106 - }, - "id": 392, - "panels": [ ], - "repeat": null, - "title": "Files and Tables", - "type": "row" - } - }, - { - "annotations": { - "polly.grafana.com/docs": "MySQL File Openings" - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Panel", - "metadata": { - "name": "mysql-file-openings" - }, - "spec": { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "decimals": 2, - "description": "MySQL File Openings", - "editable": true, - "error": false, - "fieldConfig": { - "defaults": { - "custom": { }, - "unit": "short" - }, - "overrides": [ ] - }, - "fill": 2, - "fillGradient": 0, - "grid": { }, - "gridPos": { - "h": 7, - "w": 12, - "x": 0, - "y": 107 + } + ], + "title": "MySQL Query Cache Activity", + "type": "timeseries" + } + }, + { + "annotations": { + "polly.grafana.com/docs": "**MySQL Query Cache Activity**\n\nThe query cache has huge scalability problems in that only one thread can do an operation in the query cache at the same time. This serialization is true not only for SELECTs, but also for INSERT/UPDATE/DELETE.\n\nThis also means that the larger the `query_cache_size` is set to, the slower those operations become. In concurrent environments, the MySQL Query Cache quickly becomes a contention point, decreasing performance. MariaDB and AWS Aurora have done work to try and eliminate the query cache contention in their flavors of MySQL, while MySQL 8.0 has eliminated the query cache feature.\n\nThe recommended settings for most environments is to set:\n``query_cache_type=0``\n``query_cache_size=0``\n\nNote that while you can dynamically change these values, to completely remove the contention point you have to restart the database." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "mysql-query-cache-activity-0" + }, + "spec": { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "rate(mysql_global_status_qcache_hits{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Hits", + "metric": "", + "refId": "B", + "step": 20 + } + }, + { + "annotations": { + "polly.grafana.com/docs": "**MySQL Query Cache Activity**\n\nThe query cache has huge scalability problems in that only one thread can do an operation in the query cache at the same time. This serialization is true not only for SELECTs, but also for INSERT/UPDATE/DELETE.\n\nThis also means that the larger the `query_cache_size` is set to, the slower those operations become. In concurrent environments, the MySQL Query Cache quickly becomes a contention point, decreasing performance. MariaDB and AWS Aurora have done work to try and eliminate the query cache contention in their flavors of MySQL, while MySQL 8.0 has eliminated the query cache feature.\n\nThe recommended settings for most environments is to set:\n``query_cache_type=0``\n``query_cache_size=0``\n\nNote that while you can dynamically change these values, to completely remove the contention point you have to restart the database." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "mysql-query-cache-activity-1" + }, + "spec": { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "rate(mysql_global_status_qcache_inserts{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Inserts", + "metric": "", + "refId": "C", + "step": 20 + } + }, + { + "annotations": { + "polly.grafana.com/docs": "**MySQL Query Cache Activity**\n\nThe query cache has huge scalability problems in that only one thread can do an operation in the query cache at the same time. This serialization is true not only for SELECTs, but also for INSERT/UPDATE/DELETE.\n\nThis also means that the larger the `query_cache_size` is set to, the slower those operations become. In concurrent environments, the MySQL Query Cache quickly becomes a contention point, decreasing performance. MariaDB and AWS Aurora have done work to try and eliminate the query cache contention in their flavors of MySQL, while MySQL 8.0 has eliminated the query cache feature.\n\nThe recommended settings for most environments is to set:\n``query_cache_type=0``\n``query_cache_size=0``\n\nNote that while you can dynamically change these values, to completely remove the contention point you have to restart the database." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "mysql-query-cache-activity-2" + }, + "spec": { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "rate(mysql_global_status_qcache_not_cached{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Not Cached", + "metric": "", + "refId": "D", + "step": 20 + } + }, + { + "annotations": { + "polly.grafana.com/docs": "**MySQL Query Cache Activity**\n\nThe query cache has huge scalability problems in that only one thread can do an operation in the query cache at the same time. This serialization is true not only for SELECTs, but also for INSERT/UPDATE/DELETE.\n\nThis also means that the larger the `query_cache_size` is set to, the slower those operations become. In concurrent environments, the MySQL Query Cache quickly becomes a contention point, decreasing performance. MariaDB and AWS Aurora have done work to try and eliminate the query cache contention in their flavors of MySQL, while MySQL 8.0 has eliminated the query cache feature.\n\nThe recommended settings for most environments is to set:\n``query_cache_type=0``\n``query_cache_size=0``\n\nNote that while you can dynamically change these values, to completely remove the contention point you have to restart the database." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "mysql-query-cache-activity-3" + }, + "spec": { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "rate(mysql_global_status_qcache_lowmem_prunes{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Prunes", + "metric": "", + "refId": "F", + "step": 20 + } + }, + { + "annotations": { + "polly.grafana.com/docs": "**MySQL Query Cache Activity**\n\nThe query cache has huge scalability problems in that only one thread can do an operation in the query cache at the same time. This serialization is true not only for SELECTs, but also for INSERT/UPDATE/DELETE.\n\nThis also means that the larger the `query_cache_size` is set to, the slower those operations become. In concurrent environments, the MySQL Query Cache quickly becomes a contention point, decreasing performance. MariaDB and AWS Aurora have done work to try and eliminate the query cache contention in their flavors of MySQL, while MySQL 8.0 has eliminated the query cache feature.\n\nThe recommended settings for most environments is to set:\n``query_cache_type=0``\n``query_cache_size=0``\n\nNote that while you can dynamically change these values, to completely remove the contention point you have to restart the database." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "mysql-query-cache-activity-4" + }, + "spec": { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "mysql_global_status_qcache_queries_in_cache{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Queries in Cache", + "metric": "", + "refId": "E", + "step": 20 + } + }, + { + "annotations": {}, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Panel", + "metadata": { + "name": "files-and-tables" + }, + "spec": { + "collapsed": false, + "datasource": { + "uid": "$datasource" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 106 + }, + "id": 392, + "panels": [], + "targets": [ + { + "datasource": { + "uid": "$datasource" }, - "hiddenSeries": false, - "id": 43, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "sort": "avg", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [ ], - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "rate(mysql_global_status_opened_files{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Openings", - "metric": "", - "refId": "A", - "step": 20 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "MySQL File Openings", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "logBase": 1, - "max": null, - "min": 0, - "show": true - } + "refId": "A" + } + ], + "title": "Files and Tables", + "type": "row" + } + }, + { + "annotations": {}, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "files-and-tables-0" + }, + "spec": { + "datasource": { + "uid": "$datasource" + }, + "refId": "A" + } + }, + { + "annotations": { + "polly.grafana.com/docs": "MySQL File Openings" + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Panel", + "metadata": { + "name": "mysql-file-openings" + }, + "spec": { + "datasource": { + "uid": "$datasource" + }, + "description": "MySQL File Openings", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 20, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 107 + }, + "id": 43, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "min" ], - "yaxis": { - "align": false, - "alignLevel": null - } - } - }, - { - "annotations": { - "polly.grafana.com/docs": "MySQL File Openings" - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Target", - "metadata": { - "name": "mysql-file-openings-0" - }, - "spec": { + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.0.2", + "targets": [ + { "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "rate(mysql_global_status_opened_files{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "rate(mysql_global_status_opened_files{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", "interval": "1m", "intervalFactor": 1, "legendFormat": "Openings", "metric": "", "refId": "A", "step": 20 - } - }, - { - "annotations": { - "polly.grafana.com/docs": "MySQL Open Files" - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Panel", - "metadata": { - "name": "mysql-open-files" - }, - "spec": { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "decimals": 2, - "description": "MySQL Open Files", - "editable": true, - "error": false, - "fieldConfig": { - "defaults": { - "custom": { }, - "unit": "short" - }, - "overrides": [ ] - }, - "fill": 2, - "fillGradient": 0, - "grid": { }, - "gridPos": { - "h": 7, - "w": 12, - "x": 12, - "y": 107 - }, - "hiddenSeries": false, - "id": 41, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "sort": "avg", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [ ], - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "mysql_global_status_open_files{job=~\"$job\", instance=~\"$instance\"}", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Open Files", - "metric": "", - "refId": "A", - "step": 20 - }, - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "mysql_global_variables_open_files_limit{job=~\"$job\", instance=~\"$instance\"}", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Open Files Limit", - "metric": "", - "refId": "D", - "step": 20 - }, - { - "expr": "mysql_global_status_innodb_num_open_files{job=~\"$job\", instance=~\"$instance\"}", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "InnoDB Open Files", - "refId": "B", - "step": 20 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "MySQL Open Files", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "logBase": 1, - "max": null, - "min": 0, - "show": true - } + } + ], + "title": "MySQL File Openings", + "type": "timeseries" + } + }, + { + "annotations": { + "polly.grafana.com/docs": "MySQL File Openings" + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "mysql-file-openings-0" + }, + "spec": { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "rate(mysql_global_status_opened_files{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Openings", + "metric": "", + "refId": "A", + "step": 20 + } + }, + { + "annotations": { + "polly.grafana.com/docs": "MySQL Open Files" + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Panel", + "metadata": { + "name": "mysql-open-files" + }, + "spec": { + "datasource": { + "uid": "$datasource" + }, + "description": "MySQL Open Files", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 20, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 107 + }, + "id": 41, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "min" ], - "yaxis": { - "align": false, - "alignLevel": null - } - } - }, - { - "annotations": { - "polly.grafana.com/docs": "MySQL Open Files" - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Target", - "metadata": { - "name": "mysql-open-files-0" - }, - "spec": { + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.0.2", + "targets": [ + { "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "mysql_global_status_open_files{job=~\"$job\", instance=~\"$instance\"}", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "mysql_global_status_open_files{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}", "interval": "1m", "intervalFactor": 1, "legendFormat": "Open Files", "metric": "", "refId": "A", "step": 20 - } - }, - { - "annotations": { - "polly.grafana.com/docs": "MySQL Open Files" - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Target", - "metadata": { - "name": "mysql-open-files-1" - }, - "spec": { + }, + { "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "mysql_global_variables_open_files_limit{job=~\"$job\", instance=~\"$instance\"}", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "mysql_global_variables_open_files_limit{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}", "interval": "1m", "intervalFactor": 1, "legendFormat": "Open Files Limit", "metric": "", "refId": "D", "step": 20 - } - }, - { - "annotations": { - "polly.grafana.com/docs": "MySQL Open Files" - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Target", - "metadata": { - "name": "mysql-open-files-2" - }, - "spec": { - "expr": "mysql_global_status_innodb_num_open_files{job=~\"$job\", instance=~\"$instance\"}", + }, + { + "datasource": { + "uid": "$datasource" + }, + "expr": "mysql_global_status_innodb_num_open_files{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}", "interval": "1m", "intervalFactor": 1, "legendFormat": "InnoDB Open Files", "refId": "B", "step": 20 - } - }, - { - "annotations": { }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Panel", - "metadata": { - "name": "table-openings" - }, - "spec": { - "collapsed": false, - "datasource": "$datasource", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 114 - }, - "id": 393, - "panels": [ ], - "repeat": null, - "title": "Table Openings", - "type": "row" - } - }, - { - "annotations": { - "polly.grafana.com/docs": "**MySQL Table Open Cache Status**\n\nThe recommendation is to set the `table_open_cache_instances` to a loose correlation to virtual CPUs, keeping in mind that more instances means the cache is split more times. If you have a cache set to 500 but it has 10 instances, each cache will only have 50 cached.\n\nThe `table_definition_cache` and `table_open_cache` can be left as default as they are auto-sized MySQL 5.6 and above (ie: do not set them to any value)." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Panel", - "metadata": { - "name": "mysql-table-open-cache-status" - }, - "spec": { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "decimals": 2, - "description": "**MySQL Table Open Cache Status**\n\nThe recommendation is to set the `table_open_cache_instances` to a loose correlation to virtual CPUs, keeping in mind that more instances means the cache is split more times. If you have a cache set to 500 but it has 10 instances, each cache will only have 50 cached.\n\nThe `table_definition_cache` and `table_open_cache` can be left as default as they are auto-sized MySQL 5.6 and above (ie: do not set them to any value).", - "editable": true, - "error": false, - "fieldConfig": { - "defaults": { - "custom": { }, - "unit": "short" - }, - "overrides": [ ] - }, - "fill": 2, - "fillGradient": 0, - "grid": { }, - "gridPos": { - "h": 7, - "w": 12, - "x": 0, - "y": 115 + } + ], + "title": "MySQL Open Files", + "type": "timeseries" + } + }, + { + "annotations": { + "polly.grafana.com/docs": "MySQL Open Files" + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "mysql-open-files-0" + }, + "spec": { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "mysql_global_status_open_files{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Open Files", + "metric": "", + "refId": "A", + "step": 20 + } + }, + { + "annotations": { + "polly.grafana.com/docs": "MySQL Open Files" + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "mysql-open-files-1" + }, + "spec": { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "mysql_global_variables_open_files_limit{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Open Files Limit", + "metric": "", + "refId": "D", + "step": 20 + } + }, + { + "annotations": { + "polly.grafana.com/docs": "MySQL Open Files" + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "mysql-open-files-2" + }, + "spec": { + "datasource": { + "uid": "$datasource" + }, + "expr": "mysql_global_status_innodb_num_open_files{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "InnoDB Open Files", + "refId": "B", + "step": 20 + } + }, + { + "annotations": {}, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Panel", + "metadata": { + "name": "table-openings" + }, + "spec": { + "collapsed": false, + "datasource": { + "uid": "$datasource" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 114 + }, + "id": 393, + "panels": [], + "targets": [ + { + "datasource": { + "uid": "$datasource" }, - "hiddenSeries": false, - "id": 44, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "sort": "avg", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [ - { - "title": "Server Status Variables (table_open_cache)", - "url": "http://dev.mysql.com/doc/refman/5.6/en/server-system-variables.html#sysvar_table_open_cache" - } - ], - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "Table Open Cache Hit Ratio", - "yaxis": 2 - } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "rate(mysql_global_status_opened_tables{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Openings", - "metric": "", - "refId": "A", - "step": 20 - }, - { - "expr": "rate(mysql_global_status_table_open_cache_hits{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Hits", - "refId": "B", - "step": 20 - }, - { - "expr": "rate(mysql_global_status_table_open_cache_misses{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Misses", - "refId": "C", - "step": 20 - }, - { - "expr": "rate(mysql_global_status_table_open_cache_overflows{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Misses due to Overflows", - "refId": "D", - "step": 20 - }, - { - "expr": "rate(mysql_global_status_table_open_cache_hits{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])/(rate(mysql_global_status_table_open_cache_hits{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])+rate(mysql_global_status_table_open_cache_misses{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Table Open Cache Hit Ratio", - "refId": "E", - "step": 20 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "MySQL Table Open Cache Status", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "percentunit", - "logBase": 1, - "max": null, - "min": 0, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null + "refId": "A" + } + ], + "title": "Table Openings", + "type": "row" + } + }, + { + "annotations": {}, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "table-openings-0" + }, + "spec": { + "datasource": { + "uid": "$datasource" + }, + "refId": "A" + } + }, + { + "annotations": { + "polly.grafana.com/docs": "**MySQL Table Open Cache Status**\n\nThe recommendation is to set the `table_open_cache_instances` to a loose correlation to virtual CPUs, keeping in mind that more instances means the cache is split more times. If you have a cache set to 500 but it has 10 instances, each cache will only have 50 cached.\n\nThe `table_definition_cache` and `table_open_cache` can be left as default as they are auto-sized MySQL 5.6 and above (ie: do not set them to any value)." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Panel", + "metadata": { + "name": "mysql-table-open-cache-status" + }, + "spec": { + "datasource": { + "uid": "$datasource" + }, + "description": "**MySQL Table Open Cache Status**\n\nThe recommendation is to set the `table_open_cache_instances` to a loose correlation to virtual CPUs, keeping in mind that more instances means the cache is split more times. If you have a cache set to 500 but it has 10 instances, each cache will only have 50 cached.\n\nThe `table_definition_cache` and `table_open_cache` can be left as default as they are auto-sized MySQL 5.6 and above (ie: do not set them to any value).", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 20, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Table Open Cache Hit Ratio" + }, + "properties": [ + { + "id": "unit", + "value": "percentunit" + } + ] } - } - }, - { - "annotations": { - "polly.grafana.com/docs": "**MySQL Table Open Cache Status**\n\nThe recommendation is to set the `table_open_cache_instances` to a loose correlation to virtual CPUs, keeping in mind that more instances means the cache is split more times. If you have a cache set to 500 but it has 10 instances, each cache will only have 50 cached.\n\nThe `table_definition_cache` and `table_open_cache` can be left as default as they are auto-sized MySQL 5.6 and above (ie: do not set them to any value)." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Target", - "metadata": { - "name": "mysql-table-open-cache-status-0" - }, - "spec": { + ] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 115 + }, + "id": 44, + "links": [ + { + "title": "Server Status Variables (table_open_cache)", + "url": "http://dev.mysql.com/doc/refman/5.6/en/server-system-variables.html#sysvar_table_open_cache" + } + ], + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "min" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.0.2", + "targets": [ + { "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "rate(mysql_global_status_opened_tables{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "rate(mysql_global_status_opened_tables{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", "format": "time_series", "interval": "1m", "intervalFactor": 1, @@ -9819,237 +10823,282 @@ "metric": "", "refId": "A", "step": 20 - } - }, - { - "annotations": { - "polly.grafana.com/docs": "**MySQL Table Open Cache Status**\n\nThe recommendation is to set the `table_open_cache_instances` to a loose correlation to virtual CPUs, keeping in mind that more instances means the cache is split more times. If you have a cache set to 500 but it has 10 instances, each cache will only have 50 cached.\n\nThe `table_definition_cache` and `table_open_cache` can be left as default as they are auto-sized MySQL 5.6 and above (ie: do not set them to any value)." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Target", - "metadata": { - "name": "mysql-table-open-cache-status-1" - }, - "spec": { - "expr": "rate(mysql_global_status_table_open_cache_hits{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", + }, + { + "datasource": { + "uid": "$datasource" + }, + "expr": "rate(mysql_global_status_table_open_cache_hits{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", "format": "time_series", "interval": "1m", "intervalFactor": 1, "legendFormat": "Hits", "refId": "B", "step": 20 - } - }, - { - "annotations": { - "polly.grafana.com/docs": "**MySQL Table Open Cache Status**\n\nThe recommendation is to set the `table_open_cache_instances` to a loose correlation to virtual CPUs, keeping in mind that more instances means the cache is split more times. If you have a cache set to 500 but it has 10 instances, each cache will only have 50 cached.\n\nThe `table_definition_cache` and `table_open_cache` can be left as default as they are auto-sized MySQL 5.6 and above (ie: do not set them to any value)." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Target", - "metadata": { - "name": "mysql-table-open-cache-status-2" - }, - "spec": { - "expr": "rate(mysql_global_status_table_open_cache_misses{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", + }, + { + "datasource": { + "uid": "$datasource" + }, + "expr": "rate(mysql_global_status_table_open_cache_misses{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", "format": "time_series", "interval": "1m", "intervalFactor": 1, "legendFormat": "Misses", "refId": "C", "step": 20 - } - }, - { - "annotations": { - "polly.grafana.com/docs": "**MySQL Table Open Cache Status**\n\nThe recommendation is to set the `table_open_cache_instances` to a loose correlation to virtual CPUs, keeping in mind that more instances means the cache is split more times. If you have a cache set to 500 but it has 10 instances, each cache will only have 50 cached.\n\nThe `table_definition_cache` and `table_open_cache` can be left as default as they are auto-sized MySQL 5.6 and above (ie: do not set them to any value)." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Target", - "metadata": { - "name": "mysql-table-open-cache-status-3" - }, - "spec": { - "expr": "rate(mysql_global_status_table_open_cache_overflows{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", + }, + { + "datasource": { + "uid": "$datasource" + }, + "expr": "rate(mysql_global_status_table_open_cache_overflows{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", "format": "time_series", "interval": "1m", "intervalFactor": 1, "legendFormat": "Misses due to Overflows", "refId": "D", "step": 20 - } - }, - { - "annotations": { - "polly.grafana.com/docs": "**MySQL Table Open Cache Status**\n\nThe recommendation is to set the `table_open_cache_instances` to a loose correlation to virtual CPUs, keeping in mind that more instances means the cache is split more times. If you have a cache set to 500 but it has 10 instances, each cache will only have 50 cached.\n\nThe `table_definition_cache` and `table_open_cache` can be left as default as they are auto-sized MySQL 5.6 and above (ie: do not set them to any value)." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Target", - "metadata": { - "name": "mysql-table-open-cache-status-4" - }, - "spec": { - "expr": "rate(mysql_global_status_table_open_cache_hits{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])/(rate(mysql_global_status_table_open_cache_hits{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])+rate(mysql_global_status_table_open_cache_misses{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + }, + { + "datasource": { + "uid": "$datasource" + }, + "expr": "rate(mysql_global_status_table_open_cache_hits{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])/(rate(mysql_global_status_table_open_cache_hits{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])+rate(mysql_global_status_table_open_cache_misses{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", "format": "time_series", "interval": "1m", "intervalFactor": 1, "legendFormat": "Table Open Cache Hit Ratio", "refId": "E", "step": 20 - } - }, - { - "annotations": { - "polly.grafana.com/docs": "**MySQL Open Tables**\n\nThe recommendation is to set the `table_open_cache_instances` to a loose correlation to virtual CPUs, keeping in mind that more instances means the cache is split more times. If you have a cache set to 500 but it has 10 instances, each cache will only have 50 cached.\n\nThe `table_definition_cache` and `table_open_cache` can be left as default as they are auto-sized MySQL 5.6 and above (ie: do not set them to any value)." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Panel", - "metadata": { - "name": "mysql-open-tables" - }, - "spec": { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "decimals": 2, - "description": "**MySQL Open Tables**\n\nThe recommendation is to set the `table_open_cache_instances` to a loose correlation to virtual CPUs, keeping in mind that more instances means the cache is split more times. If you have a cache set to 500 but it has 10 instances, each cache will only have 50 cached.\n\nThe `table_definition_cache` and `table_open_cache` can be left as default as they are auto-sized MySQL 5.6 and above (ie: do not set them to any value).", - "editable": true, - "error": false, - "fieldConfig": { - "defaults": { - "custom": { }, - "unit": "short" - }, - "overrides": [ ] - }, - "fill": 2, - "fillGradient": 0, - "grid": { }, - "gridPos": { - "h": 7, - "w": 12, - "x": 12, - "y": 115 - }, - "hiddenSeries": false, - "id": 42, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "sort": "avg", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [ - { - "title": "Server Status Variables (table_open_cache)", - "url": "http://dev.mysql.com/doc/refman/5.6/en/server-system-variables.html#sysvar_table_open_cache" - } - ], - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "mysql_global_status_open_tables{job=~\"$job\", instance=~\"$instance\"}", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Open Tables", - "metric": "", - "refId": "B", - "step": 20 - }, - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "mysql_global_variables_table_open_cache{job=~\"$job\", instance=~\"$instance\"}", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Table Open Cache", - "metric": "", - "refId": "C", - "step": 20 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "MySQL Open Tables", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "logBase": 1, - "max": null, - "min": 0, - "show": true - } + } + ], + "title": "MySQL Table Open Cache Status", + "type": "timeseries" + } + }, + { + "annotations": { + "polly.grafana.com/docs": "**MySQL Table Open Cache Status**\n\nThe recommendation is to set the `table_open_cache_instances` to a loose correlation to virtual CPUs, keeping in mind that more instances means the cache is split more times. If you have a cache set to 500 but it has 10 instances, each cache will only have 50 cached.\n\nThe `table_definition_cache` and `table_open_cache` can be left as default as they are auto-sized MySQL 5.6 and above (ie: do not set them to any value)." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "mysql-table-open-cache-status-0" + }, + "spec": { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "rate(mysql_global_status_opened_tables{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Openings", + "metric": "", + "refId": "A", + "step": 20 + } + }, + { + "annotations": { + "polly.grafana.com/docs": "**MySQL Table Open Cache Status**\n\nThe recommendation is to set the `table_open_cache_instances` to a loose correlation to virtual CPUs, keeping in mind that more instances means the cache is split more times. If you have a cache set to 500 but it has 10 instances, each cache will only have 50 cached.\n\nThe `table_definition_cache` and `table_open_cache` can be left as default as they are auto-sized MySQL 5.6 and above (ie: do not set them to any value)." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "mysql-table-open-cache-status-1" + }, + "spec": { + "datasource": { + "uid": "$datasource" + }, + "expr": "rate(mysql_global_status_table_open_cache_hits{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Hits", + "refId": "B", + "step": 20 + } + }, + { + "annotations": { + "polly.grafana.com/docs": "**MySQL Table Open Cache Status**\n\nThe recommendation is to set the `table_open_cache_instances` to a loose correlation to virtual CPUs, keeping in mind that more instances means the cache is split more times. If you have a cache set to 500 but it has 10 instances, each cache will only have 50 cached.\n\nThe `table_definition_cache` and `table_open_cache` can be left as default as they are auto-sized MySQL 5.6 and above (ie: do not set them to any value)." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "mysql-table-open-cache-status-2" + }, + "spec": { + "datasource": { + "uid": "$datasource" + }, + "expr": "rate(mysql_global_status_table_open_cache_misses{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Misses", + "refId": "C", + "step": 20 + } + }, + { + "annotations": { + "polly.grafana.com/docs": "**MySQL Table Open Cache Status**\n\nThe recommendation is to set the `table_open_cache_instances` to a loose correlation to virtual CPUs, keeping in mind that more instances means the cache is split more times. If you have a cache set to 500 but it has 10 instances, each cache will only have 50 cached.\n\nThe `table_definition_cache` and `table_open_cache` can be left as default as they are auto-sized MySQL 5.6 and above (ie: do not set them to any value)." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "mysql-table-open-cache-status-3" + }, + "spec": { + "datasource": { + "uid": "$datasource" + }, + "expr": "rate(mysql_global_status_table_open_cache_overflows{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Misses due to Overflows", + "refId": "D", + "step": 20 + } + }, + { + "annotations": { + "polly.grafana.com/docs": "**MySQL Table Open Cache Status**\n\nThe recommendation is to set the `table_open_cache_instances` to a loose correlation to virtual CPUs, keeping in mind that more instances means the cache is split more times. If you have a cache set to 500 but it has 10 instances, each cache will only have 50 cached.\n\nThe `table_definition_cache` and `table_open_cache` can be left as default as they are auto-sized MySQL 5.6 and above (ie: do not set them to any value)." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "mysql-table-open-cache-status-4" + }, + "spec": { + "datasource": { + "uid": "$datasource" + }, + "expr": "rate(mysql_global_status_table_open_cache_hits{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])/(rate(mysql_global_status_table_open_cache_hits{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])+rate(mysql_global_status_table_open_cache_misses{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Table Open Cache Hit Ratio", + "refId": "E", + "step": 20 + } + }, + { + "annotations": { + "polly.grafana.com/docs": "**MySQL Open Tables**\n\nThe recommendation is to set the `table_open_cache_instances` to a loose correlation to virtual CPUs, keeping in mind that more instances means the cache is split more times. If you have a cache set to 500 but it has 10 instances, each cache will only have 50 cached.\n\nThe `table_definition_cache` and `table_open_cache` can be left as default as they are auto-sized MySQL 5.6 and above (ie: do not set them to any value)." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Panel", + "metadata": { + "name": "mysql-open-tables" + }, + "spec": { + "datasource": { + "uid": "$datasource" + }, + "description": "**MySQL Open Tables**\n\nThe recommendation is to set the `table_open_cache_instances` to a loose correlation to virtual CPUs, keeping in mind that more instances means the cache is split more times. If you have a cache set to 500 but it has 10 instances, each cache will only have 50 cached.\n\nThe `table_definition_cache` and `table_open_cache` can be left as default as they are auto-sized MySQL 5.6 and above (ie: do not set them to any value).", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 20, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 115 + }, + "id": 42, + "links": [ + { + "title": "Server Status Variables (table_open_cache)", + "url": "http://dev.mysql.com/doc/refman/5.6/en/server-system-variables.html#sysvar_table_open_cache" + } + ], + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "min" ], - "yaxis": { - "align": false, - "alignLevel": null - } - } - }, - { - "annotations": { - "polly.grafana.com/docs": "**MySQL Open Tables**\n\nThe recommendation is to set the `table_open_cache_instances` to a loose correlation to virtual CPUs, keeping in mind that more instances means the cache is split more times. If you have a cache set to 500 but it has 10 instances, each cache will only have 50 cached.\n\nThe `table_definition_cache` and `table_open_cache` can be left as default as they are auto-sized MySQL 5.6 and above (ie: do not set them to any value)." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Target", - "metadata": { - "name": "mysql-open-tables-0" - }, - "spec": { + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.0.2", + "targets": [ + { "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "mysql_global_status_open_tables{job=~\"$job\", instance=~\"$instance\"}", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "mysql_global_status_open_tables{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}", "format": "time_series", "interval": "1m", "intervalFactor": 1, @@ -10057,22 +11106,15 @@ "metric": "", "refId": "B", "step": 20 - } - }, - { - "annotations": { - "polly.grafana.com/docs": "**MySQL Open Tables**\n\nThe recommendation is to set the `table_open_cache_instances` to a loose correlation to virtual CPUs, keeping in mind that more instances means the cache is split more times. If you have a cache set to 500 but it has 10 instances, each cache will only have 50 cached.\n\nThe `table_definition_cache` and `table_open_cache` can be left as default as they are auto-sized MySQL 5.6 and above (ie: do not set them to any value)." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Target", - "metadata": { - "name": "mysql-open-tables-1" - }, - "spec": { + }, + { "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "mysql_global_variables_table_open_cache{job=~\"$job\", instance=~\"$instance\"}", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "mysql_global_variables_table_open_cache{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}", "format": "time_series", "interval": "1m", "intervalFactor": 1, @@ -10080,198 +11122,218 @@ "metric": "", "refId": "C", "step": 20 - } - }, - { - "annotations": { }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Panel", - "metadata": { - "name": "mysql-table-definition-cache" - }, - "spec": { - "collapsed": false, - "datasource": "$datasource", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 122 - }, - "id": 394, - "panels": [ ], - "repeat": null, - "title": "MySQL Table Definition Cache", - "type": "row" - } - }, - { - "annotations": { - "polly.grafana.com/docs": "**MySQL Table Definition Cache**\n\nThe recommendation is to set the `table_open_cache_instances` to a loose correlation to virtual CPUs, keeping in mind that more instances means the cache is split more times. If you have a cache set to 500 but it has 10 instances, each cache will only have 50 cached.\n\nThe `table_definition_cache` and `table_open_cache` can be left as default as they are auto-sized MySQL 5.6 and above (ie: do not set them to any value)." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Panel", - "metadata": { - "name": "mysql-table-definition-cache" - }, - "spec": { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "decimals": 2, - "description": "**MySQL Table Definition Cache**\n\nThe recommendation is to set the `table_open_cache_instances` to a loose correlation to virtual CPUs, keeping in mind that more instances means the cache is split more times. If you have a cache set to 500 but it has 10 instances, each cache will only have 50 cached.\n\nThe `table_definition_cache` and `table_open_cache` can be left as default as they are auto-sized MySQL 5.6 and above (ie: do not set them to any value).", - "editable": true, - "error": false, - "fieldConfig": { - "defaults": { - "custom": { }, - "unit": "short" - }, - "overrides": [ ] - }, - "fill": 2, - "fillGradient": 0, - "grid": { }, - "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 123 + } + ], + "title": "MySQL Open Tables", + "type": "timeseries" + } + }, + { + "annotations": { + "polly.grafana.com/docs": "**MySQL Open Tables**\n\nThe recommendation is to set the `table_open_cache_instances` to a loose correlation to virtual CPUs, keeping in mind that more instances means the cache is split more times. If you have a cache set to 500 but it has 10 instances, each cache will only have 50 cached.\n\nThe `table_definition_cache` and `table_open_cache` can be left as default as they are auto-sized MySQL 5.6 and above (ie: do not set them to any value)." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "mysql-open-tables-0" + }, + "spec": { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "mysql_global_status_open_tables{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Open Tables", + "metric": "", + "refId": "B", + "step": 20 + } + }, + { + "annotations": { + "polly.grafana.com/docs": "**MySQL Open Tables**\n\nThe recommendation is to set the `table_open_cache_instances` to a loose correlation to virtual CPUs, keeping in mind that more instances means the cache is split more times. If you have a cache set to 500 but it has 10 instances, each cache will only have 50 cached.\n\nThe `table_definition_cache` and `table_open_cache` can be left as default as they are auto-sized MySQL 5.6 and above (ie: do not set them to any value)." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "mysql-open-tables-1" + }, + "spec": { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "mysql_global_variables_table_open_cache{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Table Open Cache", + "metric": "", + "refId": "C", + "step": 20 + } + }, + { + "annotations": {}, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Panel", + "metadata": { + "name": "mysql-table-definition-cache" + }, + "spec": { + "collapsed": false, + "datasource": { + "uid": "$datasource" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 122 + }, + "id": 394, + "panels": [], + "targets": [ + { + "datasource": { + "uid": "$datasource" }, - "hiddenSeries": false, - "id": 54, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "sort": "avg", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [ - { - "title": "Server Status Variables (table_open_cache)", - "url": "http://dev.mysql.com/doc/refman/5.6/en/server-system-variables.html#sysvar_table_open_cache" - } - ], - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "Opened Table Definitions", - "yaxis": 2 - } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "mysql_global_status_open_table_definitions{job=~\"$job\", instance=~\"$instance\"}", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Open Table Definitions", - "metric": "", - "refId": "B", - "step": 20 - }, - { - "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "mysql_global_variables_table_definition_cache{job=~\"$job\", instance=~\"$instance\"}", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Table Definitions Cache Size", - "metric": "", - "refId": "C", - "step": 20 - }, - { - "expr": "rate(mysql_global_status_opened_table_definitions{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Opened Table Definitions", - "refId": "A", - "step": 20 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "MySQL Table Definition Cache", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "logBase": 1, - "max": null, - "min": 0, - "show": true - } + "refId": "A" + } + ], + "title": "MySQL Table Definition Cache", + "type": "row" + } + }, + { + "annotations": {}, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "mysql-table-definition-cache-0" + }, + "spec": { + "datasource": { + "uid": "$datasource" + }, + "refId": "A" + } + }, + { + "annotations": { + "polly.grafana.com/docs": "**MySQL Table Definition Cache**\n\nThe recommendation is to set the `table_open_cache_instances` to a loose correlation to virtual CPUs, keeping in mind that more instances means the cache is split more times. If you have a cache set to 500 but it has 10 instances, each cache will only have 50 cached.\n\nThe `table_definition_cache` and `table_open_cache` can be left as default as they are auto-sized MySQL 5.6 and above (ie: do not set them to any value)." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Panel", + "metadata": { + "name": "mysql-table-definition-cache" + }, + "spec": { + "datasource": { + "uid": "$datasource" + }, + "description": "**MySQL Table Definition Cache**\n\nThe recommendation is to set the `table_open_cache_instances` to a loose correlation to virtual CPUs, keeping in mind that more instances means the cache is split more times. If you have a cache set to 500 but it has 10 instances, each cache will only have 50 cached.\n\nThe `table_definition_cache` and `table_open_cache` can be left as default as they are auto-sized MySQL 5.6 and above (ie: do not set them to any value).", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 20, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 123 + }, + "id": 54, + "links": [ + { + "title": "Server Status Variables (table_open_cache)", + "url": "http://dev.mysql.com/doc/refman/5.6/en/server-system-variables.html#sysvar_table_open_cache" + } + ], + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "min" ], - "yaxis": { - "align": false, - "alignLevel": null - } - } - }, - { - "annotations": { - "polly.grafana.com/docs": "**MySQL Table Definition Cache**\n\nThe recommendation is to set the `table_open_cache_instances` to a loose correlation to virtual CPUs, keeping in mind that more instances means the cache is split more times. If you have a cache set to 500 but it has 10 instances, each cache will only have 50 cached.\n\nThe `table_definition_cache` and `table_open_cache` can be left as default as they are auto-sized MySQL 5.6 and above (ie: do not set them to any value)." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Target", - "metadata": { - "name": "mysql-table-definition-cache-0" - }, - "spec": { + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.0.2", + "targets": [ + { "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "mysql_global_status_open_table_definitions{job=~\"$job\", instance=~\"$instance\"}", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "mysql_global_status_open_table_definitions{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}", "format": "time_series", "interval": "1m", "intervalFactor": 1, @@ -10279,22 +11341,15 @@ "metric": "", "refId": "B", "step": 20 - } - }, - { - "annotations": { - "polly.grafana.com/docs": "**MySQL Table Definition Cache**\n\nThe recommendation is to set the `table_open_cache_instances` to a loose correlation to virtual CPUs, keeping in mind that more instances means the cache is split more times. If you have a cache set to 500 but it has 10 instances, each cache will only have 50 cached.\n\nThe `table_definition_cache` and `table_open_cache` can be left as default as they are auto-sized MySQL 5.6 and above (ie: do not set them to any value)." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Target", - "metadata": { - "name": "mysql-table-definition-cache-1" - }, - "spec": { + }, + { "calculatedInterval": "2m", - "datasourceErrors": { }, - "errors": { }, - "expr": "mysql_global_variables_table_definition_cache{job=~\"$job\", instance=~\"$instance\"}", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "mysql_global_variables_table_definition_cache{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}", "format": "time_series", "interval": "1m", "intervalFactor": 1, @@ -10302,36 +11357,317 @@ "metric": "", "refId": "C", "step": 20 - } - }, - { - "annotations": { - "polly.grafana.com/docs": "**MySQL Table Definition Cache**\n\nThe recommendation is to set the `table_open_cache_instances` to a loose correlation to virtual CPUs, keeping in mind that more instances means the cache is split more times. If you have a cache set to 500 but it has 10 instances, each cache will only have 50 cached.\n\nThe `table_definition_cache` and `table_open_cache` can be left as default as they are auto-sized MySQL 5.6 and above (ie: do not set them to any value)." - }, - "apiVersion": "grafana.com/v1alpha1", - "kind": "Target", - "metadata": { - "name": "mysql-table-definition-cache-2" - }, - "spec": { - "expr": "rate(mysql_global_status_opened_table_definitions{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", + }, + { + "datasource": { + "uid": "$datasource" + }, + "expr": "rate(mysql_global_status_opened_table_definitions{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", "format": "time_series", "interval": "1m", "intervalFactor": 1, "legendFormat": "Opened Table Definitions", "refId": "A", "step": 20 - } - } - ], - "metadata": { - "description": "", - "icon": "https://storage.googleapis.com/grafanalabs-integration-logos/mysql.png", - "id": "mysql", - "name": "MySQL", - "tags": [ - "database" - ], - "version": "0.1.1" - } -} + } + ], + "title": "MySQL Table Definition Cache", + "type": "timeseries" + } + }, + { + "annotations": { + "polly.grafana.com/docs": "**MySQL Table Definition Cache**\n\nThe recommendation is to set the `table_open_cache_instances` to a loose correlation to virtual CPUs, keeping in mind that more instances means the cache is split more times. If you have a cache set to 500 but it has 10 instances, each cache will only have 50 cached.\n\nThe `table_definition_cache` and `table_open_cache` can be left as default as they are auto-sized MySQL 5.6 and above (ie: do not set them to any value)." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "mysql-table-definition-cache-0" + }, + "spec": { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "mysql_global_status_open_table_definitions{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Open Table Definitions", + "metric": "", + "refId": "B", + "step": 20 + } + }, + { + "annotations": { + "polly.grafana.com/docs": "**MySQL Table Definition Cache**\n\nThe recommendation is to set the `table_open_cache_instances` to a loose correlation to virtual CPUs, keeping in mind that more instances means the cache is split more times. If you have a cache set to 500 but it has 10 instances, each cache will only have 50 cached.\n\nThe `table_definition_cache` and `table_open_cache` can be left as default as they are auto-sized MySQL 5.6 and above (ie: do not set them to any value)." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "mysql-table-definition-cache-1" + }, + "spec": { + "calculatedInterval": "2m", + "datasource": { + "uid": "$datasource" + }, + "datasourceErrors": {}, + "errors": {}, + "expr": "mysql_global_variables_table_definition_cache{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Table Definitions Cache Size", + "metric": "", + "refId": "C", + "step": 20 + } + }, + { + "annotations": { + "polly.grafana.com/docs": "**MySQL Table Definition Cache**\n\nThe recommendation is to set the `table_open_cache_instances` to a loose correlation to virtual CPUs, keeping in mind that more instances means the cache is split more times. If you have a cache set to 500 but it has 10 instances, each cache will only have 50 cached.\n\nThe `table_definition_cache` and `table_open_cache` can be left as default as they are auto-sized MySQL 5.6 and above (ie: do not set them to any value)." + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "Target", + "metadata": { + "name": "mysql-table-definition-cache-2" + }, + "spec": { + "datasource": { + "uid": "$datasource" + }, + "expr": "rate(mysql_global_status_opened_table_definitions{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", + "format": "time_series", + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "Opened Table Definitions", + "refId": "A", + "step": 20 + } + }, + { + "annotations": { + "polly.grafana.com/docs": "agent-config-0" + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "GrafanaAgentConfig", + "metadata": { + "name": "agent-config-0" + }, + "spec": { + "config": "mysqld_exporter:\n enabled: true\n instance: \"\u003cyour-instance-name\u003e\" # must match instance used in logs\n data_source_name: root:password@(localhost:3306)/\n relabel_configs:\n - target_label: job\n replacement: 'integrations/mysql' # must match job used in logs\n", + "type": "integration" + } + }, + { + "annotations": { + "polly.grafana.com/docs": "agent-config-1" + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "GrafanaAgentConfig", + "metadata": { + "name": "agent-config-1" + }, + "spec": { + "config": "job_name: integrations/mysql \nstatic_configs:\n - labels:\n instance: \"\u003cyour-instance-name\u003e\" # must match instance used in mysqld_exporter\n job: integrations/mysql # must match job used in mysqld_exporter\n __path__: /var/log/mysql/*.log\npipeline_stages:\n - regex:\n expression: '(?P\u003ctimestamp\u003e.+) (?P\u003cthread\u003e[\\d]+) \\[(?P\u003clabel\u003e.+?)\\]( \\[(?P\u003cerr_code\u003e.+?)\\] \\[(?P\u003csubsystem\u003e.+?)\\])? (?P\u003cmsg\u003e.+)'\n - labels:\n level: label\n err_code:\n subsystem:\n - drop:\n expression: \"^ *$\"\n drop_counter_reason: \"drop empty lines\"\n", + "type": "log_scrape" + } + }, + { + "annotations": { + "polly.grafana.com/docs": "agent-config-2" + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "GrafanaAgentConfig", + "metadata": { + "name": "agent-config-2" + }, + "spec": { + "config": "# Replace all values between the angle brackets '\u003c\u003e', with your desired configuration\napiVersion: monitoring.grafana.com/v1alpha1\nkind: Integration\nmetadata:\n labels:\n agent: grafana-agent\n name: mysql-exporter\nspec:\n name: mysql\n type:\n unique: false\n allNodes: false\n config:\n autoscrape:\n enable: true\n # grafana-agent metrics instance, e.g. default/primary\n metrics_instance: \u003cyour_agent_namespace\u003e/\u003cyour_agent_instance_name\u003e\n relabel_configs:\n - action: replace\n replacement: integrations/mysql\n target_label: job\n instance: \"\u003cyour_mysql_instance_name\u003e\"\n data_source_name: \u003cusername\u003e:\u003cpassword\u003e@(\u003cyour_mysql_instance_name\u003e:3306)/\n", + "type": "kubernetes_cr" + } + }, + { + "annotations": { + "polly.grafana.com/docs": "agent-config-3" + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "GrafanaAgentConfig", + "metadata": { + "name": "agent-config-3" + }, + "spec": { + "config": "# Replace all values between the angle brackets '\u003c\u003e', with your desired configuration\napiVersion: monitoring.grafana.com/v1alpha1\nkind: PodLogs\nmetadata:\n labels:\n instance: primary\n name: mysql-logs\nspec:\n # Namespace selector is optional. It can be set to the namespace where mysql is running.\n namespaceSelector:\n matchNames:\n - \u003cyour_mysql_namespace\u003e\n selector:\n matchLabels:\n \u003cyour_mysql_selector_labelname\u003e: \u003cyour_mysql_selector_labelvalue\u003e\n pipelineStages:\n # If you're using docker, replace `cri` with `docker` below.\n - cri: {}\n - labels:\n instance: pod\n - regex:\n expression: '(?P\u003ctimestamp\u003e.+) (?P\u003cthread\u003e[\\d]+) \\[(?P\u003clabel\u003e.+?)\\]( \\[(?P\u003cerr_code\u003e.+?)\\] \\[(?P\u003csubsystem\u003e.+?)\\])? (?P\u003cmsg\u003e.+)'\n - labels:\n level: label\n err_code: err_code\n subsystem: subsystem\n - drop:\n expression: \"^ *$\"\n dropCounterReason: \"drop empty lines\"\n relabelings:\n - action: replace\n replacement: integrations/mysql\n targetLabel: job\n - action: replace\n replacement: \"\u003cyour_mysql_instance_name\u003e\"\n targetLabel: instance\n", + "type": "kubernetes_cr" + } + }, + { + "annotations": { + "polly.grafana.com/docs": "MySQLdAlerts" + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "PrometheusAlertRuleGroup", + "metadata": { + "name": "MySQLdAlerts" + }, + "spec": { + "name": "MySQLdAlerts", + "rules": [ + { + "alert": "MySQLDown", + "annotations": { + "description": "MySQL {{$labels.job}} on {{$labels.instance}} is not up.", + "summary": "MySQL not up." + }, + "expr": "mysql_up != 1", + "for": "5m", + "labels": { + "severity": "critical" + } + } + ] + } + }, + { + "annotations": { + "polly.grafana.com/docs": "GaleraAlerts" + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "PrometheusAlertRuleGroup", + "metadata": { + "name": "GaleraAlerts" + }, + "spec": { + "name": "GaleraAlerts", + "rules": [ + { + "alert": "MySQLGaleraNotReady", + "annotations": { + "description": "{{$labels.job}} on {{$labels.instance}} is not ready.", + "summary": "Galera cluster node not ready." + }, + "expr": "mysql_global_status_wsrep_ready != 1", + "for": "5m", + "labels": { + "severity": "warning" + } + }, + { + "alert": "MySQLGaleraOutOfSync", + "annotations": { + "description": "{{$labels.job}} on {{$labels.instance}} is not in sync ({{$value}} != 4).", + "summary": "Galera cluster node out of sync." + }, + "expr": "(mysql_global_status_wsrep_local_state != 4 and mysql_global_variables_wsrep_desync == 0)", + "for": "5m", + "labels": { + "severity": "warning" + } + }, + { + "alert": "MySQLGaleraDonorFallingBehind", + "annotations": { + "description": "{{$labels.job}} on {{$labels.instance}} is a donor (hotbackup) and is falling behind (queue size {{$value}}).", + "summary": "XtraDB cluster donor node falling behind." + }, + "expr": "(mysql_global_status_wsrep_local_state == 2 and mysql_global_status_wsrep_local_recv_queue \u003e 100)", + "for": "5m", + "labels": { + "severity": "warning" + } + }, + { + "alert": "MySQLReplicationNotRunning", + "annotations": { + "description": "Replication on {{$labels.instance}} (IO or SQL) has been down for more than 2 minutes.", + "summary": "Replication is not running." + }, + "expr": "mysql_slave_status_slave_io_running == 0 or mysql_slave_status_slave_sql_running == 0", + "for": "2m", + "labels": { + "severity": "critical" + } + }, + { + "alert": "MySQLReplicationLag", + "annotations": { + "description": "Replication on {{$labels.instance}} has fallen behind and is not recovering.", + "summary": "MySQL slave replication is lagging." + }, + "expr": "(instance:mysql_slave_lag_seconds \u003e 30) and on(instance) (predict_linear(instance:mysql_slave_lag_seconds[5m], 60 * 2) \u003e 0)", + "for": "1m", + "labels": { + "severity": "critical" + } + }, + { + "alert": "MySQLHeartbeatLag", + "annotations": { + "description": "The heartbeat is lagging on {{$labels.instance}} and is not recovering.", + "summary": "MySQL heartbeat is lagging." + }, + "expr": "(instance:mysql_heartbeat_lag_seconds \u003e 30) and on(instance) (predict_linear(instance:mysql_heartbeat_lag_seconds[5m], 60 * 2) \u003e 0)", + "for": "1m", + "labels": { + "severity": "critical" + } + }, + { + "alert": "MySQLInnoDBLogWaits", + "annotations": { + "description": "The innodb logs are waiting for disk at a rate of {{$value}} / second", + "summary": "MySQL innodb log writes stalling." + }, + "expr": "rate(mysql_global_status_innodb_log_waits[15m]) \u003e 10", + "labels": { + "severity": "warning" + } + } + ] + } + }, + { + "annotations": { + "polly.grafana.com/docs": "mysqld_rules" + }, + "apiVersion": "grafana.com/v1alpha1", + "kind": "PrometheusRecordingRuleGroup", + "metadata": { + "name": "mysqld_rules" + }, + "spec": { + "name": "mysqld_rules", + "rules": [ + { + "expr": "mysql_slave_status_seconds_behind_master - mysql_slave_status_sql_delay", + "record": "instance:mysql_slave_lag_seconds" + }, + { + "expr": "mysql_heartbeat_now_timestamp_seconds - mysql_heartbeat_stored_timestamp_seconds", + "record": "instance:mysql_heartbeat_lag_seconds" + }, + { + "expr": "sum without (command) (rate(mysql_global_status_commands_total{command=~\"(commit|rollback)\"}[5m]))", + "record": "job:mysql_transactions:rate5m" + } + ] + } + } + ], + "metadata": { + "dashboard_folder": "Integration - MySQL", + "icon": "https://storage.googleapis.com/grafanalabs-integration-logos/mysql.png", + "id": "mysql", + "name": "MySQL", + "rule_namespace": "integrations-mysql", + "tags": [ + "database" + ], + "version": "1.0.0" + }, + "spec": {} +} \ No newline at end of file