Google Cloud Spanner - Database dashboard
Cloud Monitoring | Database dashboard
Cloud Monitoring | Database dashboard
{
  "__inputs": [
    {
      "name": "DS_GOOGLE_CLOUD MONITORING",
      "label": "Google Cloud Monitoring",
      "description": "",
      "type": "datasource",
      "pluginId": "stackdriver",
      "pluginName": "Google Cloud Monitoring"
    },
    {
      "name": "DS_PROMETHEUS",
      "label": "Prometheus",
      "description": "",
      "type": "datasource",
      "pluginId": "prometheus",
      "pluginName": "Prometheus"
    }
  ],
  "__elements": [],
  "__requires": [
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "8.3.1"
    },
    {
      "type": "datasource",
      "id": "prometheus",
      "name": "Prometheus",
      "version": "1.0.0"
    },
    {
      "type": "datasource",
      "id": "stackdriver",
      "name": "Google Cloud Monitoring",
      "version": "1.0.0"
    },
    {
      "type": "panel",
      "id": "timeseries",
      "name": "Time series",
      "version": ""
    }
  ],
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": "-- Grafana --",
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "target": {
          "limit": 100,
          "matchAny": false,
          "tags": [],
          "type": "dashboard"
        },
        "type": "dashboard"
      }
    ]
  },
  "description": "Cloud Monitoring | Database dashboard",
  "editable": true,
  "fiscalYearStartMonth": 0,
  "graphTooltip": 1,
  "id": null,
  "iteration": 1644345132242,
  "links": [
    {
      "asDropdown": false,
      "icon": "external link",
      "includeVars": true,
      "keepTime": true,
      "tags": [
        "cloud-monitoring-instance"
      ],
      "targetBlank": false,
      "title": "Instance",
      "tooltip": "",
      "type": "dashboards",
      "url": ""
    },
    {
      "asDropdown": false,
      "icon": "external link",
      "includeVars": true,
      "keepTime": true,
      "tags": [
        "query-insights"
      ],
      "targetBlank": false,
      "title": "Query Insights",
      "tooltip": "",
      "type": "dashboards",
      "url": ""
    },
    {
      "asDropdown": false,
      "icon": "external link",
      "includeVars": true,
      "keepTime": true,
      "tags": [
        "lock-insights"
      ],
      "targetBlank": false,
      "title": "Lock Insights",
      "tooltip": "",
      "type": "dashboards",
      "url": ""
    },
    {
      "asDropdown": false,
      "icon": "external link",
      "includeVars": true,
      "keepTime": true,
      "tags": [
        "transaction-insights"
      ],
      "targetBlank": false,
      "title": "Transaction Insights",
      "tooltip": "",
      "type": "dashboards",
      "url": ""
    },
    {
      "asDropdown": false,
      "icon": "external link",
      "includeVars": true,
      "keepTime": true,
      "tags": [
        "active-queries-summary"
      ],
      "targetBlank": false,
      "title": "Active Queries Summary",
      "tooltip": "",
      "type": "dashboards",
      "url": ""
    },
    {
      "asDropdown": false,
      "icon": "external link",
      "includeVars": true,
      "keepTime": true,
      "tags": [
        "read-insights"
      ],
      "targetBlank": false,
      "title": "Read Insights",
      "tooltip": "",
      "type": "dashboards",
      "url": ""
    }
  ],
  "liveNow": false,
  "panels": [
    {
      "datasource": {
        "uid": "${DS_GOOGLE_CLOUD MONITORING}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 0,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "auto",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "links": [],
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "percentunit"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byRegexp",
              "options": ".*"
            },
            "properties": [
              {
                "id": "links",
                "value": [
                  {
                    "targetBlank": false,
                    "title": "View Query Insights",
                    "url": "d/cRMUiFvnz/query-insights?﻿${project:queryparam}﻿&﻿${instance:queryparam}﻿&var-database=${__field.labels[\"metric.label.database\"]}&﻿${__url_time_range}"
                  }
                ]
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 0,
        "y": 0
      },
      "id": 2,
      "interval": "1m",
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "multi"
        }
      },
      "targets": [
        {
          "metricQuery": {
            "aliasBy": "{{metric.label.database}}",
            "alignmentPeriod": "cloud-monitoring-auto",
            "crossSeriesReducer": "REDUCE_MEAN",
            "editorMode": "mql",
            "filters": [],
            "groupBys": [],
            "metricKind": "GAUGE",
            "metricType": "",
            "perSeriesAligner": "ALIGN_MEAN",
            "preprocessor": "none",
            "projectName": "$project",
            "query": "fetch spanner_instance\n| metric 'spanner.googleapis.com/instance/cpu/utilization'\n| filter\n    resource.instance_id == '$instance' && metric.database =~ '$database'\n| group_by 1m,\n    [value_utilization_mean: mean(value.utilization )]\n| every 1m\n| group_by [metric.database],\n    [value_utilization_mean_aggregate:\n       aggregate(value_utilization_mean)]\n",
            "valueType": ""
          },
          "queryType": "metrics",
          "refId": "Total CPU utilization",
          "sloQuery": {
            "aliasBy": "",
            "alignmentPeriod": "cloud-monitoring-auto",
            "perSeriesAligner": "ALIGN_MEAN",
            "projectName": "$project",
            "selectorName": "select_slo_health",
            "serviceId": "",
            "serviceName": "",
            "sloId": "",
            "sloName": ""
          }
        }
      ],
      "title": "Total CPU utilization",
      "type": "timeseries"
    },
    {
      "datasource": {
        "uid": "${DS_PROMETHEUS}"
      },
      "description": "",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 0,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "auto",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "links": [
            {
              "title": "View Lock Insights",
              "url": "/d/Z3mSctD7z/lock-insights?﻿var-project=${__field.labels.project_id}&var-instance=${__field.labels.instance_id}&var-database=${__field.labels.database}&﻿${__url_time_range}"
            }
          ],
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "s"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 12,
        "y": 0
      },
      "id": 13,
      "interval": "1m",
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "multi"
        }
      },
      "pluginVersion": "8.0.4",
      "targets": [
        {
          "exemplar": false,
          "expr": "database_spanner_lock_stats_total_total_lock_wait_seconds{database=~\"$database\",instance_id=~\"$instance\",project_id=~\"$project\"}",
          "format": "time_series",
          "instant": false,
          "interval": "",
          "intervalFactor": 1,
          "legendFormat": "{{database}}",
          "queryType": "randomWalk",
          "refId": "A"
        }
      ],
      "title": "Total lock wait",
      "type": "timeseries"
    },
    {
      "datasource": {
        "uid": "${DS_GOOGLE_CLOUD MONITORING}"
      },
      "description": "",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 0,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "auto",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "s"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 0,
        "y": 8
      },
      "id": 5,
      "interval": "1m",
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "multi"
        }
      },
      "targets": [
        {
          "metricQuery": {
            "aliasBy": "{{metric.label.database}}",
            "alignmentPeriod": "cloud-monitoring-auto",
            "crossSeriesReducer": "REDUCE_MEAN",
            "editorMode": "mql",
            "filters": [],
            "groupBys": [],
            "metricKind": "GAUGE",
            "metricType": "",
            "perSeriesAligner": "ALIGN_MEAN",
            "preprocessor": "none",
            "projectName": "$project",
            "query": "fetch spanner_instance\n| metric 'spanner.googleapis.com/api/request_latencies'\n| filter\n    resource.instance_id == '$instance'\n    &&\n    metric.method == 'Commit'\n    && metric.database =~ '$database'\n| group_by 1m,\n    [value_request_latencies_aggregate: aggregate(value.request_latencies)]\n| every 1m\n| group_by [metric.database],\n    [value_request_latencies_aggregate_percentile:\n       percentile(value_request_latencies_aggregate, $latencyPercentile)]\n",
            "valueType": ""
          },
          "queryType": "metrics",
          "refId": "Write latency percentile",
          "sloQuery": {
            "aliasBy": "",
            "alignmentPeriod": "cloud-monitoring-auto",
            "perSeriesAligner": "ALIGN_MEAN",
            "projectName": "$project",
            "selectorName": "select_slo_health",
            "serviceId": "",
            "serviceName": "",
            "sloId": "",
            "sloName": ""
          }
        }
      ],
      "title": "Write latency - $latencyPercentile",
      "type": "timeseries"
    },
    {
      "datasource": {
        "uid": "${DS_GOOGLE_CLOUD MONITORING}"
      },
      "description": "",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 0,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "auto",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "s"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 12,
        "y": 8
      },
      "id": 4,
      "interval": "1m",
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "multi"
        }
      },
      "targets": [
        {
          "metricQuery": {
            "aliasBy": "{{metric.label.database}}",
            "alignmentPeriod": "cloud-monitoring-auto",
            "crossSeriesReducer": "REDUCE_MEAN",
            "editorMode": "mql",
            "filters": [],
            "groupBys": [],
            "metricKind": "GAUGE",
            "metricType": "",
            "perSeriesAligner": "ALIGN_MEAN",
            "preprocessor": "none",
            "projectName": "$project",
            "query": "fetch spanner_instance\n| metric 'spanner.googleapis.com/api/request_latencies'\n| filter\n    resource.instance_id == '$instance'\n    &&\n     metric.method\n     =~ 'ExecuteBatchDml|ExecuteSql|ExecuteStreamingSql|Read|StreamingRead'\n    && metric.database =~ '$database'\n| group_by 1m,\n    [value_request_latencies_aggregate: aggregate(value.request_latencies)]\n| every 1m\n| group_by [metric.database],\n    [value_request_latencies_aggregate_percentile:\n       percentile(value_request_latencies_aggregate, $latencyPercentile)]\n",
            "valueType": ""
          },
          "queryType": "metrics",
          "refId": "Read latency percentile",
          "sloQuery": {
            "aliasBy": "",
            "alignmentPeriod": "cloud-monitoring-auto",
            "perSeriesAligner": "ALIGN_MEAN",
            "projectName": "$project",
            "selectorName": "select_slo_health",
            "serviceId": "",
            "serviceName": "",
            "sloId": "",
            "sloName": ""
          }
        }
      ],
      "title": "Read latency - $latencyPercentile",
      "type": "timeseries"
    },
    {
      "datasource": {
        "uid": "${DS_GOOGLE_CLOUD MONITORING}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 0,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "auto",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "ops"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 0,
        "y": 16
      },
      "id": 8,
      "interval": "1m",
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "multi"
        }
      },
      "targets": [
        {
          "metricQuery": {
            "aliasBy": "{{metric.label.database}}",
            "alignmentPeriod": "cloud-monitoring-auto",
            "crossSeriesReducer": "REDUCE_MEAN",
            "editorMode": "mql",
            "filters": [],
            "groupBys": [],
            "metricKind": "GAUGE",
            "metricType": "",
            "perSeriesAligner": "ALIGN_MEAN",
            "preprocessor": "none",
            "projectName": "$project",
            "query": "fetch spanner_instance\n| metric 'spanner.googleapis.com/api/api_request_count'\n| filter\n    (resource.instance_id == '$instance')\n    &&\n    (metric.method == 'Commit')\n    && metric.database =~ '$database'\n| align rate(1m)\n| every 1m\n| group_by [metric.database],\n    [value_api_request_count_aggregate: aggregate(value.api_request_count)]\n",
            "valueType": ""
          },
          "queryType": "metrics",
          "refId": "Write operations per second",
          "sloQuery": {
            "aliasBy": "",
            "alignmentPeriod": "cloud-monitoring-auto",
            "perSeriesAligner": "ALIGN_MEAN",
            "projectName": "$project",
            "selectorName": "select_slo_health",
            "serviceId": "",
            "serviceName": "",
            "sloId": "",
            "sloName": ""
          }
        }
      ],
      "title": "Write operations per second",
      "type": "timeseries"
    },
    {
      "datasource": {
        "uid": "${DS_GOOGLE_CLOUD MONITORING}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 0,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "auto",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "ops"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 12,
        "y": 16
      },
      "id": 7,
      "interval": "1m",
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "multi"
        }
      },
      "targets": [
        {
          "metricQuery": {
            "aliasBy": "{{metric.label.database}}",
            "alignmentPeriod": "cloud-monitoring-auto",
            "crossSeriesReducer": "REDUCE_MEAN",
            "editorMode": "mql",
            "filters": [],
            "groupBys": [],
            "metricKind": "GAUGE",
            "metricType": "",
            "perSeriesAligner": "ALIGN_MEAN",
            "preprocessor": "none",
            "projectName": "$project",
            "query": "fetch spanner_instance\n| metric 'spanner.googleapis.com/api/api_request_count'\n| filter\n    (resource.instance_id == '$instance')\n    &&\n    (metric.method\n     =~ 'ExecuteBatchDml|ExecuteSql|ExecuteStreamingSql|Read|StreamingRead')\n    && metric.database =~ '$database'\n| align rate(1m)\n| every 1m\n| group_by [metric.database],\n    [value_api_request_count_aggregate: aggregate(value.api_request_count)]\n",
            "valueType": ""
          },
          "queryType": "metrics",
          "refId": "Read operations per second",
          "sloQuery": {
            "aliasBy": "",
            "alignmentPeriod": "cloud-monitoring-auto",
            "perSeriesAligner": "ALIGN_MEAN",
            "projectName": "$project",
            "selectorName": "select_slo_health",
            "serviceId": "",
            "serviceName": "",
            "sloId": "",
            "sloName": ""
          }
        }
      ],
      "title": "Read operations per second",
      "type": "timeseries"
    },
    {
      "datasource": {
        "uid": "${DS_GOOGLE_CLOUD MONITORING}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 0,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "auto",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "Bps"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 0,
        "y": 24
      },
      "id": 11,
      "interval": "1m",
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "multi"
        }
      },
      "targets": [
        {
          "metricQuery": {
            "aliasBy": "{{metric.label.database}}",
            "alignmentPeriod": "cloud-monitoring-auto",
            "crossSeriesReducer": "REDUCE_MEAN",
            "editorMode": "mql",
            "filters": [],
            "groupBys": [],
            "metricKind": "GAUGE",
            "metricType": "",
            "perSeriesAligner": "ALIGN_MEAN",
            "preprocessor": "none",
            "projectName": "$project",
            "query": "fetch spanner_instance\n| metric 'spanner.googleapis.com/api/received_bytes_count'\n| filter\n    (resource.instance_id == '$instance')\n    && (metric.method = 'Commit')\n    && metric.database =~ '$database'\n| align rate(1m)\n| every 1m\n| group_by [metric.database],\n    [value_received_bytes_count_aggregate: aggregate(value.received_bytes_count)]\n",
            "valueType": ""
          },
          "queryType": "metrics",
          "refId": "Write throughput",
          "sloQuery": {
            "aliasBy": "",
            "alignmentPeriod": "cloud-monitoring-auto",
            "perSeriesAligner": "ALIGN_MEAN",
            "projectName": "$project",
            "selectorName": "select_slo_health",
            "serviceId": "",
            "serviceName": "",
            "sloId": "",
            "sloName": ""
          }
        }
      ],
      "title": "Write throughput",
      "type": "timeseries"
    },
    {
      "datasource": {
        "uid": "${DS_GOOGLE_CLOUD MONITORING}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 0,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "auto",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "Bps"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 12,
        "y": 24
      },
      "id": 10,
      "interval": "1m",
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "multi"
        }
      },
      "targets": [
        {
          "metricQuery": {
            "aliasBy": "{{metric.label.database}}",
            "alignmentPeriod": "cloud-monitoring-auto",
            "crossSeriesReducer": "REDUCE_MEAN",
            "editorMode": "mql",
            "filters": [],
            "groupBys": [],
            "metricKind": "GAUGE",
            "metricType": "",
            "perSeriesAligner": "ALIGN_MEAN",
            "preprocessor": "none",
            "projectName": "$project",
            "query": "fetch spanner_instance\n| metric 'spanner.googleapis.com/api/sent_bytes_count'\n| filter\n    (resource.instance_id == '$instance')\n    && (metric.method =~ 'ExecuteBatchDml|ExecuteSql|ExecuteStreamingSql|Read|StreamingRead')\n    && metric.database =~ '$database'\n| align rate(1m)\n| every 1m\n| group_by [metric.database],\n    [value_sent_bytes_count_aggregate: aggregate(value.sent_bytes_count)]\n",
            "valueType": ""
          },
          "queryType": "metrics",
          "refId": "Read throughput",
          "sloQuery": {
            "aliasBy": "",
            "alignmentPeriod": "cloud-monitoring-auto",
            "perSeriesAligner": "ALIGN_MEAN",
            "projectName": "$project",
            "selectorName": "select_slo_health",
            "serviceId": "",
            "serviceName": "",
            "sloId": "",
            "sloName": ""
          }
        }
      ],
      "title": "Read throughput",
      "type": "timeseries"
    }
  ],
  "refresh": "1m",
  "schemaVersion": 33,
  "style": "dark",
  "tags": [
    "cloud-monitoring-database"
  ],
  "templating": {
    "list": [
      {
        "current": {
          "selected": false,
          "text": "Google Cloud Monitoring",
          "value": "Google Cloud Monitoring"
        },
        "description": "Google Cloud Monitoring data source",
        "hide": 0,
        "includeAll": false,
        "label": "Cloud Monitoring",
        "multi": false,
        "name": "gcmds",
        "options": [],
        "query": "stackdriver",
        "queryValue": "",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "type": "datasource"
      },
      {
        "current": {
          "selected": false,
          "text": "Prometheus",
          "value": "Prometheus"
        },
        "description": "Prometheus data source",
        "hide": 0,
        "includeAll": false,
        "label": "Prometheus",
        "multi": false,
        "name": "pds",
        "options": [],
        "query": "prometheus",
        "queryValue": "",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "type": "datasource"
      },
      {
        "current": {},
        "datasource": {
          "uid": "${DS_GOOGLE_CLOUD MONITORING}"
        },
        "definition": "",
        "hide": 0,
        "includeAll": false,
        "label": "Project",
        "multi": false,
        "name": "project",
        "options": [],
        "query": {
          "labelKey": "resource.label.project_id",
          "loading": false,
          "projectName": "$project",
          "refId": "CloudMonitoringVariableQueryEditor-VariableQuery",
          "selectedQueryType": "projects",
          "selectedSLOService": "",
          "selectedService": "spanner.googleapis.com",
          "sloServices": []
        },
        "refresh": 1,
        "regex": "(.*)",
        "skipUrlSync": false,
        "sort": 0,
        "type": "query"
      },
      {
        "current": {},
        "datasource": {
          "uid": "${DS_GOOGLE_CLOUD MONITORING}"
        },
        "definition": "",
        "description": "Instance",
        "hide": 0,
        "includeAll": false,
        "label": "Instance",
        "multi": false,
        "name": "instance",
        "options": [],
        "query": {
          "labelKey": "resource.label.instance_id",
          "loading": false,
          "projectName": "$project",
          "refId": "CloudMonitoringVariableQueryEditor-VariableQuery",
          "selectedMetricType": "spanner.googleapis.com/instance/node_count",
          "selectedQueryType": "labelValues",
          "selectedSLOService": "",
          "selectedService": "spanner.googleapis.com",
          "sloServices": []
        },
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 1,
        "type": "query"
      },
      {
        "allValue": ".*",
        "current": {},
        "datasource": {
          "uid": "${DS_GOOGLE_CLOUD MONITORING}"
        },
        "definition": "",
        "hide": 0,
        "includeAll": true,
        "label": "Database",
        "multi": false,
        "name": "database",
        "options": [],
        "query": {
          "labelKey": "metric.label.database",
          "loading": false,
          "projectName": "$project",
          "projects": [],
          "refId": "CloudMonitoringVariableQueryEditor-VariableQuery",
          "selectedMetricType": "spanner.googleapis.com/instance/cpu/utilization",
          "selectedQueryType": "labelValues",
          "selectedSLOService": "",
          "selectedService": "spanner.googleapis.com",
          "sloServices": []
        },
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 1,
        "type": "query"
      },
      {
        "current": {
          "selected": false,
          "text": "99th percentile",
          "value": "99"
        },
        "hide": 0,
        "includeAll": false,
        "label": "Latency percentile",
        "multi": false,
        "name": "latencyPercentile",
        "options": [
          {
            "selected": true,
            "text": "99th percentile",
            "value": "99"
          },
          {
            "selected": false,
            "text": "50th percentile",
            "value": "50"
          }
        ],
        "query": "99th percentile : 99, 50th percentile : 50",
        "queryValue": "",
        "skipUrlSync": false,
        "type": "custom"
      }
    ]
  },
  "time": {
    "from": "now-1h",
    "to": "now"
  },
  "timepicker": {},
  "timezone": "",
  "title": "Google Cloud Spanner - Database dashboard",
  "uid": "OTDtBBnnk",
  "version": 1,
  "weekStart": "",
  "gnetId": 15722
}