{
    "annotations": {
        "list": []
    },
    "editable": true,
    "gnetId": null,
    "graphTooltip": 1,
    "hideControls": true,
    "id": null,
    "links": [
        {
            "asDropdown": true,
            "icon": "external link",
            "includeVars": true,
            "keepTime": true,
            "tags": [
                "OS"
            ],
            "targetBlank": true,
            "title": "OS",
            "type": "dashboards"
        },
        {
            "asDropdown": true,
            "icon": "external link",
            "includeVars": true,
            "keepTime": true,
            "tags": [
                "MySQL"
            ],
            "targetBlank": true,
            "title": "MySQL",
            "type": "dashboards"
        },
        {
            "asDropdown": true,
            "icon": "external link",
            "includeVars": true,
            "keepTime": true,
            "tags": [
                "HA"
            ],
            "targetBlank": true,
            "title": "HA",
            "type": "dashboards"
        }
    ],
    "refresh": false,
    "rows": [
        {
            "collapse": false,
            "height": "250px",
            "panels": [
                {
                    "aliasColors": {},
                    "bars": false,
                    "datasource": "Prometheus",
                    "decimals": 2,
                    "description": "Average query response time is calculated as the total execution time of queries divided by the number of queries.",
                    "editable": true,
                    "error": false,
                    "fill": 2,
                    "grid": {},
                    "id": 6,
                    "legend": {
                        "alignAsTable": true,
                        "avg": true,
                        "current": false,
                        "hideZero": false,
                        "max": true,
                        "min": true,
                        "rightSide": true,
                        "show": true,
                        "total": false,
                        "values": true
                    },
                    "lines": true,
                    "linewidth": 2,
                    "links": [
                        {
                            "targetBlank": true,
                            "title": "More information about Query Response Time plugin in Percona Server",
                            "type": "absolute",
                            "url": "https://www.percona.com/doc/percona-server/5.7/diagnostics/response_time_distribution.html#QUERY_RESPONSE_TIME"
                        }
                    ],
                    "nullPointMode": "null",
                    "percentage": false,
                    "pointradius": 5,
                    "points": false,
                    "renderer": "flot",
                    "seriesOverrides": [],
                    "span": 12,
                    "stack": false,
                    "steppedLine": false,
                    "targets": [
                        {
                            "calculatedInterval": "2m",
                            "datasourceErrors": {},
                            "errors": {},
                            "expr": "rate(mysql_info_schema_query_response_time_seconds_sum{instance=\"$host\"}[$interval]) / rate(mysql_info_schema_query_response_time_seconds_count{instance=\"$host\"}[$interval]) * 1000 or irate(mysql_info_schema_query_response_time_seconds_sum{instance=\"$host\"}[5m]) / irate(mysql_info_schema_query_response_time_seconds_count{instance=\"$host\"}[5m]) * 1000",
                            "hide": false,
                            "interval": "$interval",
                            "intervalFactor": 1,
                            "legendFormat": "Time",
                            "metric": "",
                            "refId": "B",
                            "step": 300
                        }
                    ],
                    "thresholds": [],
                    "timeFrom": null,
                    "timeShift": null,
                    "title": "Average Query Response Time",
                    "tooltip": {
                        "msResolution": false,
                        "shared": true,
                        "sort": 0,
                        "value_type": "cumulative"
                    },
                    "type": "graph",
                    "xaxis": {
                        "mode": "time",
                        "name": null,
                        "show": true,
                        "values": []
                    },
                    "yaxes": [
                        {
                            "format": "ms",
                            "logBase": 1,
                            "max": null,
                            "min": 0,
                            "show": true
                        },
                        {
                            "format": "short",
                            "logBase": 1,
                            "max": null,
                            "min": 0,
                            "show": true
                        }
                    ]
                }
            ],
            "repeat": null,
            "repeatIteration": null,
            "repeatRowId": null,
            "showTitle": false,
            "title": "New row",
            "titleSize": "h6"
        },
        {
            "collapse": false,
            "height": "250px",
            "panels": [
                {
                    "aliasColors": {},
                    "bars": false,
                    "datasource": "Prometheus",
                    "decimals": 2,
                    "description": "Shows how many fast, neutral, and slow queries are executed per second.",
                    "editable": true,
                    "error": false,
                    "fill": 2,
                    "grid": {},
                    "height": "",
                    "hideTimeOverride": false,
                    "id": 7,
                    "legend": {
                        "alignAsTable": true,
                        "avg": true,
                        "current": false,
                        "hideEmpty": false,
                        "hideZero": false,
                        "max": true,
                        "min": true,
                        "rightSide": true,
                        "show": true,
                        "sort": null,
                        "sortDesc": null,
                        "total": false,
                        "values": true
                    },
                    "lines": true,
                    "linewidth": 2,
                    "links": [
                        {
                            "targetBlank": true,
                            "title": "More information about Query Response Time plugin in Percona Server",
                            "type": "absolute",
                            "url": "https://www.percona.com/doc/percona-server/5.7/diagnostics/response_time_distribution.html#QUERY_RESPONSE_TIME"
                        }
                    ],
                    "nullPointMode": "null",
                    "percentage": false,
                    "pointradius": 5,
                    "points": false,
                    "renderer": "flot",
                    "seriesOverrides": [
                        {
                            "alias": "Queries >10s",
                            "color": "#E24D42"
                        },
                        {
                            "alias": "Queries 1s - 10s",
                            "color": "#EF843C"
                        },
                        {
                            "alias": "Queries 100ms - 1s",
                            "color": "#EAB839"
                        }
                    ],
                    "span": 12,
                    "stack": false,
                    "steppedLine": false,
                    "targets": [
                        {
                            "expr": "(rate(mysql_info_schema_query_response_time_seconds_bucket{instance=\"$host\",le='1'}[$interval]) - on (instance) rate(mysql_info_schema_query_response_time_seconds_bucket{instance=\"$host\",le='0.1'}[$interval])) or (irate(mysql_info_schema_query_response_time_seconds_bucket{instance=\"$host\",le='1'}[5m]) - on (instance) irate(mysql_info_schema_query_response_time_seconds_bucket{instance=\"$host\",le='0.1'}[5m]))",
                            "hide": false,
                            "interval": "$interval",
                            "intervalFactor": 1,
                            "legendFormat": "Queries 100ms - 1s",
                            "metric": "",
                            "refId": "A",
                            "step": 300
                        },
                        {
                            "expr": "(rate(mysql_info_schema_query_response_time_seconds_bucket{instance=\"$host\",le='10'}[$interval])  - on (instance) rate(mysql_info_schema_query_response_time_seconds_bucket{instance=\"$host\",le='1'}[$interval])) or (irate(mysql_info_schema_query_response_time_seconds_bucket{instance=\"$host\",le='10'}[5m])  - on (instance) irate(mysql_info_schema_query_response_time_seconds_bucket{instance=\"$host\",le='1'}[5m]))",
                            "interval": "$interval",
                            "intervalFactor": 1,
                            "legendFormat": "Queries 1s - 10s",
                            "refId": "B",
                            "step": 300
                        },
                        {
                            "expr": "(rate(mysql_info_schema_query_response_time_seconds_bucket{instance=\"$host\",le='100000'}[$interval])  - on (instance) rate(mysql_info_schema_query_response_time_seconds_bucket{instance=\"$host\",le='10'}[$interval])) or (irate(mysql_info_schema_query_response_time_seconds_bucket{instance=\"$host\",le='100000'}[5m])  - on (instance) irate(mysql_info_schema_query_response_time_seconds_bucket{instance=\"$host\",le='10'}[5m]))",
                            "interval": "$interval",
                            "intervalFactor": 1,
                            "legendFormat": "Queries >10s",
                            "refId": "C",
                            "step": 300
                        }
                    ],
                    "thresholds": [],
                    "timeFrom": null,
                    "timeShift": null,
                    "title": "Query Response Time Distribution",
                    "tooltip": {
                        "msResolution": false,
                        "shared": true,
                        "sort": 0,
                        "value_type": "individual"
                    },
                    "transparent": false,
                    "type": "graph",
                    "xaxis": {
                        "mode": "time",
                        "name": null,
                        "show": true,
                        "values": []
                    },
                    "yaxes": [
                        {
                            "format": "ops",
                            "logBase": 1,
                            "max": null,
                            "min": 0,
                            "show": true
                        },
                        {
                            "format": "ops",
                            "logBase": 1,
                            "max": null,
                            "min": 0,
                            "show": true
                        }
                    ]
                },
                {
                    "content": "These graphs are available only for [Percona Server](https://www.percona.com/doc/percona-server/5.6/diagnostics/response_time_distribution.html) and [MariaDB](https://mariadb.com/kb/en/mariadb/query_response_time-plugin/). It requires query response time plugin installed and `query_response_time_stats ` variable turned on.\n\nRead/write split below is available only for Percona Server 5.6/5.7.",
                    "datasource": "Prometheus",
                    "editable": true,
                    "error": false,
                    "height": "50px",
                    "id": 5,
                    "links": [],
                    "mode": "markdown",
                    "span": 12,
                    "style": {},
                    "title": "",
                    "transparent": true,
                    "type": "text"
                }
            ],
            "repeat": null,
            "repeatIteration": null,
            "repeatRowId": null,
            "showTitle": false,
            "title": "Query Response Time Distribution",
            "titleSize": "h6"
        },
        {
            "collapse": false,
            "height": "250px",
            "panels": [
                {
                    "aliasColors": {},
                    "bars": false,
                    "datasource": "Prometheus",
                    "decimals": 2,
                    "description": "Compare read and write query response time.",
                    "editable": true,
                    "error": false,
                    "fill": 2,
                    "grid": {},
                    "id": 8,
                    "legend": {
                        "alignAsTable": true,
                        "avg": true,
                        "current": false,
                        "hideZero": false,
                        "max": true,
                        "min": true,
                        "rightSide": true,
                        "show": true,
                        "total": false,
                        "values": true
                    },
                    "lines": true,
                    "linewidth": 2,
                    "links": [
                        {
                            "targetBlank": true,
                            "title": "More information about Query Response Time plugin in Percona Server",
                            "type": "absolute",
                            "url": "https://www.percona.com/doc/percona-server/5.7/diagnostics/response_time_distribution.html#logging-the-queries-in-separate-read-and-write-tables"
                        }
                    ],
                    "nullPointMode": "null",
                    "percentage": false,
                    "pointradius": 5,
                    "points": false,
                    "renderer": "flot",
                    "seriesOverrides": [],
                    "span": 12,
                    "stack": false,
                    "steppedLine": false,
                    "targets": [
                        {
                            "calculatedInterval": "2m",
                            "datasourceErrors": {},
                            "errors": {},
                            "expr": "rate(mysql_info_schema_read_query_response_time_seconds_sum{instance=\"$host\"}[$interval]) / rate(mysql_info_schema_read_query_response_time_seconds_count{instance=\"$host\"}[$interval]) * 1000 or irate(mysql_info_schema_read_query_response_time_seconds_sum{instance=\"$host\"}[5m]) / irate(mysql_info_schema_read_query_response_time_seconds_count{instance=\"$host\"}[5m]) * 1000",
                            "hide": false,
                            "interval": "$interval",
                            "intervalFactor": 1,
                            "legendFormat": "Read Query Time",
                            "metric": "",
                            "refId": "B",
                            "step": 300
                        },
                        {
                            "calculatedInterval": "2m",
                            "datasourceErrors": {},
                            "errors": {},
                            "expr": "rate(mysql_info_schema_write_query_response_time_seconds_sum{instance=\"$host\"}[$interval]) / rate(mysql_info_schema_write_query_response_time_seconds_count{instance=\"$host\"}[$interval]) * 1000 or irate(mysql_info_schema_write_query_response_time_seconds_sum{instance=\"$host\"}[5m]) / irate(mysql_info_schema_write_query_response_time_seconds_count{instance=\"$host\"}[5m]) * 1000",
                            "hide": false,
                            "interval": "$interval",
                            "intervalFactor": 1,
                            "legendFormat": "Write Query Time",
                            "metric": "",
                            "refId": "A",
                            "step": 300
                        }
                    ],
                    "thresholds": [],
                    "timeFrom": null,
                    "timeShift": null,
                    "title": "Average Query Response Time",
                    "tooltip": {
                        "msResolution": false,
                        "shared": true,
                        "sort": 0,
                        "value_type": "cumulative"
                    },
                    "type": "graph",
                    "xaxis": {
                        "mode": "time",
                        "name": null,
                        "show": true,
                        "values": []
                    },
                    "yaxes": [
                        {
                            "format": "ms",
                            "logBase": 1,
                            "max": null,
                            "min": 0,
                            "show": true
                        },
                        {
                            "format": "short",
                            "logBase": 1,
                            "max": null,
                            "min": 0,
                            "show": true
                        }
                    ]
                }
            ],
            "repeat": null,
            "repeatIteration": null,
            "repeatRowId": null,
            "showTitle": true,
            "title": "Read/Write Split",
            "titleSize": "h6"
        },
        {
            "collapse": false,
            "height": "250px",
            "panels": [
                {
                    "aliasColors": {},
                    "bars": false,
                    "datasource": "Prometheus",
                    "decimals": 2,
                    "description": "Shows how many fast, neutral, and slow read queries are executed per second.",
                    "editable": true,
                    "error": false,
                    "fill": 2,
                    "grid": {},
                    "height": "",
                    "hideTimeOverride": false,
                    "id": 9,
                    "legend": {
                        "alignAsTable": true,
                        "avg": true,
                        "current": false,
                        "hideEmpty": false,
                        "hideZero": false,
                        "max": true,
                        "min": true,
                        "rightSide": false,
                        "show": true,
                        "sort": null,
                        "sortDesc": null,
                        "total": false,
                        "values": true
                    },
                    "lines": true,
                    "linewidth": 2,
                    "links": [
                        {
                            "targetBlank": true,
                            "title": "More information about Query Response Time plugin in Percona Server",
                            "type": "absolute",
                            "url": "https://www.percona.com/doc/percona-server/5.7/diagnostics/response_time_distribution.html#QUERY_RESPONSE_TIME_READ"
                        }
                    ],
                    "nullPointMode": "null",
                    "percentage": false,
                    "pointradius": 5,
                    "points": false,
                    "renderer": "flot",
                    "seriesOverrides": [
                        {
                            "alias": "Queries >10s",
                            "color": "#E24D42"
                        },
                        {
                            "alias": "Queries 1s - 10s",
                            "color": "#EF843C"
                        },
                        {
                            "alias": "Queries 100ms - 1s",
                            "color": "#EAB839"
                        }
                    ],
                    "span": 6,
                    "stack": false,
                    "steppedLine": false,
                    "targets": [
                        {
                            "expr": "(rate(mysql_info_schema_read_query_response_time_seconds_bucket{instance=\"$host\",le='1'}[$interval]) - on (instance) rate(mysql_info_schema_read_query_response_time_seconds_bucket{instance=\"$host\",le='0.1'}[$interval])) or (irate(mysql_info_schema_read_query_response_time_seconds_bucket{instance=\"$host\",le='1'}[5m]) - on (instance) irate(mysql_info_schema_read_query_response_time_seconds_bucket{instance=\"$host\",le='0.1'}[5m]))",
                            "hide": false,
                            "interval": "$interval",
                            "intervalFactor": 1,
                            "legendFormat": "Queries 100ms - 1s",
                            "metric": "",
                            "refId": "A",
                            "step": 300
                        },
                        {
                            "expr": "(rate(mysql_info_schema_read_query_response_time_seconds_bucket{instance=\"$host\",le='10'}[$interval])  - on (instance) rate(mysql_info_schema_read_query_response_time_seconds_bucket{instance=\"$host\",le='1'}[$interval])) or (irate(mysql_info_schema_read_query_response_time_seconds_bucket{instance=\"$host\",le='10'}[5m])  - on (instance) irate(mysql_info_schema_read_query_response_time_seconds_bucket{instance=\"$host\",le='1'}[5m]))",
                            "interval": "$interval",
                            "intervalFactor": 1,
                            "legendFormat": "Queries 1s - 10s",
                            "refId": "B",
                            "step": 300
                        },
                        {
                            "expr": "(rate(mysql_info_schema_read_query_response_time_seconds_bucket{instance=\"$host\",le='100000'}[$interval])  - on (instance) rate(mysql_info_schema_read_query_response_time_seconds_bucket{instance=\"$host\",le='10'}[$interval])) or (irate(mysql_info_schema_read_query_response_time_seconds_bucket{instance=\"$host\",le='100000'}[5m])  - on (instance) irate(mysql_info_schema_read_query_response_time_seconds_bucket{instance=\"$host\",le='10'}[5m]))",
                            "interval": "$interval",
                            "intervalFactor": 1,
                            "legendFormat": "Queries >10s",
                            "refId": "C",
                            "step": 300
                        }
                    ],
                    "thresholds": [],
                    "timeFrom": null,
                    "timeShift": null,
                    "title": "Read Query Response Time Distribution",
                    "tooltip": {
                        "msResolution": false,
                        "shared": true,
                        "sort": 0,
                        "value_type": "individual"
                    },
                    "transparent": false,
                    "type": "graph",
                    "xaxis": {
                        "mode": "time",
                        "name": null,
                        "show": true,
                        "values": []
                    },
                    "yaxes": [
                        {
                            "format": "ops",
                            "logBase": 1,
                            "max": null,
                            "min": 0,
                            "show": true
                        },
                        {
                            "format": "ops",
                            "logBase": 1,
                            "max": null,
                            "min": 0,
                            "show": true
                        }
                    ]
                },
                {
                    "aliasColors": {},
                    "bars": false,
                    "datasource": "Prometheus",
                    "decimals": 2,
                    "description": "Shows how many fast, neutral, and slow write queries are executed per second.",
                    "editable": true,
                    "error": false,
                    "fill": 2,
                    "grid": {},
                    "height": "",
                    "hideTimeOverride": false,
                    "id": 10,
                    "legend": {
                        "alignAsTable": true,
                        "avg": true,
                        "current": false,
                        "hideEmpty": false,
                        "hideZero": false,
                        "max": true,
                        "min": true,
                        "rightSide": false,
                        "show": true,
                        "sort": null,
                        "sortDesc": null,
                        "total": false,
                        "values": true
                    },
                    "lines": true,
                    "linewidth": 2,
                    "links": [
                        {
                            "targetBlank": true,
                            "title": "More information about Query Response Time plugin in Percona Server",
                            "type": "absolute",
                            "url": "https://www.percona.com/doc/percona-server/5.7/diagnostics/response_time_distribution.html#QUERY_RESPONSE_TIME_WRITE"
                        }
                    ],
                    "nullPointMode": "null",
                    "percentage": false,
                    "pointradius": 5,
                    "points": false,
                    "renderer": "flot",
                    "seriesOverrides": [
                        {
                            "alias": "Queries >10s",
                            "color": "#E24D42"
                        },
                        {
                            "alias": "Queries 1s - 10s",
                            "color": "#EF843C"
                        },
                        {
                            "alias": "Queries 100ms - 1s",
                            "color": "#EAB839"
                        }
                    ],
                    "span": 6,
                    "stack": false,
                    "steppedLine": false,
                    "targets": [
                        {
                            "expr": "(rate(mysql_info_schema_write_query_response_time_seconds_bucket{instance=\"$host\",le='1'}[$interval]) - on (instance) rate(mysql_info_schema_write_query_response_time_seconds_bucket{instance=\"$host\",le='0.1'}[$interval])) or (irate(mysql_info_schema_write_query_response_time_seconds_bucket{instance=\"$host\",le='1'}[5m]) - on (instance) irate(mysql_info_schema_write_query_response_time_seconds_bucket{instance=\"$host\",le='0.1'}[5m]))",
                            "hide": false,
                            "interval": "$interval",
                            "intervalFactor": 1,
                            "legendFormat": "Queries 100ms - 1s",
                            "metric": "",
                            "refId": "A",
                            "step": 300
                        },
                        {
                            "expr": "(rate(mysql_info_schema_write_query_response_time_seconds_bucket{instance=\"$host\",le='10'}[$interval])  - on (instance) rate(mysql_info_schema_write_query_response_time_seconds_bucket{instance=\"$host\",le='1'}[$interval])) or (irate(mysql_info_schema_write_query_response_time_seconds_bucket{instance=\"$host\",le='10'}[5m])  - on (instance) irate(mysql_info_schema_write_query_response_time_seconds_bucket{instance=\"$host\",le='1'}[5m]))",
                            "interval": "$interval",
                            "intervalFactor": 1,
                            "legendFormat": "Queries 1s - 10s",
                            "refId": "B",
                            "step": 300
                        },
                        {
                            "expr": "(rate(mysql_info_schema_write_query_response_time_seconds_bucket{instance=\"$host\",le='100000'}[$interval])  - on (instance) rate(mysql_info_schema_write_query_response_time_seconds_bucket{instance=\"$host\",le='10'}[$interval])) or (irate(mysql_info_schema_write_query_response_time_seconds_bucket{instance=\"$host\",le='100000'}[5m])  - on (instance) irate(mysql_info_schema_write_query_response_time_seconds_bucket{instance=\"$host\",le='10'}[5m]))",
                            "interval": "$interval",
                            "intervalFactor": 1,
                            "legendFormat": "Queries >10s",
                            "refId": "C",
                            "step": 300
                        }
                    ],
                    "thresholds": [],
                    "timeFrom": null,
                    "timeShift": null,
                    "title": "Write Query Response Time Distribution",
                    "tooltip": {
                        "msResolution": false,
                        "shared": true,
                        "sort": 0,
                        "value_type": "individual"
                    },
                    "transparent": false,
                    "type": "graph",
                    "xaxis": {
                        "mode": "time",
                        "name": null,
                        "show": true,
                        "values": []
                    },
                    "yaxes": [
                        {
                            "format": "ops",
                            "logBase": 1,
                            "max": null,
                            "min": 0,
                            "show": true
                        },
                        {
                            "format": "ops",
                            "logBase": 1,
                            "max": null,
                            "min": 0,
                            "show": true
                        }
                    ]
                }
            ],
            "repeat": null,
            "repeatIteration": null,
            "repeatRowId": null,
            "showTitle": false,
            "title": "New row",
            "titleSize": "h6"
        }
    ],
    "schemaVersion": 14,
    "style": "dark",
    "tags": [
        "Percona",
        "MySQL"
    ],
    "templating": {
        "list": [
            {
                "allFormat": "glob",
                "auto": true,
                "auto_count": 200,
                "auto_min": "1s",
                "current": {
                    "text": "auto",
                    "value": "$__auto_interval"
                },
                "datasource": "Prometheus",
                "hide": 0,
                "includeAll": false,
                "label": "Interval",
                "multi": false,
                "multiFormat": "glob",
                "name": "interval",
                "options": [
                    {
                        "selected": true,
                        "text": "auto",
                        "value": "$__auto_interval"
                    },
                    {
                        "selected": false,
                        "text": "1s",
                        "value": "1s"
                    },
                    {
                        "selected": false,
                        "text": "5s",
                        "value": "5s"
                    },
                    {
                        "selected": false,
                        "text": "1m",
                        "value": "1m"
                    },
                    {
                        "selected": false,
                        "text": "5m",
                        "value": "5m"
                    },
                    {
                        "selected": false,
                        "text": "1h",
                        "value": "1h"
                    },
                    {
                        "selected": false,
                        "text": "6h",
                        "value": "6h"
                    },
                    {
                        "selected": false,
                        "text": "1d",
                        "value": "1d"
                    }
                ],
                "query": "1s,5s,1m,5m,1h,6h,1d",
                "refresh": 2,
                "type": "interval"
            },
            {
                "allFormat": "glob",
                "allValue": null,
                "datasource": "Prometheus",
                "hide": 0,
                "includeAll": false,
                "label": "Host",
                "multi": false,
                "multiFormat": "glob",
                "name": "host",
                "query": "label_values(mysql_info_schema_query_response_time_seconds_sum, instance)",
                "refresh": 1,
                "regex": "",
                "sort": 1,
                "tagValuesQuery": null,
                "tags": [],
                "tagsQuery": null,
                "type": "query",
                "useTags": false
            }
        ]
    },
    "time": {
        "from": "now-12h",
        "to": "now"
    },
    "timepicker": {
        "collapse": false,
        "enable": true,
        "notice": false,
        "now": true,
        "refresh_intervals": [
            "5s",
            "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": "browser",
    "title": "MySQL Query Response Time",
    "version": 0
}
