Grafana dashboard: 2MySQL  Simple Dashboard
Description: My MySQL simple dashboard

I know... it's just an other MySQL dashboard!
But it doesn't need any collection tool since it uses a simple stored routine scheduled by MySQL itself
available here: https://github.com/meob/my2Collector

{
  "__inputs": [
    {
      "name": "DS_MYMYSQL",
      "label": "MyMySQL",
      "description": "",
      "type": "datasource",
      "pluginId": "mysql",
      "pluginName": "MySQL"
    }
  ],
  "__requires": [
    {
      "type": "panel",
      "id": "gauge",
      "name": "Gauge",
      "version": ""
    },
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "8.1.2"
    },
    {
      "type": "panel",
      "id": "graph",
      "name": "Graph (old)",
      "version": ""
    },
    {
      "type": "panel",
      "id": "heatmap",
      "name": "Heatmap",
      "version": ""
    },
    {
      "type": "datasource",
      "id": "mysql",
      "name": "MySQL",
      "version": "1.0.0"
    },
    {
      "type": "panel",
      "id": "stat",
      "name": "Stat",
      "version": ""
    },
    {
      "type": "panel",
      "id": "text",
      "name": "Text",
      "version": ""
    }
  ],
  "annotations": {
    "list": [
      {
        "$$hashKey": "object:1657",
        "builtIn": 1,
        "datasource": "-- Grafana --",
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "limit": 100,
        "name": "Annotations & Alerts",
        "showIn": 0,
        "target": {
          "limit": 100,
          "matchAny": false,
          "tags": [],
          "type": "dashboard"
        },
        "type": "dashboard"
      }
    ]
  },
  "description": "My MySQL simple dashboard",
  "editable": true,
  "gnetId": 7991,
  "graphTooltip": 1,
  "id": null,
  "iteration": 1630308714917,
  "links": [
    {
      "$$hashKey": "object:109",
      "asDropdown": true,
      "icon": "external link",
      "includeVars": true,
      "tags": [
        "MyMySQL"
      ],
      "title": "My Tools",
      "type": "dashboards"
    },
    {
      "$$hashKey": "object:110",
      "icon": "external link",
      "includeVars": false,
      "tags": [],
      "targetBlank": true,
      "title": "Meo's Site",
      "type": "link",
      "url": "https://www.xenialab.it/meo/web/index5.htm#my"
    }
  ],
  "panels": [
    {
      "datasource": "${DS_MYMYSQL}",
      "gridPos": {
        "h": 2,
        "w": 20,
        "x": 0,
        "y": 0
      },
      "id": 32,
      "links": [],
      "options": {
        "content": "<div style=\"text-align: center;\">$MyInstance -- <b>$MyVar</b></div>",
        "mode": "html"
      },
      "pluginVersion": "8.1.2",
      "targets": [
        {
          "format": "time_series",
          "group": [],
          "metricColumn": "none",
          "rawQuery": false,
          "rawSql": "SELECT\n  c1 AS \"time\",\n  v1\nFROM mylog\nWHERE\n  $__timeFilter(c1)\nORDER BY c1",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "v1"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "mylog",
          "timeColumn": "c1",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "title": "Connection Info",
      "transparent": true,
      "type": "text"
    },
    {
      "cacheTimeout": null,
      "datasource": "$MyInstance",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [
            {
              "options": {
                "match": "null",
                "result": {
                  "text": "N/A"
                }
              },
              "type": "special"
            }
          ],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 2,
        "w": 4,
        "x": 20,
        "y": 0
      },
      "id": 20,
      "interval": null,
      "links": [],
      "maxDataPoints": 100,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "horizontal",
        "reduceOptions": {
          "calcs": [
            "mean"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "8.1.2",
      "targets": [
        {
          "alias": "",
          "format": "time_series",
          "group": [],
          "hide": false,
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "SELECT\n  UNIX_TIMESTAMP(timest) as time_sec,\n  variable_value/600 as value\nFROM my2.status\nWHERE $__timeFilter(timest)\n  AND variable_name='CONNECTIONS-d'\n  AND variable_value>=0\nORDER BY timest ASC\n",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "column"
              }
            ]
          ],
          "timeColumn": "time",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "title": "Connections/sec",
      "transparent": true,
      "type": "stat"
    },
    {
      "aliasColors": {
        "ABORTED_CLIENTS": "#bf1b00",
        "ABORTED_CLIENTS-d": "#890f02",
        "ABORTED_CONNECTS": "#f29191",
        "Aborted_clients-d": "#c15c17",
        "Aborted_connects-d": "#cca300",
        "SLOW_QUERIES": "#e24d42",
        "SLOW_QUERIES-d": "#cca300",
        "Slow_queries": "#99440a",
        "Slow_queries-d": "#890f02",
        "THREADS_CONNECTED": "#3f6833",
        "THREADS_RUNNING": "#cca300",
        "Threads_connected": "#64b0c8"
      },
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "$MyInstance",
      "fieldConfig": {
        "defaults": {
          "links": []
        },
        "overrides": []
      },
      "fill": 5,
      "fillGradient": 0,
      "gridPos": {
        "h": 6,
        "w": 10,
        "x": 0,
        "y": 2
      },
      "hiddenSeries": false,
      "id": 2,
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "null as zero",
      "options": {
        "alertThreshold": true
      },
      "paceLength": 10,
      "percentage": false,
      "pluginVersion": "8.1.2",
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [
        {
          "$$hashKey": "object:730",
          "alias": "SLOW_QUERIES",
          "fill": 0,
          "yaxis": 2
        },
        {
          "$$hashKey": "object:731",
          "alias": "ABORTED_CLIENTS",
          "fill": 0,
          "yaxis": 2
        },
        {
          "$$hashKey": "object:732",
          "alias": "ABORTED_CONNECTS",
          "fill": 0,
          "yaxis": 2
        }
      ],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "alias": "",
          "format": "time_series",
          "group": [],
          "hide": false,
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "SELECT $__timeGroup(timest, '10m') AS time,\n       variable_name as metric,\n       avg(variable_value+0) as value\n  FROM my2.status\n WHERE $__timeFilter(timest)\n   AND variable_name in ('THREADS_CONNECTED', 'THREADS_RUNNING')\n GROUP BY 1,2\n ORDER BY 1 ASC",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "column"
              }
            ]
          ],
          "timeColumn": "time",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        },
        {
          "alias": "",
          "format": "time_series",
          "group": [],
          "hide": false,
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "SELECT\n  $__timeGroup(timest, '10m') as time,\n  substr(variable_name,1,length(variable_name)-2) as metric,\n  avg(variable_value+0) as value\nFROM my2.status\nWHERE $__timeFilter(timest)\n  and variable_name in ('SLOW_QUERIES-d', 'ABORTED_CONNECTS-d','ABORTED_CLIENTS-d')\n  and variable_value>=0\nGROUP BY 1,2\nORDER BY 1 ASC\n",
          "refId": "B",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "column"
              }
            ]
          ],
          "timeColumn": "time",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [
        {
          "$$hashKey": "object:791",
          "colorMode": "gray",
          "fill": true,
          "fromDayOfWeek": 6,
          "line": false,
          "op": "time",
          "toDayOfWeek": 7
        }
      ],
      "timeShift": null,
      "title": "Threads & Errors",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "$$hashKey": "object:763",
          "decimals": 0,
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": "0",
          "show": true
        },
        {
          "$$hashKey": "object:764",
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": "0",
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "$MyInstance",
      "fieldConfig": {
        "defaults": {
          "links": []
        },
        "overrides": []
      },
      "fill": 1,
      "fillGradient": 0,
      "gridPos": {
        "h": 6,
        "w": 10,
        "x": 10,
        "y": 2
      },
      "hiddenSeries": false,
      "id": 4,
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 3,
      "links": [],
      "nullPointMode": "null",
      "options": {
        "alertThreshold": true
      },
      "paceLength": 10,
      "percentage": false,
      "pluginVersion": "8.1.2",
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [
        {
          "$$hashKey": "object:1850",
          "alias": "SIZEDB.TOTAL",
          "yaxis": 2
        }
      ],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "alias": "",
          "format": "time_series",
          "group": [],
          "hide": false,
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "SELECT\n  $__timeGroup(timest,'24h') as time,\n  variable_name as metric,\n  avg(variable_value+0) as value\nFROM my2.status\nWHERE $__timeFilter(timest)\n  and variable_name in ('SIZEDB.TOTAL')\nGROUP BY 1,2\nORDER BY 1 ASC\n",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "column"
              }
            ]
          ],
          "timeColumn": "time",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "thresholds": [],
      "timeFrom": "180d",
      "timeRegions": [
        {
          "$$hashKey": "object:1888",
          "colorMode": "gray",
          "fill": true,
          "fromDayOfWeek": 6,
          "line": false,
          "op": "time",
          "toDayOfWeek": 7
        }
      ],
      "timeShift": null,
      "title": "Space usage",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "$$hashKey": "object:1863",
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": false
        },
        {
          "$$hashKey": "object:1864",
          "format": "decbytes",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": "0",
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "cacheTimeout": null,
      "datasource": "$MyInstance",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [
            {
              "options": {
                "match": "null",
                "result": {
                  "text": "N/A"
                }
              },
              "type": "special"
            }
          ],
          "max": 100,
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "#d44a3a",
                "value": null
              },
              {
                "color": "rgba(237, 129, 40, 0.89)",
                "value": 95
              },
              {
                "color": "#299c46",
                "value": 98
              }
            ]
          },
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 4,
        "x": 20,
        "y": 2
      },
      "id": 41,
      "interval": null,
      "links": [],
      "maxDataPoints": 100,
      "options": {
        "orientation": "horizontal",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "showThresholdLabels": false,
        "showThresholdMarkers": true,
        "text": {}
      },
      "pluginVersion": "8.1.2",
      "targets": [
        {
          "alias": "",
          "format": "time_series",
          "group": [],
          "hide": false,
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "SELECT $__timeGroup(s1.timest,'30m') as time_sec,\n  avg(1-s1.variable_value/s2.variable_value)*100 as value\nFROM my2.status s1,  my2.status s2\nWHERE $__timeFilter(s1.timest)\n  AND s1.timest=s2.timest\n  AND s1.variable_name='INNODB_BUFFER_POOL_READS-d'\n  AND s2.variable_name='INNODB_BUFFER_POOL_READ_REQUESTS-d'\n  AND s2.variable_value>0\nGROUP BY 1\nORDER BY 1 ASC\n",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "column"
              }
            ]
          ],
          "timeColumn": "time",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "title": "InnoDB Cache Hit",
      "type": "gauge"
    },
    {
      "cacheTimeout": null,
      "datasource": "$MyInstance",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [
            {
              "options": {
                "match": "null",
                "result": {
                  "text": "N/A"
                }
              },
              "type": "special"
            }
          ],
          "max": 100,
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "#d44a3a",
                "value": null
              },
              {
                "color": "rgba(237, 129, 40, 0.89)",
                "value": 95
              },
              {
                "color": "#299c46",
                "value": 98
              }
            ]
          },
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 3,
        "w": 4,
        "x": 20,
        "y": 6
      },
      "id": 42,
      "interval": null,
      "links": [],
      "maxDataPoints": 100,
      "options": {
        "orientation": "horizontal",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "showThresholdLabels": false,
        "showThresholdMarkers": true,
        "text": {}
      },
      "pluginVersion": "8.1.2",
      "targets": [
        {
          "alias": "",
          "format": "time_series",
          "group": [],
          "hide": false,
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "SELECT $__timeGroup(s1.timest,'30m') as time_sec,\n  avg(1-s1.variable_value/s2.variable_value)*100 as value\nFROM my2.status s1,  my2.status s2\nWHERE $__timeFilter(s1.timest)\n  AND s1.timest=s2.timest\n  AND s1.variable_name='KEY_READS-d'\n  AND s2.variable_name='KEY_READ_REQUESTS-d'\n  AND s2.variable_value>0\nGROUP BY 1\nORDER BY 1 ASC\n",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "column"
              }
            ]
          ],
          "timeColumn": "time",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "title": "MyISAM Cache Hit",
      "type": "gauge"
    },
    {
      "aliasColors": {
        "DELETE": "#bf1b00",
        "DELETE_MULTI": "#bf1b00",
        "INSERT": "#629e51",
        "INSERT_SELECT": "#3f6833",
        "SELECT": "#5195ce",
        "UPDATE": "#cca300",
        "UPDATE_MULTI": "#f2c96d"
      },
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "$MyInstance",
      "fieldConfig": {
        "defaults": {
          "links": []
        },
        "overrides": []
      },
      "fill": 5,
      "fillGradient": 0,
      "gridPos": {
        "h": 6,
        "w": 10,
        "x": 0,
        "y": 8
      },
      "hiddenSeries": false,
      "id": 6,
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "null as zero",
      "options": {
        "alertThreshold": true
      },
      "paceLength": 10,
      "percentage": false,
      "pluginVersion": "8.1.2",
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [
        {
          "alias": "SELECT",
          "yaxis": 1
        }
      ],
      "spaceLength": 10,
      "stack": true,
      "steppedLine": false,
      "targets": [
        {
          "alias": "",
          "format": "time_series",
          "group": [],
          "hide": false,
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "SELECT $__timeGroup(timest, '10m') AS time,\n       substr(variable_name,5,length(variable_name)-6) as metric,\n       avg(variable_value/600) as value\n  FROM my2.status\n WHERE $__timeFilter(timest)\n   and variable_name in ('COM_SELECT-d', 'COM_INSERT-d', 'COM_UPDATE-d', 'COM_DELETE-d')\n   and variable_value >=0\n GROUP BY 1,2\n ORDER BY 1 ASC\n",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "column"
              }
            ]
          ],
          "timeColumn": "time",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [
        {
          "colorMode": "gray",
          "fill": true,
          "fromDayOfWeek": 6,
          "line": false,
          "op": "time",
          "toDayOfWeek": 7
        }
      ],
      "timeShift": null,
      "title": "SQL Commands /sec",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "$$hashKey": "object:118",
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "$$hashKey": "object:119",
          "format": "ops",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "$MyInstance",
      "fieldConfig": {
        "defaults": {
          "links": []
        },
        "overrides": []
      },
      "fill": 1,
      "fillGradient": 0,
      "gridPos": {
        "h": 6,
        "w": 10,
        "x": 10,
        "y": 8
      },
      "hiddenSeries": false,
      "id": 8,
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "null",
      "options": {
        "alertThreshold": true
      },
      "paceLength": 10,
      "percentage": false,
      "pluginVersion": "8.1.2",
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [
        {
          "alias": "BYTES_SENT-d",
          "yaxis": 2
        },
        {
          "alias": "BYTES_RECEIVED-d",
          "transform": "negative-Y",
          "yaxis": 2
        }
      ],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "alias": "",
          "format": "time_series",
          "group": [],
          "hide": false,
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "SELECT $__timeGroup(timest, '10m') AS time,\n       variable_name as metric,\n       avg(variable_value+0)/600 as value\n  FROM my2.status\n WHERE $__timeFilter(timest)\n   and variable_name in ('Bytes_received-d', 'Bytes_sent-d')\n GROUP BY 1,2\n ORDER BY 1 ASC\n",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "column"
              }
            ]
          ],
          "timeColumn": "time",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [
        {
          "colorMode": "gray",
          "fill": true,
          "fromDayOfWeek": 6,
          "line": false,
          "op": "time",
          "toDayOfWeek": 7
        }
      ],
      "timeShift": null,
      "title": "Network",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": false
        },
        {
          "format": "Bps",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "cacheTimeout": null,
      "datasource": "$MyInstance",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [
            {
              "options": {
                "match": "null",
                "result": {
                  "text": "N/A"
                }
              },
              "type": "special"
            }
          ],
          "max": 100,
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "#d44a3a",
                "value": null
              },
              {
                "color": "rgba(237, 129, 40, 0.89)",
                "value": 30
              },
              {
                "color": "#299c46",
                "value": 50
              }
            ]
          },
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 3,
        "w": 4,
        "x": 20,
        "y": 9
      },
      "id": 43,
      "interval": null,
      "links": [],
      "maxDataPoints": 100,
      "options": {
        "orientation": "horizontal",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "showThresholdLabels": false,
        "showThresholdMarkers": true,
        "text": {}
      },
      "pluginVersion": "8.1.2",
      "targets": [
        {
          "alias": "",
          "format": "time_series",
          "group": [],
          "hide": false,
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "SELECT $__timeGroup(s1.timest,'30m') as time_sec,\n  avg((s1.variable_value/(s1.variable_value+s2.variable_value))*100) as value\nFROM my2.status s1,  my2.status s2\nWHERE $__timeFilter(s1.timest)\n  AND s1.timest=s2.timest\n  AND s1.variable_name='QCACHE_HITS-d'\n  AND s2.variable_name='COM_SELECT-d'\n  AND s2.variable_value>0\nGROUP BY 1\nORDER BY 1 ASC\n\n\n\n",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "column"
              }
            ]
          ],
          "timeColumn": "time",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "title": "Query Cache Hit",
      "type": "gauge"
    },
    {
      "cacheTimeout": null,
      "datasource": "$MyInstance",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "#d44a3a",
                "value": null
              },
              {
                "color": "rgba(237, 129, 40, 0.89)",
                "value": 0.5
              },
              {
                "color": "#299c46",
                "value": 0.6
              }
            ]
          },
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 2,
        "w": 4,
        "x": 20,
        "y": 12
      },
      "id": 36,
      "interval": null,
      "links": [],
      "maxDataPoints": 100,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "horizontal",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "8.1.2",
      "targets": [
        {
          "alias": "",
          "format": "time_series",
          "group": [],
          "hide": false,
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "SELECT\n  UNIX_TIMESTAMP(timest) as time_sec,\n  sum(variable_value+0) as value\nFROM my2.status\nWHERE $__timeFilter(timest)\n  AND variable_name like 'PROCESSES_COMMAND.Binlog Dump%'\nGROUP BY timest\nORDER BY timest ASC\n",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "column"
              }
            ]
          ],
          "timeColumn": "time",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "title": "Master - Connected Slaves",
      "type": "stat"
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "$MyInstance",
      "fieldConfig": {
        "defaults": {
          "links": []
        },
        "overrides": []
      },
      "fill": 2,
      "fillGradient": 0,
      "gridPos": {
        "h": 6,
        "w": 10,
        "x": 0,
        "y": 14
      },
      "hiddenSeries": false,
      "id": 10,
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 2,
      "links": [],
      "nullPointMode": "null",
      "options": {
        "alertThreshold": true
      },
      "paceLength": 10,
      "percentage": false,
      "pluginVersion": "8.1.2",
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [
        {
          "alias": "/_sec/",
          "color": "#3f6833",
          "yaxis": 2
        }
      ],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "alias": "",
          "format": "time_series",
          "group": [],
          "hide": false,
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "SELECT\n  UNIX_TIMESTAMP(timest) as time,\n  variable_value+0 as value, variable_value/600 as value_sec,\n  variable_name as metric\nFROM my2.status\nWHERE $__timeFilter(timest)\n  and variable_name in ($MyStatistics)\nORDER BY timest ASC\n",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "column"
              }
            ]
          ],
          "timeColumn": "time",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [
        {
          "colorMode": "gray",
          "fill": true,
          "fromDayOfWeek": 6,
          "line": false,
          "op": "time",
          "toDayOfWeek": 7
        }
      ],
      "timeShift": null,
      "title": "Custom Statistic",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "format": "short",
          "label": "",
          "logBase": 1,
          "max": null,
          "min": "0",
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "cards": {
        "cardPadding": null,
        "cardRound": null
      },
      "color": {
        "cardColor": "#b4ff00",
        "colorScale": "sqrt",
        "colorScheme": "interpolateRdYlGn",
        "exponent": 0.5,
        "max": null,
        "min": null,
        "mode": "spectrum"
      },
      "dataFormat": "tsbuckets",
      "datasource": "$MyInstance",
      "gridPos": {
        "h": 6,
        "w": 10,
        "x": 10,
        "y": 14
      },
      "heatmap": {},
      "hideTimeOverride": false,
      "hideZeroBuckets": false,
      "highlightCards": true,
      "id": 18,
      "legend": {
        "show": true
      },
      "links": [],
      "reverseYBuckets": false,
      "targets": [
        {
          "alias": "",
          "format": "time_series",
          "group": [],
          "hide": false,
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "SELECT\n  $__timeGroup(timest, '24h') as time,\n  concat(' ',max(date_format(timest,'%H'))) as metric,\n  sum(variable_value)/3600 as value\nFROM my2.status\nWHERE variable_name='QUERIES-d'\n  and variable_value>0\n  and $__timeFilter(timest)\nGROUP BY $__timeGroup(timest, '1h'),$__timeGroup(timest, '24h')\nORDER BY $__timeGroup(timest, '1h'),$__timeGroup(timest, '24h')\n",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "column"
              }
            ]
          ],
          "timeColumn": "time",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "timeFrom": "14d",
      "timeShift": null,
      "title": "Heatmap (Queries /sec)",
      "tooltip": {
        "show": true,
        "showHistogram": false
      },
      "tooltipDecimals": null,
      "type": "heatmap",
      "xAxis": {
        "show": true
      },
      "xBucketNumber": null,
      "xBucketSize": null,
      "yAxis": {
        "decimals": null,
        "format": "short",
        "logBase": 1,
        "max": null,
        "min": null,
        "show": true,
        "splitFactor": null
      },
      "yBucketBound": "lower",
      "yBucketNumber": null,
      "yBucketSize": null
    },
    {
      "cacheTimeout": null,
      "datasource": "$MyInstance",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [
            {
              "options": {
                "match": "null",
                "result": {
                  "text": "N/A"
                }
              },
              "type": "special"
            }
          ],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "#d44a3a",
                "value": null
              },
              {
                "color": "rgba(237, 129, 40, 0.89)",
                "value": 0.5
              },
              {
                "color": "#299c46",
                "value": 0.6
              }
            ]
          },
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 2,
        "w": 4,
        "x": 20,
        "y": 14
      },
      "id": 37,
      "interval": null,
      "links": [],
      "maxDataPoints": 100,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "horizontal",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "8.1.2",
      "targets": [
        {
          "alias": "",
          "format": "time_series",
          "group": [],
          "hide": false,
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "SELECT\n  UNIX_TIMESTAMP(timest) as time_sec,\n  variable_value+0 as value\nFROM my2.status\nWHERE $__timeFilter(timest)\n  AND variable_name ='replication_connection_status'\nORDER BY timest ASC\n",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "column"
              }
            ]
          ],
          "timeColumn": "time",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "title": "Slave - IO Thread",
      "type": "stat"
    },
    {
      "cacheTimeout": null,
      "datasource": "$MyInstance",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [
            {
              "options": {
                "match": "null",
                "result": {
                  "text": "N/A"
                }
              },
              "type": "special"
            }
          ],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "#d44a3a",
                "value": null
              },
              {
                "color": "rgba(237, 129, 40, 0.89)",
                "value": 0.5
              },
              {
                "color": "#299c46",
                "value": 0.6
              }
            ]
          },
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 2,
        "w": 4,
        "x": 20,
        "y": 16
      },
      "id": 45,
      "interval": null,
      "links": [],
      "maxDataPoints": 100,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "horizontal",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "8.1.2",
      "targets": [
        {
          "alias": "",
          "format": "time_series",
          "group": [],
          "hide": false,
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "SELECT\n  UNIX_TIMESTAMP(timest) as time_sec,\n  variable_value+0 as value\nFROM my2.status\nWHERE $__timeFilter(timest)\n  AND variable_name ='replication_applier_status'\nORDER BY timest ASC\n",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "column"
              }
            ]
          ],
          "timeColumn": "time",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "title": "Slave - SQL Thread",
      "type": "stat"
    },
    {
      "cacheTimeout": null,
      "datasource": "$MyInstance",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [
            {
              "options": {
                "match": "null",
                "result": {
                  "text": "N/A"
                }
              },
              "type": "special"
            }
          ],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "#299c46",
                "value": null
              },
              {
                "color": "rgba(237, 129, 40, 0.89)",
                "value": 0.1
              },
              {
                "color": "#d44a3a",
                "value": 1
              }
            ]
          },
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 2,
        "w": 4,
        "x": 20,
        "y": 18
      },
      "id": 38,
      "interval": null,
      "links": [],
      "maxDataPoints": 100,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "horizontal",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "8.1.2",
      "targets": [
        {
          "alias": "",
          "format": "time_series",
          "group": [],
          "hide": false,
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "SELECT\n  UNIX_TIMESTAMP(timest) as time_sec,\n  variable_value+0 as value\nFROM my2.status\nWHERE $__timeFilter(timest)\n  AND (variable_name ='replication_worker_time' OR variable_name ='replication_max_worker_time')\nORDER BY timest ASC\n",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "column"
              }
            ]
          ],
          "timeColumn": "time",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "title": "Slave - sec. behind Master",
      "type": "stat"
    },
    {
      "datasource": "$MyInstance",
      "gridPos": {
        "h": 1,
        "w": 10,
        "x": 0,
        "y": 20
      },
      "id": 44,
      "links": [],
      "options": {
        "content": "",
        "mode": "html"
      },
      "pluginVersion": "8.1.2",
      "targets": [
        {
          "format": "time_series",
          "group": [],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "SELECT\n  c1 AS \"time\",\n  v1\nFROM mylog\nWHERE\n  $__timeFilter(c1)\nORDER BY c1",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "v1"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "mylog",
          "timeColumn": "c1",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "title": "$MyVar2",
      "transparent": true,
      "type": "text"
    },
    {
      "datasource": "${DS_MYMYSQL}",
      "gridPos": {
        "h": 1,
        "w": 10,
        "x": 10,
        "y": 20
      },
      "id": 46,
      "links": [],
      "options": {
        "content": "<a href=\"https://github.com/meob/my2Collector\">Github</a>",
        "mode": "html"
      },
      "pluginVersion": "8.1.2",
      "targets": [
        {
          "format": "time_series",
          "group": [],
          "metricColumn": "none",
          "rawQuery": false,
          "rawSql": "SELECT\n  c1 AS \"time\",\n  v1\nFROM mylog\nWHERE\n  $__timeFilter(c1)\nORDER BY c1",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "v1"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "mylog",
          "timeColumn": "c1",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "title": "This dashboard uses my2 collector (https://github.com/meob/my2Collector)",
      "transparent": true,
      "type": "text"
    },
    {
      "datasource": "${DS_MYMYSQL}",
      "gridPos": {
        "h": 1,
        "w": 4,
        "x": 20,
        "y": 20
      },
      "id": 40,
      "links": [],
      "options": {
        "content": "<a href=\"https://www.xenialab.it\">XeniaLAB</a>",
        "mode": "html"
      },
      "pluginVersion": "8.1.2",
      "targets": [
        {
          "format": "time_series",
          "group": [],
          "metricColumn": "none",
          "rawQuery": false,
          "rawSql": "SELECT\n  c1 AS \"time\",\n  v1\nFROM mylog\nWHERE\n  $__timeFilter(c1)\nORDER BY c1",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "v1"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "mylog",
          "timeColumn": "c1",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "title": "by XeniaLAB",
      "transparent": true,
      "type": "text"
    }
  ],
  "refresh": false,
  "schemaVersion": 30,
  "style": "dark",
  "tags": [
    "MyMySQL"
  ],
  "templating": {
    "list": [
      {
        "current": {
          "selected": false,
          "text": "MyMySQL",
          "value": "MyMySQL"
        },
        "description": null,
        "error": null,
        "hide": 1,
        "includeAll": false,
        "label": null,
        "multi": false,
        "name": "MyInstance",
        "options": [],
        "query": "mysql",
        "queryValue": "",
        "refresh": 1,
        "regex": "/.*/",
        "skipUrlSync": false,
        "type": "datasource"
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "$MyInstance",
        "definition": "",
        "description": null,
        "error": null,
        "hide": 0,
        "includeAll": false,
        "label": "Custom Statistic",
        "multi": true,
        "name": "MyStatistics",
        "options": [],
        "query": "select distinct variable_name from my2.status where variable_name is not null and variable_name <>'' order by 1",
        "refresh": 2,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "$MyInstance",
        "definition": "select concat( @@hostname,':', @@port)",
        "description": null,
        "error": null,
        "hide": 2,
        "includeAll": false,
        "label": null,
        "multi": false,
        "name": "MyVar",
        "options": [],
        "query": "select concat( @@hostname,':', @@port)",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "$MyInstance",
        "definition": "select concat('MySQL version: ',version(), '   Created at: ', date_format(min(create_time),'%Y-%m-%d %T') ,\n  '  Started at: ', date_format(date_sub(now(), INTERVAL variable_value second),'%Y-%m-%d %T')) info\n  from   information_schema.tables,performance_schema.global_status\n where variable_name='UPTIME'\n group by variable_value\n",
        "description": null,
        "error": null,
        "hide": 2,
        "includeAll": false,
        "label": null,
        "multi": false,
        "name": "MyVar2",
        "options": [],
        "query": "select concat('MySQL version: ',version(), '   Created at: ', date_format(min(create_time),'%Y-%m-%d %T') ,\n  '  Started at: ', date_format(date_sub(now(), INTERVAL variable_value second),'%Y-%m-%d %T')) info\n  from   information_schema.tables,performance_schema.global_status\n where variable_name='UPTIME'\n group by variable_value\n",
        "refresh": 2,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      }
    ]
  },
  "time": {
    "from": "now-7d",
    "to": "now"
  },
  "timepicker": {
    "refresh_intervals": [
      "30s",
      "1m",
      "5m",
      "15m",
      "30m",
      "1h",
      "2h",
      "1d"
    ],
    "time_options": [
      "5m",
      "15m",
      "1h",
      "6h",
      "12h",
      "24h",
      "2d",
      "7d",
      "30d"
    ]
  },
  "timezone": "",
  "title": "2MySQL  Simple Dashboard",
  "uid": "4Z1opp5mk",
  "version": 174
}