From e3ba59200ee4bdcd4d994d4aca41ace4b00bfbbe Mon Sep 17 00:00:00 2001 From: Marcin Gminski <8288333+marcingminski@users.noreply.github.com> Date: Wed, 5 Apr 2023 21:48:24 +0100 Subject: [PATCH] Fix #465 (#471) --- .../Grafana/SQL Instance Overview.json | 6587 +++++++++-------- 1 file changed, 3405 insertions(+), 3182 deletions(-) diff --git a/SqlWatch.Dashboard/Grafana/SQL Instance Overview.json b/SqlWatch.Dashboard/Grafana/SQL Instance Overview.json index 7f0eeffa..eacbba30 100644 --- a/SqlWatch.Dashboard/Grafana/SQL Instance Overview.json +++ b/SqlWatch.Dashboard/Grafana/SQL Instance Overview.json @@ -3,20 +3,28 @@ "list": [ { "builtIn": 1, - "datasource": "-- Grafana --", + "datasource": { + "type": "datasource", + "uid": "grafana" + }, "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, "type": "dashboard" } ] }, "editable": true, - "gnetId": null, + "fiscalYearStartMonth": 0, "graphTooltip": 1, - "id": 33, - "iteration": 1621358421053, + "id": 1, "links": [ { "asDropdown": true, @@ -30,10 +38,14 @@ "type": "dashboards" } ], + "liveNow": false, "panels": [ { - "collapsed": true, - "datasource": null, + "collapsed": false, + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "gridPos": { "h": 1, "w": 24, @@ -41,2203 +53,2295 @@ "y": 0 }, "id": 173, - "panels": [ + "panels": [], + "targets": [ { - "datasource": null, - "fieldConfig": { - "defaults": { - "custom": {} - }, - "overrides": [] - }, - "gridPos": { - "h": 5, - "w": 24, - "x": 0, - "y": 1 + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" }, - "id": 59, - "options": { - "content": "

Overview

\r\n

This dashboard was designed to help you understand what happens in your SQL Server and help you find bottlenecks. A single page view helps correlate various events and makes it easier to spot trends. Like most computer systems, SQL Server relies on the following components to perform well: CPU > Memory > Storage > Network.\r\nIf any of these does not perform well, we may be seeing performance degradation in our database and/or application. We start looking at the tiles from left to right. Although the data flows from right to left (Storage to CPU), in case of slow disks, we may be seeing long latencies, lots of disk tranfers and long Pending Queue and not a lot of CPU activity. In case of poorly optimised queries or general workload problems, we may be seeing lots of CPU activity but not a lot of disk activity.

", - "mode": "html" + "refId": "A" + } + ], + "title": "$sql_instance: SQL Server Overview", + "type": "row" + }, + { + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, + "gridPos": { + "h": 5, + "w": 24, + "x": 0, + "y": 1 + }, + "id": 59, + "options": { + "code": { + "language": "plaintext", + "showLineNumbers": false, + "showMiniMap": false + }, + "content": "

Overview

\r\n

This dashboard was designed to help you understand what happens in your SQL Server and help you find bottlenecks. A single page view helps correlate various events and makes it easier to spot trends. Like most computer systems, SQL Server relies on the following components to perform well: CPU > Memory > Storage > Network.\r\nIf any of these does not perform well, we may be seeing performance degradation in our database and/or application. We start looking at the tiles from left to right. Although the data flows from right to left (Storage to CPU), in case of slow disks, we may be seeing long latencies, lots of disk tranfers and long Pending Queue and not a lot of CPU activity. In case of poorly optimised queries or general workload problems, we may be seeing lots of CPU activity but not a lot of disk activity.

", + "mode": "html" + }, + "pluginVersion": "9.4.7", + "targets": [ + { + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" }, - "pluginVersion": "7.4.2", - "targets": [ - { - "queryType": "randomWalk", - "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "", - "transparent": true, - "type": "text" + "queryType": "randomWalk", + "refId": "A" + } + ], + "transparent": true, + "type": "text" + }, + { + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, + "gridPos": { + "h": 3, + "w": 24, + "x": 0, + "y": 6 + }, + "id": 248, + "options": { + "code": { + "language": "plaintext", + "showLineNumbers": false, + "showMiniMap": false }, + "content": "

$sql_instance

\r\n

$sql_version

", + "mode": "html" + }, + "pluginVersion": "9.4.7", + "targets": [ { - "datasource": null, - "fieldConfig": { - "defaults": { - "custom": {} - }, - "overrides": [] + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" }, - "gridPos": { - "h": 3, - "w": 24, - "x": 0, - "y": 6 + "queryType": "randomWalk", + "refId": "A" + } + ], + "transparent": true, + "type": "text" + }, + { + "datasource": { + "type": "datasource", + "uid": "-- Dashboard --" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" }, - "id": 248, - "options": { - "content": "

$sql_instance

\r\n

$sql_version

", - "mode": "html" + "decimals": 0, + "links": [], + "mappings": [], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green", + "value": null + }, + { + "color": "light-orange", + "value": 80 + }, + { + "color": "red", + "value": 95 + } + ] }, - "pluginVersion": "7.4.2", - "targets": [ - { - "queryType": "randomWalk", - "refId": "A" + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 3, + "x": 0, + "y": 9 + }, + "id": 268, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "vertical", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "value_and_name" + }, + "pluginVersion": "9.4.7", + "targets": [ + { + "datasource": { + "type": "datasource", + "uid": "-- Dashboard --" + }, + "panelId": 269, + "refId": "A" + } + ], + "transformations": [ + { + "id": "seriesToColumns", + "options": { + "byField": "Time" + } + }, + { + "id": "filterFieldsByName", + "options": { + "include": { + "pattern": "CPU usage %" } - ], - "timeFrom": null, - "timeShift": null, - "title": "", - "transparent": true, - "type": "text" + } }, { - "datasource": "-- Dashboard --", - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" + "id": "organize", + "options": { + "excludeByName": { + "Availability Group Bytes": true, + "Batch Requests/sec": true, + "Bytes Received from Replica/sec": true, + "Bytes Sent to Replica/sec": true, + "Connection Memory (KB)": true, + "Logins/sec": true, + "Optimizer Memory (KB)": true, + "SQL Cache Memory (KB)": true, + "SQL Compilations/sec": true, + "Stolen Server Memory (KB)": true, + "Target Server Memory (KB)": true, + "Time": true, + "Total Server Memory (KB)": true, + "Transactions/sec": true, + "User Connections": true, + "Wait Time": true, + "max": true, + "min": true + }, + "indexByName": { + "Time": 0, + "max": 3, + "min": 4, + "sql": 2, + "system": 1 + }, + "renameByName": { + "CPU usage %": "CPU" + } + } + } + ], + "transparent": true, + "type": "stat" + }, + { + "datasource": { + "type": "datasource", + "uid": "-- Dashboard --" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 0, + "displayName": "Wait Time", + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green", + "value": null }, - "custom": {}, - "decimals": 0, - "links": [], - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-green", - "value": null - }, - { - "color": "light-orange", - "value": 80 - }, - { - "color": "red", - "value": 95 - } - ] + { + "color": "light-orange", + "value": 800 }, - "unit": "percent" - }, - "overrides": [] + { + "color": "red", + "value": 1000 + } + ] }, - "gridPos": { - "h": 4, - "w": 3, - "x": 0, - "y": 9 + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 3, + "x": 3, + "y": 9 + }, + "id": 310, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "vertical", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "value_and_name" + }, + "pluginVersion": "9.4.7", + "targets": [ + { + "datasource": { + "type": "datasource", + "uid": "-- Dashboard --" }, - "id": 268, + "panelId": 102, + "refId": "A" + } + ], + "transformations": [ + { + "id": "filterFieldsByName", "options": { - "colorMode": "background", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "vertical", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "value_and_name" - }, - "pluginVersion": "7.4.2", - "targets": [ - { - "panelId": 269, - "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "", - "transformations": [ - { - "id": "seriesToColumns", - "options": { - "byField": "Time" - } - }, - { - "id": "filterFieldsByName", - "options": { - "include": { - "pattern": "CPU usage %" - } - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Availability Group Bytes": true, - "Batch Requests/sec": true, - "Bytes Received from Replica/sec": true, - "Bytes Sent to Replica/sec": true, - "Connection Memory (KB)": true, - "Logins/sec": true, - "Optimizer Memory (KB)": true, - "SQL Cache Memory (KB)": true, - "SQL Compilations/sec": true, - "Stolen Server Memory (KB)": true, - "Target Server Memory (KB)": true, - "Time": true, - "Total Server Memory (KB)": true, - "Transactions/sec": true, - "User Connections": true, - "Wait Time": true, - "max": true, - "min": true - }, - "indexByName": { - "Time": 0, - "max": 3, - "min": 4, - "sql": 2, - "system": 1 - }, - "renameByName": { - "CPU usage %": "CPU" - } - } + "include": { + "pattern": "" } - ], - "transparent": true, - "type": "stat" + } }, { - "datasource": "-- Dashboard --", - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": {}, - "decimals": 0, - "displayName": "Wait Time", - "links": [], - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-green", - "value": null - }, - { - "color": "light-orange", - "value": 800 - }, - { - "color": "red", - "value": 1000 - } - ] - }, - "unit": "ms" + "id": "calculateField", + "options": { + "mode": "reduceRow", + "reduce": { + "reducer": "sum" }, - "overrides": [] + "replaceFields": true + } + } + ], + "transparent": true, + "type": "stat" + }, + { + "datasource": { + "uid": "$DataSource" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "blue", + "mode": "thresholds" }, - "gridPos": { - "h": 4, - "w": 3, - "x": 3, - "y": 9 - }, - "id": 310, - "options": { - "colorMode": "background", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "vertical", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "value_and_name" - }, - "pluginVersion": "7.4.2", - "targets": [ - { - "panelId": 102, - "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "pattern": "" - } - } - }, - { - "id": "calculateField", - "options": { - "mode": "reduceRow", - "reduce": { - "reducer": "sum" - }, - "replaceFields": true - } - } - ], - "transparent": true, - "type": "stat" - }, - { - "datasource": "$DataSource", - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "blue", - "mode": "thresholds" - }, - "custom": {}, - "decimals": 0, - "links": [], - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-green", - "value": null - }, - { - "color": "light-orange", - "value": 1 - }, - { - "color": "red", - "value": 4 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 2, - "x": 6, - "y": 9 - }, - "id": 217, - "options": { - "colorMode": "background", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "vertical", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "value_and_name" - }, - "pluginVersion": "7.4.2", - "targets": [ - { - "alias": "", - "format": "time_series", - "hide": false, - "rawSql": "SELECT \n [time] = snapshot_time --$__timeGroup([snapshot_time], $aggregation) \n ,[Pending] = sum([runnable_tasks_count]+work_queue_count+pending_disk_io_count)\n FROM [dbo].[vw_sqlwatch_report_fact_perf_os_schedulers]\n WHERE 1 = 1\n AND $__timeFilter(snapshot_time)\n and snapshot_time >= dateadd(minute,-15,getutcdate())\n AND [sql_instance] = '$sql_instance'\n GROUP BY snapshot_time --$__timeGroup([snapshot_time], $aggregation) \nORDER BY\n time ASC\n \n ", - "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "Pending" - ] - } - } - } - ], - "transparent": true, - "type": "stat" - }, - { - "datasource": "-- Dashboard --", - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "blue", - "mode": "thresholds" - }, - "custom": {}, - "decimals": 0, - "links": [], - "mappings": [], - "min": 0, - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-green", - "value": null - }, - { - "color": "light-orange", - "value": 1 - }, - { - "color": "red", - "value": 2 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 2, - "x": 8, - "y": 9 - }, - "id": 287, - "options": { - "colorMode": "background", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "7.4.2", - "targets": [ - { - "panelId": 296, - "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "Waiting" - ] - } - } - } - ], - "transparent": true, - "type": "stat" - }, - { - "datasource": "$DataSource", - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "blue", - "mode": "thresholds" - }, - "custom": {}, - "decimals": 0, - "displayName": "Blocked", - "links": [], - "mappings": [], - "min": 0, - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-green", - "value": null - }, - { - "color": "red", - "value": 0.1 - }, - { - "color": "red", - "value": 2 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 2, - "x": 10, - "y": 9 - }, - "id": 218, - "options": { - "colorMode": "background", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "vertical", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "value_and_name" - }, - "pluginVersion": "7.4.2", - "targets": [ - { - "alias": "", - "format": "time_series", - "hide": false, - "rawSql": "SELECT time = isnull(x.event_time,h.snapshot_time)\r\n ,[Blocked] = sum(case when isnull(blocking_session_id,0) > 0 then 1 else 0 end)\r\n --xes only collects data when the event happens so it will return null if no events\r\n --this will make grafana show \"No Data\" rather than default to zero as we're nog going to have a serie either.\r\n --we have to fudge it a bit\r\n \r\n from dbo.sqlwatch_logger_snapshot_header h\r\n left join [dbo].[ufn_sqlwatch_get_blocking_chains] ($__timeFrom(), $__timeTo(),'$sql_instance') x\r\n on h.snapshot_time = x.snapshot_time\r\n and h.snapshot_type_id = x.snapshot_type_id\r\n and h.sql_instance = x.sql_instance\r\n where h.sql_instance = '$sql_instance'\r\n and h.snapshot_type_id = 9\r\n and $__timeFilter(h.snapshot_time)\r\n group by isnull(x.event_time,h.snapshot_time)\r\n order by time asc", - "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "Blocked" - ] - } - } - } - ], - "transparent": true, - "type": "stat" - }, - { - "datasource": "$DataSource", - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": {}, - "decimals": 0, - "links": [], - "mappings": [], - "max": 1, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-green", - "value": null - }, - { - "color": "light-orange", - "value": 85 - }, - { - "color": "red", - "value": 95 - } - ] - }, - "unit": "percentunit" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Memory Low" - }, - "properties": [ - { - "id": "unit", - "value": "none" - }, - { - "id": "mappings", - "value": [ - { - "from": "", - "id": 1, - "text": "OK", - "to": "", - "type": 1, - "value": "0" - }, - { - "from": "", - "id": 2, - "text": "Low", - "to": "", - "type": 1, - "value": "1" - } - ] - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "dark-green", - "value": null - }, - { - "color": "red", - "value": 1 - } - ] - } - }, - { - "id": "displayName", - "value": "Memory" - } - ] - } - ] - }, - "gridPos": { - "h": 4, - "w": 6, - "x": 12, - "y": 9 - }, - "id": 199, - "options": { - "colorMode": "background", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "vertical", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "value_and_name" - }, - "pluginVersion": "7.4.2", - "targets": [ - { - "alias": "", - "format": "time_series", - "hide": false, - "rawSql": "SELECT \n [time] = snapshot_time --$__timeGroup([snapshot_time], $aggregation) \n ,[Memory] = AVG([physical_memory_in_use_kb]*1.0/([physical_memory_in_use_kb]+[available_commit_limit_kb]))\n ,[Memory Low] = case when convert(int,process_physical_memory_low)+convert(int,process_virtual_memory_low) > 0 then 1 else 0 end\n FROM [dbo].[vw_sqlwatch_report_fact_perf_os_process_memory]\n WHERE 1 = 1\n AND $__timeFilter(snapshot_time)\n and snapshot_time >= dateadd(minute,-15,getutcdate())\n AND [sql_instance] = '$sql_instance'\n GROUP BY snapshot_time --$__timeGroup([snapshot_time], $aggregation) \n , case when convert(int,process_physical_memory_low)+convert(int,process_virtual_memory_low) > 0 then 1 else 0 end\nORDER BY\n time ASC\n \n ", - "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "Memory", - "Memory Low" - ] - } - } - } - ], - "transparent": true, - "type": "stat" - }, - { - "datasource": "-- Dashboard --", - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": {}, - "decimals": 0, - "displayName": "Max Latency", - "links": [], - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-green", - "value": null - }, - { - "color": "light-orange", - "value": 20 - }, - { - "color": "red", - "value": 50 - } - ] - }, - "unit": "ms" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 18, - "y": 9 - }, - "id": 230, - "options": { - "colorMode": "background", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "vertical", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "value_and_name" - }, - "pluginVersion": "7.4.2", - "targets": [ - { - "panelId": 15, - "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "pattern": "/Max/" - } - } - }, - { - "id": "reduce", - "options": { - "reducers": [ - "lastNotNull" - ] - } - } - ], - "type": "stat" - }, - { - "datasource": "$DataSource", - "description": "", - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [], - "max": 2, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-green", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "OK" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "green", - "mode": "thresholds" - } - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "dark-green", - "value": null - } - ] - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "WARNING" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "light-orange", - "mode": "thresholds" - } - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "dark-green", - "value": null - }, - { - "color": "light-orange", - "value": 1 - } - ] - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "CRITICAL" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "red", - "mode": "thresholds" - } - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "dark-green", - "value": null - }, - { - "color": "red", - "value": 1 - } - ] - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "CHECK ERROR" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "semi-dark-purple", - "mode": "thresholds" - } - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "dark-green", - "value": null - }, - { - "color": "dark-purple", - "value": 1 - } - ] - } - } - ] - } - ] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 21, - "y": 9 - }, - "id": 246, - "links": [], - "options": { - "colorMode": "background", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "sum" - ], - "fields": "", - "limit": 4, - "values": true - }, - "text": {}, - "textMode": "value_and_name" - }, - "pluginVersion": "7.4.2", - "targets": [ - { - "alias": "", - "format": "time_series", - "hide": false, - "rawSql": "SELECT time=getdate(),t.last_check_status,last_check_status_count=count(c.last_check_status)\r\n FROM (\r\n select last_check_status='OK' union all \r\n select last_check_status = 'WARNING' union all \r\n select last_check_status = 'CRITICAL' union all \r\n select last_check_status = 'CHECK ERROR') t\r\n\r\n\touter apply (\r\n\t\tselect last_check_status = case when last_check_status is null then 'CHECK ERROR' else last_check_status end\r\n\t\tfrom [dbo].[sqlwatch_meta_check] mc\r\n\t\twhere [sql_instance] = '$sql_instance'\r\n\t\tand case when last_check_status is null then 'CHECK ERROR' else last_check_status end = t.last_check_status\r\n\t\tand check_enabled = 1\r\n\t\t) c\r\ngroup by t.last_check_status\r\n\r\n order by case t.last_check_status when 'OK' then 1 when 'WARNING' then 2 when 'CRITICAL' then 3 else 4 end ", - "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "", - "type": "stat" - }, - { - "datasource": "$DataSource", - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "rgb(105, 105, 105)", - "mode": "thresholds" - }, - "custom": {}, - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-green", - "value": null - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Batch Requests/sec" - }, - "properties": [ - { - "id": "unit", - "value": "reqps" - }, - { - "id": "displayName", - "value": "Batch Requests" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Logins/sec" - }, - "properties": [ - { - "id": "displayName", - "value": "Logins" - }, - { - "id": "unit", - "value": "cps" - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "dark-green", - "value": null - }, - { - "color": "light-orange", - "value": 2 - }, - { - "color": "red", - "value": 8 - } - ] - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Transactions/sec" - }, - "properties": [ - { - "id": "unit", - "value": "cps" - }, - { - "id": "displayName", - "value": "Transactions" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Availability Group Bytes" - }, - "properties": [ - { - "id": "unit", - "value": "Bps" - }, - { - "id": "noValue", - "value": "N/A" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "SQL Compilations/sec" - }, - "properties": [ - { - "id": "unit", - "value": "cps" - }, - { - "id": "displayName", - "value": "SQL Compilations" - } - ] - } - ] - }, - "gridPos": { - "h": 12, - "w": 3, - "x": 0, - "y": 13 - }, - "id": 269, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "text": { - "titleSize": 14, - "valueSize": 20 - }, - "textMode": "auto" - }, - "pluginVersion": "7.4.2", - "targets": [ - { - "alias": "", - "format": "time_series", - "hide": false, - "rawSql": "select \r\n\t time = pc.snapshot_time\r\n\t, 'CPU usage %' = sum(case \r\n\t when 1=1 and mpc.counter_name = 'Processor Time %' then pc.[cntr_value_calculated] \r\n\t --when serverproperty('EngineEdition') = 3 and mpc.counter_name = 'CPU usage %' then pc.[cntr_value_calculated] \r\n\t --when serverproperty('EngineEdition') <> 3 and mpc.counter_name = 'Processor Time %' then pc.[cntr_value_calculated]\r\n\t else null end)\r\n\t, 'Batch Requests/sec' = avg(case when mpc.counter_name = 'Batch Requests/sec' then pc.[cntr_value_calculated] else null end)\r\n\r\n\t, 'Logins/sec' = avg(case when mpc.counter_name = 'Logins/sec' then pc.[cntr_value_calculated] else null end)\r\n\t, 'Transactions/sec' = sum(case when mpc.counter_name = 'Transactions/sec' and pc.instance_name not in ('_Total','mssqlsystemresource') then pc.[cntr_value_calculated] else null end)\r\n\t, 'User Connections' = avg(case when mpc.counter_name = 'User Connections' then pc.[cntr_value_calculated] else null end)\r\n\t, 'SQL Compilations/sec' = avg(case when mpc.counter_name = 'SQL Compilations/sec' then pc.[cntr_value_calculated] else null end)\r\n\t, 'Availability Group Bytes' = avg(case when mpc.counter_name in ('Bytes Sent to Replica/sec','Bytes Received from Replica/sec') then pc.[cntr_value_calculated] else null end)\r\n --\r\n ,'Connection Memory (KB)' = avg(case when mpc.counter_name = 'Connection Memory (KB)' then pc.[cntr_value_calculated] else null end)\r\n ,'Optimizer Memory (KB)' = avg(case when mpc.counter_name = 'Optimizer Memory (KB)' then pc.[cntr_value_calculated] else null end)\r\n ,'SQL Cache Memory (KB)' = avg(case when mpc.counter_name = 'SQL Cache Memory (KB)' then pc.[cntr_value_calculated] else null end)\r\n ,'Total Server Memory (KB)' = avg(case when mpc.counter_name = 'Total Server Memory (KB)' then pc.[cntr_value_calculated] else null end)\r\n ,'Stolen Server Memory (KB)' = avg(case when mpc.counter_name = 'Stolen Server Memory (KB)' then pc.[cntr_value_calculated] else null end)\r\n ,'Target Server Memory (KB)' = avg(case when mpc.counter_name = 'Target Server Memory (KB)' then pc.[cntr_value_calculated] else null end)\r\nfrom [dbo].[sqlwatch_logger_perf_os_performance_counters] pc\r\n\r\ninner join [dbo].[sqlwatch_meta_performance_counter] mpc\r\n\ton pc.sql_instance = mpc.sql_instance\r\n\tand pc.performance_counter_id = mpc.performance_counter_id\r\n\t\r\nwhere $__timeFilter(pc.snapshot_time)\r\nand pc.snapshot_time >= dateadd(minute,-15,getutcdate())\r\nand pc.[sql_instance] = '$sql_instance'\r\nand mpc.counter_name in ('CPU usage %'\r\n ,'Batch Requests/sec'\r\n ,'Logins/sec'\r\n ,'Transactions/sec'\r\n ,'User Connections'\r\n ,'SQL Compilations/sec'\r\n ,'Bytes Sent to Replica/sec'\r\n ,'Bytes Received from Replica/sec'\r\n ,'Processor Time %'\r\n ,'% Processor Time'\r\n \r\n ,'Connection Memory (KB)'\r\n ,'Optimizer Memory (KB)'\r\n ,'SQL Cache Memory (KB)'\r\n ,'Total Server Memory (KB)'\r\n ,'Stolen Server Memory (KB)'\r\n , 'Target Server Memory (KB)'\r\n )\r\n\r\ngroup by pc.snapshot_time\r\norder by time asc", - "refId": "SQL Server Perf Counters" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Activity", - "transformations": [ - { - "id": "seriesToColumns", - "options": { - "byField": "Time" - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "CPU usage %": true, - "Connection Memory (KB)": true, - "Optimizer Memory (KB)": true, - "SQL Cache Memory (KB)": true, - "SQL Compilations/sec": true, - "Stolen Server Memory (KB)": true, - "Target Server Memory (KB)": true, - "Time": true, - "Total Server Memory (KB)": true, - "Wait Time": true - }, - "indexByName": { - "Batch Requests/sec": 1, - "Logins/sec": 3, - "SQL Compilations/sec": 2, - "Time": 0, - "Transactions/sec": 4, - "User Connections": 5 - }, - "renameByName": { - "Bytes Received from Replica/sec": "AG: to Replica", - "Bytes Sent to Replica/sec": "AG: from Replica" - } - } - } - ], - "type": "stat" - }, - { - "datasource": "$DataSource", - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "rgb(105, 105, 105)", - "mode": "thresholds" - }, - "custom": {}, - "links": [], - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "rgb(30, 69, 24)", - "value": null - }, - { - "color": "light-orange", - "value": 800 - }, - { - "color": "red", - "value": 1000 - } - ] - }, - "unit": "ms" - }, - "overrides": [] - }, - "gridPos": { - "h": 12, - "w": 3, - "x": 3, - "y": 13 - }, - "id": 102, + "decimals": 0, "links": [], - "options": { - "colorMode": "background", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "limit": 15, - "values": false - }, - "text": { - "titleSize": 14, - "valueSize": 16 - }, - "textMode": "value_and_name" - }, - "pluginVersion": "7.4.2", - "targets": [ - { - "alias": "", - "format": "time_series", - "hide": false, - "rawSql": "SELECT \n [time] = snapshot_time --$__timeGroup([snapshot_time], $aggregation) \n ,[Wait Type] = case when len([wait])>19 then left([wait],19) + '...' else [wait] end\n ,[Wait Time] = sum([wait_time_ms_per_second]) \n --,[Total] = sum([wait_time_ms_per_second]) over (partition by snapshot_time)\n FROM (SELECT wait_time_ms_per_second, wait= case when '$Waits' = 'Category' then [wait_category] else LOWER([wait_type]) end, snapshot_time, RN=ROW_NUMBER() over (partition by wait_category order by wait_time_ms_per_second desc)\n FROM [dbo].[vw_sqlwatch_report_fact_perf_os_wait_stats] \n WHERE 1=1\n AND $__timeFilter(snapshot_time)\n and snapshot_time >= dateadd(minute,-15,getutcdate())\n AND [sql_instance] = '$sql_instance'\n ) t\n WHERE 1=1 --t.RN = 1\n GROUP BY case when len([wait])>19 then left([wait],19) + '...' else [wait] end\n ,snapshot_time --$__timeGroup([snapshot_time], $aggregation) \n \nORDER BY\n time desc\n \n ", - "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Top Waits by Total Time", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "pattern": "" - } - } - }, - { - "id": "renameByRegex", - "options": { - "regex": "(.Wait Time)", - "renamePattern": "" - } - } - ], - "type": "stat" - }, - { - "datasource": "$DataSource", - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "dark-green", - "mode": "fixed" + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green", + "value": null }, - "custom": {}, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-green", - "value": null - } - ] + { + "color": "light-orange", + "value": 1 + }, + { + "color": "red", + "value": 4 } - }, - "overrides": [] - }, - "gridPos": { - "h": 12, - "w": 3, - "x": 6, - "y": 13 + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 2, + "x": 6, + "y": 9 + }, + "id": 217, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "vertical", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "value_and_name" + }, + "pluginVersion": "9.4.7", + "targets": [ + { + "alias": "", + "datasource": { + "uid": "$DataSource" }, - "id": 299, + "format": "time_series", + "hide": false, + "rawSql": "SELECT \n [time] = snapshot_time --$__timeGroup([snapshot_time], $aggregation) \n ,[Pending] = sum([runnable_tasks_count]+work_queue_count+pending_disk_io_count)\n FROM [dbo].[vw_sqlwatch_report_fact_perf_os_schedulers]\n WHERE 1 = 1\n AND $__timeFilter(snapshot_time)\n and snapshot_time >= dateadd(minute,-15,getutcdate())\n AND [sql_instance] = '$sql_instance'\n GROUP BY snapshot_time --$__timeGroup([snapshot_time], $aggregation) \nORDER BY\n time ASC\n \n ", + "refId": "A" + } + ], + "transformations": [ + { + "id": "filterFieldsByName", "options": { - "displayMode": "basic", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showUnfilled": false, - "text": { - "titleSize": 12, - "valueSize": 16 + "include": { + "names": [ + "Pending" + ] } + } + } + ], + "transparent": true, + "type": "stat" + }, + { + "datasource": { + "type": "datasource", + "uid": "-- Dashboard --" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "blue", + "mode": "thresholds" }, - "pluginVersion": "7.4.2", - "targets": [ - { - "alias": "", - "format": "time_series", - "hide": false, - "rawSql": "SELECT time = r1.snapshot_time\r\n ,[running] = avg(running)\r\n ,[sleeping] = avg(sleeping)\r\n ,[dormant] = avg(dormant)\r\n ,[preconnect] = avg(preconnect)\r\n ,[cpu_time] = avg(cpu_time)\r\n ,[reads] = avg(reads)\r\n ,[writes] = avg(writes)\r\n , type = case when type = 1 then 'User' else 'System' end\r\n FROM [sqlwatch_logger_dm_exec_sessions_stats] r1 (nolock)\r\n\twhere $__timeFilter(r1.snapshot_time)\r\n and snapshot_time > dateadd(minute,-15,GETUTCDATE())\t\r\n and r1.sql_instance = '$sql_instance'\r\n group by r1.snapshot_time, case when type = 1 then 'User' else 'System' end\r\n order by time asc", - "refId": "2" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Sessions", - "transformations": [ - { - "id": "seriesToColumns", - "options": { - "byField": "Time" - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "System cpu_time": true, - "System reads": true, - "System writes": true, - "User cpu_time": true, - "User reads": true, - "User writes": true, - "cpu_time": true, - "reads": true, - "writes": true - }, - "indexByName": { - "Time": 0, - "max": 3, - "min": 4, - "sql": 2, - "system": 1 - }, - "renameByName": {} - } - } - ], - "type": "bargauge" - }, - { - "datasource": "$DataSource", - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "dark-green", - "mode": "thresholds" + "decimals": 0, + "links": [], + "mappings": [], + "min": 0, + "noValue": "0", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green", + "value": null }, - "custom": {}, - "decimals": 0, - "links": [], - "mappings": [], - "min": 0, - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-green", - "value": null - } - ] - } - }, - "overrides": [ { - "matcher": { - "id": "byRegexp", - "options": "Waiting|Suspended|Runnable" - }, - "properties": [ - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "dark-green", - "value": null - }, - { - "color": "light-orange", - "value": 1 - }, - { - "color": "red", - "value": 2 - } - ] - } - } - ] + "color": "light-orange", + "value": 1 + }, + { + "color": "red", + "value": 2 } ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 2, + "x": 8, + "y": 9 + }, + "id": 287, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "9.4.7", + "targets": [ + { + "datasource": { + "type": "datasource", + "uid": "-- Dashboard --" }, - "gridPos": { - "h": 12, - "w": 3, - "x": 9, - "y": 13 - }, - "id": 296, + "panelId": 296, + "refId": "A" + } + ], + "transformations": [ + { + "id": "filterFieldsByName", "options": { - "displayMode": "basic", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showUnfilled": false, - "text": { - "titleSize": 12, - "valueSize": 16 + "include": { + "names": [ + "Waiting" + ] } + } + } + ], + "transparent": true, + "type": "stat" + }, + { + "datasource": { + "uid": "$DataSource" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "blue", + "mode": "thresholds" }, - "pluginVersion": "7.4.2", - "targets": [ - { - "alias": "", - "format": "time_series", - "hide": false, - "rawSql": "SELECT time = r1.snapshot_time\r\n , Background\t= background\r\n , Running = running\r\n , Runnable = runnable\r\n , Sleeping\t = sleeping\r\n , Suspended\t = suspended\r\n , Waiting\t = waiting_tasks\r\n FROM [sqlwatch_logger_dm_exec_requests_stats] r1 (nolock)\r\n\twhere $__timeFilter(r1.snapshot_time)\r\n\tand type = 1\r\n\tand r1.snapshot_time > dateadd(minute,-15,getutcdate())\r\n and r1.sql_instance = '$sql_instance'\r\n order by time asc", - "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "User Requests", - "transformations": [ - { - "id": "filterFieldsByName", - "options": {} - } - ], - "type": "bargauge" + "decimals": 0, + "displayName": "Blocked", + "links": [], + "mappings": [], + "min": 0, + "noValue": "0", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green", + "value": null + }, + { + "color": "red", + "value": 0.1 + }, + { + "color": "red", + "value": 2 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 2, + "x": 10, + "y": 9 + }, + "id": 218, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "vertical", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false }, + "text": {}, + "textMode": "value_and_name" + }, + "pluginVersion": "9.4.7", + "targets": [ { - "datasource": "-- Dashboard --", - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "green", - "mode": "thresholds" - }, - "custom": {}, - "decimals": 0, - "links": [], - "mappings": [], - "min": 0, - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-green", - "value": null - }, - { - "color": "dark-green", - "value": 1 - } - ] + "alias": "", + "datasource": { + "uid": "$DataSource" + }, + "format": "time_series", + "hide": false, + "rawSql": "SELECT time = isnull(x.event_time,h.snapshot_time)\r\n ,[Blocked] = sum(case when isnull(blocking_session_id,0) > 0 then 1 else 0 end)\r\n --xes only collects data when the event happens so it will return null if no events\r\n --this will make grafana show \"No Data\" rather than default to zero as we're nog going to have a serie either.\r\n --we have to fudge it a bit\r\n \r\n from dbo.sqlwatch_logger_snapshot_header h\r\n left join [dbo].[ufn_sqlwatch_get_blocking_chains] ($__timeFrom(), $__timeTo(),'$sql_instance') x\r\n on h.snapshot_time = x.snapshot_time\r\n and h.snapshot_type_id = x.snapshot_type_id\r\n and h.sql_instance = x.sql_instance\r\n where h.sql_instance = '$sql_instance'\r\n and h.snapshot_type_id = 9\r\n and $__timeFilter(h.snapshot_time)\r\n group by isnull(x.event_time,h.snapshot_time)\r\n order by time asc", + "refId": "A" + } + ], + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "Blocked" + ] + } + } + } + ], + "transparent": true, + "type": "stat" + }, + { + "datasource": { + "uid": "$DataSource" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 0, + "links": [], + "mappings": [], + "max": 1, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green", + "value": null }, - "unit": "deckbytes" + { + "color": "light-orange", + "value": 85 + }, + { + "color": "red", + "value": 95 + } + ] + }, + "unit": "percentunit" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Memory Low" }, - "overrides": [ + "properties": [ { - "matcher": { - "id": "byName", - "options": "Memory Deficit" - }, - "properties": [ - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "dark-green", - "value": null - }, - { - "color": "light-orange", - "value": 1024 - }, - { - "color": "red", - "value": 1025 - } - ] - } - }, - { - "id": "noValue", - "value": "0" - }, + "id": "unit", + "value": "none" + }, + { + "id": "mappings", + "value": [ { - "id": "mappings", - "value": [ - { - "from": "-9999999999999999", - "id": 1, - "text": "0", - "to": "0", - "type": 2 + "options": { + "0": { + "text": "OK" + }, + "1": { + "text": "Low" } - ] + }, + "type": "value" } ] + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green", + "value": null + }, + { + "color": "red", + "value": 1 + } + ] + } + }, + { + "id": "displayName", + "value": "Memory" } ] + } + ] + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 12, + "y": 9 + }, + "id": 199, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "vertical", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "value_and_name" + }, + "pluginVersion": "9.4.7", + "targets": [ + { + "alias": "", + "datasource": { + "uid": "$DataSource" }, - "gridPos": { - "h": 12, - "w": 3, - "x": 12, - "y": 13 - }, - "id": 300, + "format": "time_series", + "hide": false, + "rawSql": "SELECT \n [time] = snapshot_time --$__timeGroup([snapshot_time], $aggregation) \n ,[Memory] = AVG([physical_memory_in_use_kb]*1.0/([physical_memory_in_use_kb]+[available_commit_limit_kb]))\n ,[Memory Low] = case when convert(int,process_physical_memory_low)+convert(int,process_virtual_memory_low) > 0 then 1 else 0 end\n FROM [dbo].[vw_sqlwatch_report_fact_perf_os_process_memory]\n WHERE 1 = 1\n AND $__timeFilter(snapshot_time)\n and snapshot_time >= dateadd(minute,-15,getutcdate())\n AND [sql_instance] = '$sql_instance'\n GROUP BY snapshot_time --$__timeGroup([snapshot_time], $aggregation) \n , case when convert(int,process_physical_memory_low)+convert(int,process_virtual_memory_low) > 0 then 1 else 0 end\nORDER BY\n time ASC\n \n ", + "refId": "A" + } + ], + "transformations": [ + { + "id": "filterFieldsByName", "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "last" - ], - "fields": "/.*/", - "values": false - }, - "text": { - "titleSize": 12, - "valueSize": 16 - }, - "textMode": "value_and_name" + "include": { + "names": [ + "Memory", + "Memory Low" + ] + } + } + } + ], + "transparent": true, + "type": "stat" + }, + { + "datasource": { + "type": "datasource", + "uid": "-- Dashboard --" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" }, - "pluginVersion": "7.4.2", - "targets": [ - { - "panelId": 269, - "refId": "A" + "decimals": 0, + "displayName": "Max Latency", + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green", + "value": null + }, + { + "color": "light-orange", + "value": 20 + }, + { + "color": "red", + "value": 50 + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 3, + "x": 18, + "y": 9 + }, + "id": 230, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "vertical", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "value_and_name" + }, + "pluginVersion": "9.4.7", + "targets": [ + { + "datasource": { + "type": "datasource", + "uid": "-- Dashboard --" + }, + "panelId": 15, + "refId": "A" + } + ], + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "pattern": "/Max/" } - ], - "timeFrom": null, - "timeShift": null, - "title": "SQL Memory", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "Connection Memory (KB)", - "Optimizer Memory (KB)", - "SQL Cache Memory (KB)", - "Total Server Memory (KB)", - "Stolen Server Memory (KB)", - "Target Server Memory (KB)", - "Time" + } + }, + { + "id": "reduce", + "options": { + "reducers": [ + "lastNotNull" + ] + } + } + ], + "type": "stat" + }, + { + "datasource": { + "uid": "$DataSource" + }, + "description": "", + "fieldConfig": { + "defaults": { + "mappings": [], + "max": 2, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green", + "value": null + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "OK" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "green", + "mode": "thresholds" + } + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green", + "value": null + } ] } } + ] + }, + { + "matcher": { + "id": "byName", + "options": "WARNING" }, - { - "id": "calculateField", - "options": { - "alias": "Memory Deficit", - "binary": { - "left": "Target Server Memory (KB)", - "operator": "-", - "reducer": "sum", - "right": "Total Server Memory (KB)" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - }, - "replaceFields": false + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "light-orange", + "mode": "thresholds" + } + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green", + "value": null + }, + { + "color": "light-orange", + "value": 1 + } + ] + } } + ] + }, + { + "matcher": { + "id": "byName", + "options": "CRITICAL" }, - { - "id": "renameByRegex", - "options": { - "regex": "(\\(KB\\))", - "renamePattern": "" + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "red", + "mode": "thresholds" + } + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green", + "value": null + }, + { + "color": "red", + "value": 1 + } + ] + } } + ] + }, + { + "matcher": { + "id": "byName", + "options": "CHECK ERROR" }, - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "Connection Memory ", - "Optimizer Memory ", - "SQL Cache Memory ", - "Total Server Memory ", - "Stolen Server Memory ", - "Target Server Memory ", - "Memory Deficit" + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "semi-dark-purple", + "mode": "thresholds" + } + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green", + "value": null + }, + { + "color": "dark-purple", + "value": 1 + } ] } } - } - ], - "type": "stat" + ] + } + ] + }, + "gridPos": { + "h": 4, + "w": 3, + "x": 21, + "y": 9 + }, + "id": 246, + "links": [], + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "sum" + ], + "fields": "", + "limit": 4, + "values": true }, + "text": {}, + "textMode": "value_and_name" + }, + "pluginVersion": "9.4.7", + "targets": [ { - "datasource": "-- Dashboard --", - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "rgb(105, 105, 105)", - "mode": "thresholds" - }, - "custom": {}, - "decimals": 0, - "links": [], - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-green", - "value": null - } - ] - }, - "unit": "Bps" - }, - "overrides": [] + "alias": "", + "datasource": { + "uid": "$DataSource" }, - "gridPos": { - "h": 12, - "w": 3, - "x": 15, - "y": 13 + "format": "time_series", + "hide": false, + "rawSql": "SELECT time=getdate(),t.last_check_status,last_check_status_count=count(c.last_check_status)\r\n FROM (\r\n select last_check_status='OK' union all \r\n select last_check_status = 'WARNING' union all \r\n select last_check_status = 'CRITICAL' union all \r\n select last_check_status = 'CHECK ERROR') t\r\n\r\n\touter apply (\r\n\t\tselect last_check_status = case when last_check_status is null then 'CHECK ERROR' else last_check_status end\r\n\t\tfrom [dbo].[sqlwatch_meta_check] mc\r\n\t\twhere [sql_instance] = '$sql_instance'\r\n\t\tand case when last_check_status is null then 'CHECK ERROR' else last_check_status end = t.last_check_status\r\n\t\tand check_enabled = 1\r\n\t\t) c\r\ngroup by t.last_check_status\r\n\r\n order by case t.last_check_status when 'OK' then 1 when 'WARNING' then 2 when 'CRITICAL' then 3 else 4 end ", + "refId": "A" + } + ], + "type": "stat" + }, + { + "datasource": { + "uid": "$DataSource" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "rgb(105, 105, 105)", + "mode": "thresholds" + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green", + "value": null + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Batch Requests/sec" + }, + "properties": [ + { + "id": "unit", + "value": "reqps" + }, + { + "id": "displayName", + "value": "Batch Requests" + } + ] }, - "id": 295, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false + { + "matcher": { + "id": "byName", + "options": "Logins/sec" }, - "text": { - "titleSize": 12, - "valueSize": 16 + "properties": [ + { + "id": "displayName", + "value": "Logins" + }, + { + "id": "unit", + "value": "cps" + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green", + "value": null + }, + { + "color": "light-orange", + "value": 2 + }, + { + "color": "red", + "value": 8 + } + ] + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Transactions/sec" }, - "textMode": "auto" + "properties": [ + { + "id": "unit", + "value": "cps" + }, + { + "id": "displayName", + "value": "Transactions" + } + ] }, - "pluginVersion": "7.4.2", - "targets": [ - { - "panelId": 15, - "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Disk IO", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "pattern": "/IO/" - } + { + "matcher": { + "id": "byName", + "options": "Availability Group Bytes" + }, + "properties": [ + { + "id": "unit", + "value": "Bps" + }, + { + "id": "noValue", + "value": "N/A" } + ] + }, + { + "matcher": { + "id": "byName", + "options": "SQL Compilations/sec" }, - { - "id": "renameByRegex", - "options": { - "regex": "(.IO$)", - "renamePattern": "" + "properties": [ + { + "id": "unit", + "value": "cps" + }, + { + "id": "displayName", + "value": "SQL Compilations" } - } - ], - "type": "stat" + ] + } + ] + }, + "gridPos": { + "h": 12, + "w": 3, + "x": 0, + "y": 13 + }, + "id": 269, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": { + "titleSize": 14, + "valueSize": 20 }, + "textMode": "auto" + }, + "pluginVersion": "9.4.7", + "targets": [ { - "datasource": "$DataSource", - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" + "alias": "", + "datasource": { + "uid": "$DataSource" + }, + "format": "time_series", + "hide": false, + "rawSql": "select \r\n\t time = pc.snapshot_time\r\n\t, 'CPU usage %' = sum(case \r\n\t when 1=1 and mpc.counter_name = 'Processor Time %' then pc.[cntr_value_calculated] \r\n\t --when serverproperty('EngineEdition') = 3 and mpc.counter_name = 'CPU usage %' then pc.[cntr_value_calculated] \r\n\t --when serverproperty('EngineEdition') <> 3 and mpc.counter_name = 'Processor Time %' then pc.[cntr_value_calculated]\r\n\t else null end)\r\n\t, 'Batch Requests/sec' = avg(case when mpc.counter_name = 'Batch Requests/sec' then pc.[cntr_value_calculated] else null end)\r\n\r\n\t, 'Logins/sec' = avg(case when mpc.counter_name = 'Logins/sec' then pc.[cntr_value_calculated] else null end)\r\n\t, 'Transactions/sec' = sum(case when mpc.counter_name = 'Transactions/sec' and pc.instance_name not in ('_Total','mssqlsystemresource') then pc.[cntr_value_calculated] else null end)\r\n\t, 'User Connections' = avg(case when mpc.counter_name = 'User Connections' then pc.[cntr_value_calculated] else null end)\r\n\t, 'SQL Compilations/sec' = avg(case when mpc.counter_name = 'SQL Compilations/sec' then pc.[cntr_value_calculated] else null end)\r\n\t, 'Availability Group Bytes' = avg(case when mpc.counter_name in ('Bytes Sent to Replica/sec','Bytes Received from Replica/sec') then pc.[cntr_value_calculated] else null end)\r\n --\r\n ,'Connection Memory (KB)' = avg(case when mpc.counter_name = 'Connection Memory (KB)' then pc.[cntr_value_calculated] else null end)\r\n ,'Optimizer Memory (KB)' = avg(case when mpc.counter_name = 'Optimizer Memory (KB)' then pc.[cntr_value_calculated] else null end)\r\n ,'SQL Cache Memory (KB)' = avg(case when mpc.counter_name = 'SQL Cache Memory (KB)' then pc.[cntr_value_calculated] else null end)\r\n ,'Total Server Memory (KB)' = avg(case when mpc.counter_name = 'Total Server Memory (KB)' then pc.[cntr_value_calculated] else null end)\r\n ,'Stolen Server Memory (KB)' = avg(case when mpc.counter_name = 'Stolen Server Memory (KB)' then pc.[cntr_value_calculated] else null end)\r\n ,'Target Server Memory (KB)' = avg(case when mpc.counter_name = 'Target Server Memory (KB)' then pc.[cntr_value_calculated] else null end)\r\nfrom [dbo].[sqlwatch_logger_perf_os_performance_counters] pc\r\n\r\ninner join [dbo].[sqlwatch_meta_performance_counter] mpc\r\n\ton pc.sql_instance = mpc.sql_instance\r\n\tand pc.performance_counter_id = mpc.performance_counter_id\r\n\t\r\nwhere $__timeFilter(pc.snapshot_time)\r\nand pc.snapshot_time >= dateadd(minute,-15,getutcdate())\r\nand pc.[sql_instance] = '$sql_instance'\r\nand mpc.counter_name in ('CPU usage %'\r\n ,'Batch Requests/sec'\r\n ,'Logins/sec'\r\n ,'Transactions/sec'\r\n ,'User Connections'\r\n ,'SQL Compilations/sec'\r\n ,'Bytes Sent to Replica/sec'\r\n ,'Bytes Received from Replica/sec'\r\n ,'Processor Time %'\r\n ,'% Processor Time'\r\n \r\n ,'Connection Memory (KB)'\r\n ,'Optimizer Memory (KB)'\r\n ,'SQL Cache Memory (KB)'\r\n ,'Total Server Memory (KB)'\r\n ,'Stolen Server Memory (KB)'\r\n , 'Target Server Memory (KB)'\r\n )\r\n\r\ngroup by pc.snapshot_time\r\norder by time asc", + "refId": "SQL Server Perf Counters" + } + ], + "title": "Activity", + "transformations": [ + { + "id": "seriesToColumns", + "options": { + "byField": "Time" + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "CPU usage %": true, + "Connection Memory (KB)": true, + "Optimizer Memory (KB)": true, + "SQL Cache Memory (KB)": true, + "SQL Compilations/sec": true, + "Stolen Server Memory (KB)": true, + "Target Server Memory (KB)": true, + "Time": true, + "Total Server Memory (KB)": true, + "Wait Time": true + }, + "indexByName": { + "Batch Requests/sec": 1, + "Logins/sec": 3, + "SQL Compilations/sec": 2, + "Time": 0, + "Transactions/sec": 4, + "User Connections": 5 + }, + "renameByName": { + "Bytes Received from Replica/sec": "AG: to Replica", + "Bytes Sent to Replica/sec": "AG: from Replica" + } + } + } + ], + "type": "stat" + }, + { + "datasource": { + "type": "mssql", + "uid": "$DataSource" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "rgb(105, 105, 105)", + "mode": "thresholds" + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgb(30, 69, 24)", + "value": null }, - "custom": {}, - "decimals": 0, - "links": [], - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-green", - "value": null - }, - { - "color": "light-orange", - "value": 20 - }, - { - "color": "red", - "value": 50 - } - ] + { + "color": "light-orange", + "value": 800 }, - "unit": "ms" - }, - "overrides": [] + { + "color": "red", + "value": 1000 + } + ] }, - "gridPos": { - "h": 12, - "w": 3, - "x": 18, - "y": 13 + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 12, + "w": 3, + "x": 3, + "y": 13 + }, + "id": 102, + "links": [], + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "limit": 15, + "values": false + }, + "text": { + "titleSize": 14, + "valueSize": 16 + }, + "textMode": "value_and_name" + }, + "pluginVersion": "9.4.7", + "targets": [ + { + "alias": "", + "datasource": { + "uid": "$DataSource" + }, + "editorMode": "code", + "format": "time_series", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT \n [time] = snapshot_time --$__timeGroup([snapshot_time], $aggregation) \n ,[Wait Type] = case when len([wait])>19 then left([wait],19) + '...' else [wait] end\n ,[Wait Time] = sum([wait_time_ms_per_second]) \n --,[Total] = sum([wait_time_ms_per_second]) over (partition by snapshot_time)\n FROM (SELECT wait_time_ms_per_second, wait= case when '$Waits' = 'Category' then [wait_category] else LOWER([wait_type]) end, snapshot_time, RN=ROW_NUMBER() over (partition by wait_category order by wait_time_ms_per_second desc)\n FROM [dbo].[vw_sqlwatch_report_fact_perf_os_wait_stats] \n WHERE 1=1\n AND $__timeFilter(snapshot_time)\n and snapshot_time >= dateadd(minute,-15,getutcdate())\n AND [sql_instance] = '$sql_instance'\n ) t\n WHERE 1=1 --t.RN = 1\n GROUP BY case when len([wait])>19 then left([wait],19) + '...' else [wait] end\n ,snapshot_time --$__timeGroup([snapshot_time], $aggregation) \n \nORDER BY\n time asc\n \n ", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + } + ], + "title": "Top Waits by Total Time", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "pattern": "" + } + } + }, + { + "id": "renameByRegex", + "options": { + "regex": "(.Wait Time)", + "renamePattern": "" + } + } + ], + "type": "stat" + }, + { + "datasource": { + "uid": "$DataSource" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "dark-green", + "mode": "fixed" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 12, + "w": 3, + "x": 6, + "y": 13 + }, + "id": 299, + "options": { + "displayMode": "basic", + "minVizHeight": 10, + "minVizWidth": 0, + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showUnfilled": false, + "text": { + "titleSize": 12, + "valueSize": 16 + } + }, + "pluginVersion": "9.4.7", + "targets": [ + { + "alias": "", + "datasource": { + "uid": "$DataSource" }, - "id": 15, + "format": "time_series", + "hide": false, + "rawSql": "SELECT time = r1.snapshot_time\r\n ,[running] = avg(running)\r\n ,[sleeping] = avg(sleeping)\r\n ,[dormant] = avg(dormant)\r\n ,[preconnect] = avg(preconnect)\r\n ,[cpu_time] = avg(cpu_time)\r\n ,[reads] = avg(reads)\r\n ,[writes] = avg(writes)\r\n , type = case when type = 1 then 'User' else 'System' end\r\n FROM [sqlwatch_logger_dm_exec_sessions_stats] r1 (nolock)\r\n\twhere $__timeFilter(r1.snapshot_time)\r\n and snapshot_time > dateadd(minute,-15,GETUTCDATE())\t\r\n and r1.sql_instance = '$sql_instance'\r\n group by r1.snapshot_time, case when type = 1 then 'User' else 'System' end\r\n order by time asc", + "refId": "2" + } + ], + "title": "Sessions", + "transformations": [ + { + "id": "seriesToColumns", "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "text": { - "titleSize": 12, - "valueSize": 16 - }, - "textMode": "auto" + "byField": "Time" + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "System cpu_time": true, + "System reads": true, + "System writes": true, + "User cpu_time": true, + "User reads": true, + "User writes": true, + "cpu_time": true, + "reads": true, + "writes": true + }, + "indexByName": { + "Time": 0, + "max": 3, + "min": 4, + "sql": 2, + "system": 1 + }, + "renameByName": {} + } + } + ], + "type": "bargauge" + }, + { + "datasource": { + "uid": "$DataSource" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "dark-green", + "mode": "thresholds" }, - "pluginVersion": "7.4.2", - "targets": [ - { - "alias": "", - "format": "time_series", - "hide": false, - "rawSql": "SELECT \n [time] = snapshot_time \n ,[Latency Reads] = MAX(fs.[io_latency_read])\n ,[Latency Writes] = MAX(fs.[io_latency_write])\n \t ,[Reads IO] = AVG(fs.bytes_read_per_second)\n \t ,[Writes IO] = AVG(fs.bytes_written_per_second)\n ,[Disk] = left(upper([file_physical_name]),2) + ' ' + isnull(v.label,'')\n ,[Max Latency] = max(case when fs.[io_latency_read] > fs.[io_latency_write] then fs.[io_latency_read] else fs.[io_latency_write] end) over (partition by snapshot_time )\n FROM [dbo].[vw_sqlwatch_report_fact_perf_file_stats] fs\n outer apply (\n select top 1 label \n from [dbo].[sqlwatch_meta_os_volume] v\n\t where v.volume_name = left(fs.file_physical_name,3)) v\n WHERE 1 = 1\n AND $__timeFilter(fs.snapshot_time)\n and snapshot_time >= dateadd(minute,-15,getutcdate())\n AND [sql_instance] = '$sql_instance'\n AND database_name IN ($database)\n GROUP BY fs.snapshot_time \n , left(upper([file_physical_name]),2) + ' ' + isnull(v.label,'')\n ,case when fs.[io_latency_read] > fs.[io_latency_write] then fs.[io_latency_read] else fs.[io_latency_write] end\nORDER BY\n time ASC", - "refId": "File Stats" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Disk Latency", - "transformations": [ - { - "id": "renameByRegex", - "options": { - "regex": "(.Max Latency)", - "renamePattern": "IGNORE" + "decimals": 0, + "links": [], + "mappings": [], + "min": 0, + "noValue": "0", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green", + "value": null } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byRegexp", + "options": "Waiting|Suspended|Runnable" }, - { - "id": "filterFieldsByName", - "options": { - "include": { - "pattern": "/Latency/" + "properties": [ + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green", + "value": null + }, + { + "color": "light-orange", + "value": 1 + }, + { + "color": "red", + "value": 2 + } + ] } } - }, - { - "id": "renameByRegex", - "options": { - "regex": "(.Latency)", - "renamePattern": "" - } - } - ], - "type": "stat" + ] + } + ] + }, + "gridPos": { + "h": 12, + "w": 3, + "x": 9, + "y": 13 + }, + "id": 296, + "options": { + "displayMode": "basic", + "minVizHeight": 10, + "minVizWidth": 0, + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false }, + "showUnfilled": false, + "text": { + "titleSize": 12, + "valueSize": 16 + } + }, + "pluginVersion": "9.4.7", + "targets": [ + { + "alias": "", + "datasource": { + "uid": "$DataSource" + }, + "format": "time_series", + "hide": false, + "rawSql": "SELECT time = r1.snapshot_time\r\n , Background\t= background\r\n , Running = running\r\n , Runnable = runnable\r\n , Sleeping\t = sleeping\r\n , Suspended\t = suspended\r\n , Waiting\t = waiting_tasks\r\n FROM [sqlwatch_logger_dm_exec_requests_stats] r1 (nolock)\r\n\twhere $__timeFilter(r1.snapshot_time)\r\n\tand type = 1\r\n\tand r1.snapshot_time > dateadd(minute,-15,getutcdate())\r\n and r1.sql_instance = '$sql_instance'\r\n order by time asc", + "refId": "A" + } + ], + "title": "User Requests", + "transformations": [ { - "datasource": "$DataSource", - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" + "id": "filterFieldsByName", + "options": {} + } + ], + "type": "bargauge" + }, + { + "datasource": { + "type": "datasource", + "uid": "-- Dashboard --" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "green", + "mode": "thresholds" + }, + "decimals": 0, + "links": [], + "mappings": [], + "min": 0, + "noValue": "0", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green", + "value": null }, - "custom": {}, - "links": [], - "mappings": [ - { - "from": "", - "id": 1, - "text": "OK", - "to": "", - "type": 1, - "value": "0" - }, - { - "from": "", - "id": 2, - "text": "WARNING", - "to": "", - "type": 1, - "value": "1" - }, - { - "from": "", - "id": 3, - "text": "CRITICAL", - "to": "", - "type": 1, - "value": "2" - }, - { - "from": "", - "id": 4, - "text": "CHECK ERROR", - "to": "", - "type": 1, - "value": "3" + { + "color": "dark-green", + "value": 1 + } + ] + }, + "unit": "deckbytes" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Memory Deficit" + }, + "properties": [ + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green", + "value": null + }, + { + "color": "light-orange", + "value": 1024 + }, + { + "color": "red", + "value": 1025 + } + ] } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "rgba(115, 191, 105, 0)", - "value": null - }, - { - "color": "rgb(30, 69, 24)", - "value": 0 - }, - { - "color": "light-orange", - "value": 1 - }, - { - "color": "red", - "value": 2 - }, + }, + { + "id": "noValue", + "value": "0" + }, + { + "id": "mappings", + "value": [ { - "color": "dark-purple", - "value": 3 + "options": { + "from": -10000000000000000, + "result": { + "text": "0" + }, + "to": 0 + }, + "type": "range" } ] } - }, - "overrides": [] - }, - "gridPos": { - "h": 12, - "w": 3, - "x": 21, - "y": 13 + ] + } + ] + }, + "gridPos": { + "h": 12, + "w": 3, + "x": 12, + "y": 13 + }, + "id": 300, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "/.*/", + "values": false + }, + "text": { + "titleSize": 12, + "valueSize": 16 + }, + "textMode": "value_and_name" + }, + "pluginVersion": "9.4.7", + "targets": [ + { + "datasource": { + "type": "datasource", + "uid": "-- Dashboard --" }, - "id": 224, + "panelId": 269, + "refId": "A" + } + ], + "title": "SQL Memory", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "Connection Memory (KB)", + "Optimizer Memory (KB)", + "SQL Cache Memory (KB)", + "Total Server Memory (KB)", + "Stolen Server Memory (KB)", + "Target Server Memory (KB)", + "Time" + ] + } + } + }, + { + "id": "calculateField", "options": { - "colorMode": "background", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "limit": 15, - "values": true + "alias": "Memory Deficit", + "binary": { + "left": "Target Server Memory (KB)", + "operator": "-", + "reducer": "sum", + "right": "Total Server Memory (KB)" }, - "text": { - "titleSize": 14, - "valueSize": 13 + "mode": "binary", + "reduce": { + "reducer": "sum" }, - "textMode": "name" - }, - "pluginVersion": "7.4.2", - "targets": [ - { - "alias": "", - "format": "time_series", - "hide": false, - "rawSql": "SELECT top 15 time=isnull(last_check_date,getutcdate()),[check_name] = CASE WHEN LEN([check_name]) > 28 THEN LEFT(check_name,27) + '...' ELSE [check_name] END\n ,status = CASE [last_check_status] \n WHEN 'CRITICAL' THEN 2\n WHEN 'WARNING' THEN 1\n WHEN 'OK' THEN 0\n ELSE 3 END\n FROM (select last_check_date , check_name = (replace(replace([check_name],'Database',''),' failure count',''))\n , last_check_status = case when last_check_status is null then 'CHECK ERROR' else last_check_status end\n from [dbo].[vw_sqlwatch_report_dim_check] with (nolock)\n WHERE [target_sql_instance] = '$sql_instance'\n AND check_enabled = 1\n ) t\n --AND last_check_status <> 'ok'\n --AND $__timeFilter(last_check_date)\n --AND last_check_status IN ($Status)\n order by case when last_check_status = 'OK' then dateadd(month,-12,last_check_date) else isnull(last_check_date,getutcdate()) end desc", - "refId": "A" + "replaceFields": false + } + }, + { + "id": "renameByRegex", + "options": { + "regex": "(\\(KB\\))", + "renamePattern": "" + } + }, + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "Connection Memory ", + "Optimizer Memory ", + "SQL Cache Memory ", + "Total Server Memory ", + "Stolen Server Memory ", + "Target Server Memory ", + "Memory Deficit" + ] } - ], - "timeFrom": null, - "timeShift": null, - "title": "Checks", - "transformations": [ - { - "id": "filterFieldsByName", - "options": {} - }, - { - "id": "organize", - "options": { - "excludeByName": {}, - "indexByName": { - "check_description": 1, - "check_name": 0, - "last_check_value": 3, - "status": 2 - }, - "renameByName": { - "check_description": "Description", - "check_name": "", - "last_check_date": "Check Date", - "last_check_value": "", - "status": "" - } + } + } + ], + "type": "stat" + }, + { + "datasource": { + "type": "datasource", + "uid": "-- Dashboard --" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "rgb(105, 105, 105)", + "mode": "thresholds" + }, + "decimals": 0, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green", + "value": null } + ] + }, + "unit": "Bps" + }, + "overrides": [] + }, + "gridPos": { + "h": 12, + "w": 3, + "x": 15, + "y": 13 + }, + "id": 295, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": { + "titleSize": 12, + "valueSize": 16 + }, + "textMode": "auto" + }, + "pluginVersion": "9.4.7", + "targets": [ + { + "datasource": { + "type": "datasource", + "uid": "-- Dashboard --" + }, + "panelId": 15, + "refId": "A" + } + ], + "title": "Disk IO", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "pattern": "/IO/" } - ], - "type": "stat" + } }, { - "datasource": null, - "fieldConfig": { - "defaults": { - "custom": {} - }, - "overrides": [] + "id": "renameByRegex", + "options": { + "regex": "(.IO$)", + "renamePattern": "" + } + } + ], + "type": "stat" + }, + { + "datasource": { + "uid": "$DataSource" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" }, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 25 + "decimals": 0, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green", + "value": null + }, + { + "color": "light-orange", + "value": 20 + }, + { + "color": "red", + "value": 50 + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 12, + "w": 3, + "x": 18, + "y": 13 + }, + "id": 15, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": { + "titleSize": 12, + "valueSize": 16 + }, + "textMode": "auto" + }, + "pluginVersion": "9.4.7", + "targets": [ + { + "alias": "", + "datasource": { + "uid": "$DataSource" }, - "id": 297, + "format": "time_series", + "hide": false, + "rawSql": "SELECT \n [time] = snapshot_time \n ,[Latency Reads] = MAX(fs.[io_latency_read])\n ,[Latency Writes] = MAX(fs.[io_latency_write])\n \t ,[Reads IO] = AVG(fs.bytes_read_per_second)\n \t ,[Writes IO] = AVG(fs.bytes_written_per_second)\n ,[Disk] = left(upper([file_physical_name]),2) + ' ' + isnull(v.label,'')\n ,[Max Latency] = max(case when fs.[io_latency_read] > fs.[io_latency_write] then fs.[io_latency_read] else fs.[io_latency_write] end) over (partition by snapshot_time )\n FROM [dbo].[vw_sqlwatch_report_fact_perf_file_stats] fs\n outer apply (\n select top 1 label \n from [dbo].[sqlwatch_meta_os_volume] v\n\t where v.volume_name = left(fs.file_physical_name,3)) v\n WHERE 1 = 1\n AND $__timeFilter(fs.snapshot_time)\n and snapshot_time >= dateadd(minute,-15,getutcdate())\n AND [sql_instance] = '$sql_instance'\n AND database_name IN ($database)\n GROUP BY fs.snapshot_time \n , left(upper([file_physical_name]),2) + ' ' + isnull(v.label,'')\n ,case when fs.[io_latency_read] > fs.[io_latency_write] then fs.[io_latency_read] else fs.[io_latency_write] end\nORDER BY\n time ASC", + "refId": "File Stats" + } + ], + "title": "Disk Latency", + "transformations": [ + { + "id": "renameByRegex", "options": { - "content": " ", - "mode": "html" + "regex": "(.Max Latency)", + "renamePattern": "IGNORE" + } + }, + { + "id": "filterFieldsByName", + "options": { + "include": { + "pattern": "/Latency/" + } + } + }, + { + "id": "renameByRegex", + "options": { + "regex": "(.Latency)", + "renamePattern": "" + } + } + ], + "type": "stat" + }, + { + "datasource": { + "uid": "$DataSource" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" }, - "pluginVersion": "7.4.2", - "targets": [ + "links": [], + "mappings": [ { - "queryType": "randomWalk", - "refId": "A" + "options": { + "0": { + "text": "OK" + }, + "1": { + "text": "WARNING" + }, + "2": { + "text": "CRITICAL" + }, + "3": { + "text": "CHECK ERROR" + } + }, + "type": "value" } ], - "timeFrom": null, - "timeShift": null, - "title": "", - "transparent": true, - "type": "text" - }, - { - "datasource": "$DataSource", - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "rgb(51, 51, 51)", - "mode": "fixed" + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(115, 191, 105, 0)", + "value": null }, - "custom": {}, - "decimals": 0, - "links": [], - "mappings": [], - "max": 1, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-green", - "value": null - } - ] + { + "color": "rgb(30, 69, 24)", + "value": 0 }, - "unit": "none" - }, - "overrides": [ { - "matcher": { - "id": "byRegexp", - "options": "/Size/" - }, - "properties": [ - { - "id": "unit", - "value": "decbytes" - } - ] + "color": "light-orange", + "value": 1 + }, + { + "color": "red", + "value": 2 }, { - "matcher": { - "id": "byRegexp", - "options": "/Growth/" - }, - "properties": [ - { - "id": "unit", - "value": "decbytes" - } - ] + "color": "dark-purple", + "value": 3 } ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 12, + "w": 3, + "x": 21, + "y": 13 + }, + "id": 224, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "limit": 15, + "values": true + }, + "text": { + "titleSize": 14, + "valueSize": 13 + }, + "textMode": "name" + }, + "pluginVersion": "9.4.7", + "targets": [ + { + "alias": "", + "datasource": { + "uid": "$DataSource" }, - "gridPos": { - "h": 5, - "w": 4, - "x": 0, - "y": 26 - }, - "id": 225, + "format": "time_series", + "hide": false, + "rawSql": "SELECT top 15 time=isnull(last_check_date,getutcdate()),[check_name] = CASE WHEN LEN([check_name]) > 28 THEN LEFT(check_name,27) + '...' ELSE [check_name] END\n ,status = CASE [last_check_status] \n WHEN 'CRITICAL' THEN 2\n WHEN 'WARNING' THEN 1\n WHEN 'OK' THEN 0\n ELSE 3 END\n FROM (select last_check_date , check_name = (replace(replace([check_name],'Database',''),' failure count',''))\n , last_check_status = case when last_check_status is null then 'CHECK ERROR' else last_check_status end\n from [dbo].[vw_sqlwatch_report_dim_check] with (nolock)\n WHERE [target_sql_instance] = '$sql_instance'\n AND check_enabled = 1\n ) t\n --AND last_check_status <> 'ok'\n --AND $__timeFilter(last_check_date)\n --AND last_check_status IN ($Status)\n order by case when last_check_status = 'OK' then dateadd(month,-12,last_check_date) else isnull(last_check_date,getutcdate()) end desc", + "refId": "A" + } + ], + "title": "Checks", + "transformations": [ + { + "id": "filterFieldsByName", + "options": {} + }, + { + "id": "organize", "options": { - "colorMode": "background", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "text": { - "titleSize": 14, - "valueSize": 16 + "excludeByName": {}, + "indexByName": { + "check_description": 1, + "check_name": 0, + "last_check_value": 3, + "status": 2 }, - "textMode": "value_and_name" + "renameByName": { + "check_description": "Description", + "check_name": "", + "last_check_date": "Check Date", + "last_check_value": "", + "status": "" + } + } + } + ], + "type": "stat" + }, + { + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 25 + }, + "id": 297, + "options": { + "code": { + "language": "plaintext", + "showLineNumbers": false, + "showMiniMap": false + }, + "content": " ", + "mode": "html" + }, + "pluginVersion": "9.4.7", + "targets": [ + { + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" }, - "pluginVersion": "7.4.2", - "targets": [ - { - "alias": "", - "format": "table", - "hide": false, - "rawSql": "select \r\n\t s.servername\r\n\t, 'All Databases' = [Databases]\r\n\t, 'Total Data Size' = [Data Size]\r\n\t, 'Total Growth Per Day' = [Growth per day]\r\n\t, 'All Agent Jobs' = [Jobs]\r\nfrom dbo.sqlwatch_meta_server s\r\n\r\nouter apply (\r\n\tselect\r\n\t [Databases]=count(db.database_name)\r\n\t, [Data Size]=sum([database_size_bytes_current])\r\n\t, [Growth per day]=sum(database_growth_bytes_per_day)\r\n\tfrom [dbo].[vw_sqlwatch_report_dim_database] db\r\n\twhere db.sql_instance = s.sql_instance\r\n) dbs\r\n\r\nouter apply (\r\n\tselect \r\n\t\t[Jobs]=count(jb.job_name)\r\n\tfrom [dbo].[vw_sqlwatch_report_dim_agent_job] jb\r\n\twhere jb.sql_instance = s.sql_instance\r\n) jbs", - "refId": "Basic Stats" + "queryType": "randomWalk", + "refId": "A" + } + ], + "transparent": true, + "type": "text" + }, + { + "datasource": { + "uid": "$DataSource" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "rgb(51, 51, 51)", + "mode": "fixed" + }, + "decimals": 0, + "links": [], + "mappings": [], + "max": 1, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [ + { + "matcher": { + "id": "byRegexp", + "options": "/Size/" }, - { - "alias": "", - "format": "table", - "hide": false, - "rawSql": "select \r\n\t s.servername\r\n\t, 'SQLWATCH Data Size' = [Data Size]\r\n\t, 'SQLWATCH Growth Per Day' = [Growth per day]\r\nfrom dbo.sqlwatch_meta_server s\r\n\r\nouter apply (\r\n\tselect\r\n\t [Databases]=count(db.database_name)\r\n\t, [Data Size]=sum([database_size_bytes_current])\r\n\t, [Growth per day]=sum(database_growth_bytes_per_day)\r\n\tfrom [dbo].[vw_sqlwatch_report_dim_database] db\r\n\twhere db.sql_instance = s.sql_instance\r\n\tand db.database_name = DB_NAME()\r\n) dbs\r\n", - "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "", - "transformations": [ - { - "id": "seriesToColumns", - "options": { - "byField": "servername" + "properties": [ + { + "id": "unit", + "value": "decbytes" } + ] + }, + { + "matcher": { + "id": "byRegexp", + "options": "/Growth/" }, - { - "id": "organize", - "options": { - "excludeByName": { - "SQLWATCH Database": false - }, - "indexByName": { - "All Agent Jobs": 4, - "All Databases": 1, - "SQLWATCH Data Size": 5, - "SQLWATCH Growth Per Day": 6, - "Total Data Size": 2, - "Total Growth Per Day": 3, - "servername": 0 - }, - "renameByName": {} + "properties": [ + { + "id": "unit", + "value": "decbytes" } - } - ], - "transparent": true, - "type": "stat" + ] + } + ] + }, + "gridPos": { + "h": 5, + "w": 4, + "x": 0, + "y": 26 + }, + "id": 225, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false }, + "text": { + "titleSize": 14, + "valueSize": 16 + }, + "textMode": "value_and_name" + }, + "pluginVersion": "9.4.7", + "targets": [ { - "datasource": "${DataSource}", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": {}, - "decimals": 0, - "mappings": [], - "max": 1, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-green", - "value": null - }, - { - "color": "orange", - "value": 0.8 - }, - { - "color": "red", - "value": 0.95 - } - ] - }, - "unit": "percentunit" - }, - "overrides": [] + "alias": "", + "datasource": { + "uid": "$DataSource" }, - "gridPos": { - "h": 5, - "w": 6, - "x": 4, - "y": 26 + "format": "table", + "hide": false, + "rawSql": "select \r\n\t s.servername\r\n\t, 'All Databases' = [Databases]\r\n\t, 'Total Data Size' = [Data Size]\r\n\t, 'Total Growth Per Day' = [Growth per day]\r\n\t, 'All Agent Jobs' = [Jobs]\r\nfrom dbo.sqlwatch_meta_server s\r\n\r\nouter apply (\r\n\tselect\r\n\t [Databases]=count(db.database_name)\r\n\t, [Data Size]=sum([database_size_bytes_current])\r\n\t, [Growth per day]=sum(database_growth_bytes_per_day)\r\n\tfrom [dbo].[vw_sqlwatch_report_dim_database] db\r\n\twhere db.sql_instance = s.sql_instance\r\n) dbs\r\n\r\nouter apply (\r\n\tselect \r\n\t\t[Jobs]=count(jb.job_name)\r\n\tfrom [dbo].[vw_sqlwatch_report_dim_agent_job] jb\r\n\twhere jb.sql_instance = s.sql_instance\r\n) jbs", + "refId": "Basic Stats" + }, + { + "alias": "", + "datasource": { + "uid": "$DataSource" }, - "id": 293, + "format": "table", + "hide": false, + "rawSql": "select \r\n\t s.servername\r\n\t, 'SQLWATCH Data Size' = [Data Size]\r\n\t, 'SQLWATCH Growth Per Day' = [Growth per day]\r\nfrom dbo.sqlwatch_meta_server s\r\n\r\nouter apply (\r\n\tselect\r\n\t [Databases]=count(db.database_name)\r\n\t, [Data Size]=sum([database_size_bytes_current])\r\n\t, [Growth per day]=sum(database_growth_bytes_per_day)\r\n\tfrom [dbo].[vw_sqlwatch_report_dim_database] db\r\n\twhere db.sql_instance = s.sql_instance\r\n\tand db.database_name = DB_NAME()\r\n) dbs\r\n", + "refId": "A" + } + ], + "transformations": [ + { + "id": "seriesToColumns", "options": { - "displayMode": "basic", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showUnfilled": true, - "text": { - "titleSize": 12, - "valueSize": 16 - } - }, - "pluginVersion": "7.4.2", - "targets": [ - { - "alias": "", - "format": "time_series", - "queryType": "randomWalk", - "rawSql": "select time=date_last_seen, left([volume_name],2)+ ' ' + isnull(label,''),1.0-[free_space_percentage]\nfrom [dbo].[vw_sqlwatch_report_dim_os_volume] \nwhere sql_instance = '$sql_instance'\norder by left([volume_name],2)", - "refId": "A" - } - ], - "title": "Disk Space Used %", - "type": "bargauge" + "byField": "servername" + } }, { - "datasource": null, - "fieldConfig": { - "defaults": { - "custom": {} + "id": "organize", + "options": { + "excludeByName": { + "SQLWATCH Database": false }, - "overrides": [] + "indexByName": { + "All Agent Jobs": 4, + "All Databases": 1, + "SQLWATCH Data Size": 5, + "SQLWATCH Growth Per Day": 6, + "Total Data Size": 2, + "Total Growth Per Day": 3, + "servername": 0 + }, + "renameByName": {} + } + } + ], + "transparent": true, + "type": "stat" + }, + { + "datasource": { + "type": "mssql", + "uid": "${DataSource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" }, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 31 + "decimals": 0, + "mappings": [], + "max": 1, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green", + "value": null + }, + { + "color": "orange", + "value": 0.8 + }, + { + "color": "red", + "value": 0.95 + } + ] }, - "id": 305, - "options": { - "content": " ", - "mode": "html" + "unit": "percentunit" + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 6, + "x": 4, + "y": 26 + }, + "id": 293, + "options": { + "displayMode": "basic", + "minVizHeight": 10, + "minVizWidth": 0, + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showUnfilled": true, + "text": { + "titleSize": 12, + "valueSize": 16 + } + }, + "pluginVersion": "9.4.7", + "targets": [ + { + "alias": "", + "datasource": { + "uid": "${DataSource}" + }, + "editorMode": "code", + "format": "time_series", + "queryType": "randomWalk", + "rawQuery": true, + "rawSql": "select time=date_last_seen, disk=left([volume_name],2)+ ' ' + isnull(label,''),1.0-[free_space_percentage]\nfrom [dbo].[vw_sqlwatch_report_dim_os_volume] \nwhere sql_instance = '$sql_instance'\norder by left([volume_name],2) asc", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + } + ], + "title": "Disk Space Used %", + "type": "bargauge" + }, + { + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 31 + }, + "id": 305, + "options": { + "code": { + "language": "plaintext", + "showLineNumbers": false, + "showMiniMap": false + }, + "content": " ", + "mode": "html" + }, + "pluginVersion": "9.4.7", + "targets": [ + { + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" }, - "pluginVersion": "7.4.2", - "targets": [ - { - "queryType": "randomWalk", - "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "", - "transparent": true, - "type": "text" + "queryType": "randomWalk", + "refId": "A" } ], - "repeat": null, - "title": "$sql_instance: SQL Server Overview", - "type": "row" + "transparent": true, + "type": "text" }, { "collapsed": true, - "datasource": null, + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "gridPos": { "h": 1, "w": 24, "x": 0, - "y": 1 + "y": 32 }, "id": 257, "panels": [ { - "datasource": null, - "fieldConfig": { - "defaults": { - "custom": {} - }, - "overrides": [] + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" }, "gridPos": { "h": 6, @@ -2247,19 +2351,25 @@ }, "id": 159, "options": { + "code": { + "language": "plaintext", + "showLineNumbers": false, + "showMiniMap": false + }, "content": "# SQL Server Blocking Chains\r\n*****\r\nBlocking chains happen when one query is holding back other queries. This happens when poorly written query is holding excessive and exclusive locks on tables. Relational databases are written with ACID properties in mind, \r\nthis means that in order to retain data integrity, only one query at a time can modify the data. To achieve this, a lock is applied so no other queries can even read the data to avoid partially written data being displayed back to the client. When blocking chains happen for long period of time, you will have the impression that the database is slow, even though it isn't. It's just doing its job. It is important to undertand how locking works to avoid blocking chains.\r\n\r\nThese graphs come from data recorded in the Extended Events Session. For this to work, you must enable blocked process monitor: `sp_configure 'blocked process threshold', 5 ; -- set desired value in seconds`", "mode": "markdown" }, - "pluginVersion": "7.4.2", + "pluginVersion": "9.4.7", "targets": [ { + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "queryType": "randomWalk", "refId": "A" } ], - "timeFrom": null, - "timeShift": null, - "title": "", "transparent": true, "type": "text" }, @@ -2268,19 +2378,11 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "$DataSource", + "datasource": { + "uid": "$DataSource" + }, "decimals": 0, "description": "", - "fieldConfig": { - "defaults": { - "custom": {}, - "thresholds": { - "mode": "absolute", - "steps": [] - } - }, - "overrides": [] - }, "fill": 1, "fillGradient": 0, "gridPos": { @@ -2307,7 +2409,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "7.4.2", + "pluginVersion": "9.4.7", "pointradius": 3, "points": false, "renderer": "flot", @@ -2324,6 +2426,9 @@ "targets": [ { "alias": "", + "datasource": { + "uid": "$DataSource" + }, "format": "time_series", "hide": false, "rawSql": "SELECT time = $__timeGroup(h.snapshot_time, $aggregation, previous)\r\n ,[Blocking Session Count] = count(session_id)\r\n FROM dbo.sqlwatch_logger_snapshot_header h\r\n left join [dbo].[ufn_sqlwatch_get_blocking_chains] ($__timeFrom(), $__timeTo(),'$sql_instance') r1\r\n on h.snapshot_time = r1.snapshot_time\r\n and h.snapshot_type_id = r1.snapshot_type_id\r\n and h.sql_instance = r1.sql_instance\r\n and blocking_session_id is null -- header only \r\n where $__timeFilter(h.snapshot_time)\r\n and h.snapshot_type_id = 9\r\n group by $__timeGroup(h.snapshot_time, $aggregation, previous), convert(varchar(10),session_id)\r\n \r\n order by time asc", @@ -2331,9 +2436,7 @@ } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "Blocking Sessions Count", "tooltip": { "shared": false, @@ -2365,9 +2468,7 @@ "transparent": true, "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, @@ -2376,34 +2477,25 @@ "$$hashKey": "object:1165", "decimals": 0, "format": "short", - "label": null, "logBase": 1, - "max": null, "min": "0", "show": true }, { "$$hashKey": "object:1166", "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": true } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } }, { - "datasource": null, - "fieldConfig": { - "defaults": { - "custom": {} - }, - "overrides": [] + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" }, "gridPos": { "h": 2, @@ -2413,31 +2505,33 @@ }, "id": 276, "options": { + "code": { + "language": "plaintext", + "showLineNumbers": false, + "showMiniMap": false + }, "content": "The Extended Events Session captures blocking chains according to the time set for the Blocking Process Monitor `select * from sys.configurations where name like 'blocked process threshold%`.\r\nFor example, if the monitor is set to 5 seconds and we have a blocking chain lasting 21 seconds, it will record it 4 times, every 5 seconds. All four occurences will be shown below.", "mode": "markdown" }, - "pluginVersion": "7.4.2", + "pluginVersion": "9.4.7", "targets": [ { + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "queryType": "randomWalk", "refId": "A" } ], - "timeFrom": null, - "timeShift": null, - "title": "", "transparent": true, "type": "text" }, { - "datasource": "${DataSource}", - "description": "", - "fieldConfig": { - "defaults": { - "custom": {} - }, - "overrides": [] + "datasource": { + "uid": "${DataSource}" }, + "description": "", "gridPos": { "h": 10, "w": 24, @@ -2446,6 +2540,10 @@ }, "id": 255, "options": { + "dedupStrategy": "none", + "enableLogDetails": true, + "prettifyLogMessage": false, + "showCommonLabels": false, "showLabels": false, "showTime": true, "sortOrder": "Descending", @@ -2455,6 +2553,9 @@ "targets": [ { "alias": "", + "datasource": { + "uid": "${DataSource}" + }, "format": "table", "queryType": "randomWalk", "rawSql": "select time=x.event_time, blocking_tree + ' (' + isnull(x.appname,'') + '; ' + isnull(x.hostname,'') + ') SQL: ' + isnull(x.sql_text,'') \nfrom [dbo].[ufn_sqlwatch_get_blocking_chains] ($__timeFrom(), $__timeTo(),'$sql_instance') x\n\norder by time", @@ -2466,49 +2567,64 @@ "type": "logs" } ], + "targets": [ + { + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, + "refId": "A" + } + ], "title": "$sql_instance: SQL Server Blocking", "type": "row" }, { "collapsed": true, - "datasource": null, + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "gridPos": { "h": 1, "w": 24, "x": 0, - "y": 2 + "y": 33 }, "id": 263, "panels": [ { - "datasource": null, - "fieldConfig": { - "defaults": { - "custom": {} - }, - "overrides": [] + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" }, "gridPos": { "h": 9, "w": 24, "x": 0, - "y": 3 + "y": 58 }, "id": 265, "options": { + "code": { + "language": "plaintext", + "showLineNumbers": false, + "showMiniMap": false + }, "content": "# SQL Server Requests\r\n*****\r\nList of current requests sampled from `dm_exec_requests`.\r\n\r\n**Runnable** - The session has been assigned a worker thread but it is waiting for CPU to become available.\r\nMany runnable threads would indicate CPU bottleneck.\r\n\r\n**Pending** - The session is awaiting a worker thread to be assigned. Unitil a workthread is assigned the session will not run even if the CPU is available.\r\nIn most cases, the worker will not be assigned due to CPU bottlenecks but in some cases, you may encounter a thread exhaustion.\r\nThis is a scenerio where SQL Server ran out of threads to allocate.\r\n\r\n**Suspended** - The session was running but has been put on hold due to lack of resources. Suspended session will likely have `wait_type` assigned to them.\r\n\r\n**Sleeping** - Sessions that SQL Server has put \"to sleep\" as they are not doing anything or could have ended recently but the connetion is still open. \r\nThis may be often observed with .NET Connection pooling. \r\n\r\nThis data provides a very high level view of the SQL Server Requests and Sessions. Becuase of the data sampling, we could be misssing a lot of the workload that happens between samples. However, this is by design, we do not want to capture too much of meaningless workload. Any transactions that cause trouble will be captured by Extended Events", "mode": "markdown" }, - "pluginVersion": "7.4.2", + "pluginVersion": "9.4.7", "targets": [ { + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "queryType": "randomWalk", "refId": "A" } ], - "timeFrom": null, - "timeShift": null, - "title": "", "transparent": true, "type": "text" }, @@ -2517,25 +2633,17 @@ "bars": true, "dashLength": 10, "dashes": false, - "datasource": "$DataSource", - "description": "", - "fieldConfig": { - "defaults": { - "custom": {}, - "thresholds": { - "mode": "absolute", - "steps": [] - } - }, - "overrides": [] + "datasource": { + "uid": "$DataSource" }, + "description": "", "fill": 1, "fillGradient": 0, "gridPos": { "h": 7, "w": 24, "x": 0, - "y": 12 + "y": 67 }, "hiddenSeries": false, "id": 264, @@ -2556,7 +2664,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "7.4.2", + "pluginVersion": "9.4.7", "pointradius": 2, "points": false, "renderer": "flot", @@ -2593,6 +2701,9 @@ "targets": [ { "alias": "", + "datasource": { + "uid": "$DataSource" + }, "format": "time_series", "hide": false, "rawSql": "SELECT time = $__timeGroup(r1.snapshot_time, $aggregation,0)\r\n , background\t= avg(background)\r\n , running = avg(running)\t\r\n , runnable = avg(runnable)\t\r\n , sleeping\t = avg(sleeping)\r\n , suspended\t = avg(suspended)\r\n , waiting_tasks\t = avg(waiting_tasks)\r\n -- , wait_duration_ms = avg(wait_duration_ms)\r\n , type = case when type = 1 then 'User' else 'System' end\r\n FROM [sqlwatch_logger_dm_exec_requests_stats] r1 (nolock)\r\n\twhere $__timeFilter(r1.snapshot_time)\r\n and r1.sql_instance = '$sql_instance'\r\n and type = 1\r\n group by $__timeGroup(r1.snapshot_time, $aggregation,0), case when type = 1 then 'User' else 'System' end\r\n order by time asc", @@ -2600,9 +2711,7 @@ } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "User Requests by Status", "tooltip": { "shared": true, @@ -2631,9 +2740,7 @@ "transparent": true, "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, @@ -2642,56 +2749,53 @@ "$$hashKey": "object:1699", "decimals": 0, "format": "short", - "label": null, "logBase": 1, - "max": null, "min": "0", "show": true }, { "$$hashKey": "object:1700", "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": true } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } }, { - "datasource": null, - "fieldConfig": { - "defaults": { - "custom": {} - }, - "overrides": [] + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" }, "gridPos": { "h": 3, "w": 24, "x": 0, - "y": 19 + "y": 74 }, "id": 272, "options": { + "code": { + "language": "plaintext", + "showLineNumbers": false, + "showMiniMap": false + }, "content": "# SQL Server Sessions\r\n*****\r\nList of current sessions sampled from `dm_exec_sessions`.\r\n", "mode": "markdown" }, - "pluginVersion": "7.4.2", + "pluginVersion": "9.4.7", "targets": [ { + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "queryType": "randomWalk", "refId": "A" } ], - "timeFrom": null, - "timeShift": null, - "title": "", "transparent": true, "type": "text" }, @@ -2700,25 +2804,17 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "$DataSource", - "description": "", - "fieldConfig": { - "defaults": { - "custom": {}, - "thresholds": { - "mode": "absolute", - "steps": [] - } - }, - "overrides": [] + "datasource": { + "uid": "$DataSource" }, + "description": "", "fill": 1, "fillGradient": 0, "gridPos": { "h": 7, "w": 24, "x": 0, - "y": 22 + "y": 77 }, "hiddenSeries": false, "id": 271, @@ -2739,7 +2835,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "7.4.2", + "pluginVersion": "9.4.7", "pointradius": 2, "points": false, "renderer": "flot", @@ -2773,6 +2869,9 @@ "targets": [ { "alias": "", + "datasource": { + "uid": "$DataSource" + }, "format": "time_series", "hide": false, "rawSql": "SELECT time = $__timeGroup(r1.snapshot_time, $aggregation)\r\n ,[running] = avg(running)\r\n ,[sleeping] = avg(sleeping)\r\n ,[dormant] = avg(dormant)\r\n ,[preconnect] = avg(preconnect)\r\n ,[cpu_time] = avg(cpu_time)\r\n ,[reads] = avg(reads)\r\n ,[writes] = avg(writes)\r\n , type = case when type = 1 then 'User' else 'System' end\r\n FROM [sqlwatch_logger_dm_exec_sessions_stats] r1 (nolock)\r\n\twhere $__timeFilter(r1.snapshot_time)\r\n and r1.sql_instance = '$sql_instance'\r\n and type = 1\r\n group by $__timeGroup(r1.snapshot_time, $aggregation), case when type = 1 then 'User' else 'System' end\r\n order by time asc", @@ -2780,9 +2879,7 @@ } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "User Sessions by Status", "tooltip": { "shared": true, @@ -2828,9 +2925,7 @@ "transparent": true, "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, @@ -2841,7 +2936,6 @@ "format": "short", "label": "", "logBase": 2, - "max": null, "min": "0", "show": true }, @@ -2851,14 +2945,12 @@ "format": "short", "label": "", "logBase": 10, - "max": null, "min": "0", "show": true } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } }, { @@ -2866,25 +2958,18 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "-- Dashboard --", - "description": "", - "fieldConfig": { - "defaults": { - "custom": {}, - "thresholds": { - "mode": "absolute", - "steps": [] - } - }, - "overrides": [] + "datasource": { + "type": "datasource", + "uid": "-- Dashboard --" }, + "description": "", "fill": 1, "fillGradient": 0, "gridPos": { "h": 7, "w": 24, "x": 0, - "y": 29 + "y": 84 }, "hiddenSeries": false, "id": 277, @@ -2905,7 +2990,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "7.4.2", + "pluginVersion": "9.4.7", "pointradius": 2, "points": false, "renderer": "flot", @@ -2915,14 +3000,16 @@ "steppedLine": false, "targets": [ { + "datasource": { + "type": "datasource", + "uid": "-- Dashboard --" + }, "panelId": 271, "refId": "A" } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "User Sessions by Resource", "tooltip": { "shared": true, @@ -2972,9 +3059,7 @@ "transparent": true, "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, @@ -2985,7 +3070,6 @@ "format": "short", "label": "Active", "logBase": 1, - "max": null, "min": "0", "show": true }, @@ -2995,60 +3079,73 @@ "format": "short", "label": "Sleeping", "logBase": 10, - "max": null, "min": "0", "show": false } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } } ], + "targets": [ + { + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, + "refId": "A" + } + ], "title": "$sql_instance: SQL Server Requests and Sessions", "type": "row" }, { "collapsed": true, - "datasource": null, + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "gridPos": { "h": 1, "w": 24, "x": 0, - "y": 3 + "y": 34 }, "id": 187, "panels": [ { - "datasource": null, - "fieldConfig": { - "defaults": { - "custom": {} - }, - "overrides": [] + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" }, "gridPos": { "h": 5, "w": 24, "x": 0, - "y": 4 + "y": 92 }, "id": 259, "options": { + "code": { + "language": "plaintext", + "showLineNumbers": false, + "showMiniMap": false + }, "content": "# SQL Server Activity and Workload\r\n*****\r\n## CPU\r\nThe CPU chart is split into System (OS) and SQL Server. In an ideal scenario, all of the utilistaison should be allocated to SQL Server and only very small amount to system. SQL Server is also licensed per core, the more CPU cores the most expensive the license. You do not want to be paying a lot of money and not use it. [See Long Queries captured during this period](/d/sqlwatch-long-queries/long-queries?${__url_time_range}&var-DataSource=${DataSource}&var-sql_instance=${sql_instance})\r\nIf you are seeing a lot of OS Utilisation but not a lot of SQL Server utilistaion it means there is something else in the OS that uses CPU. It could be that you are running multiple SQL Instances?", "mode": "markdown" }, - "pluginVersion": "7.4.2", + "pluginVersion": "9.4.7", "targets": [ { + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "queryType": "randomWalk", "refId": "A" } ], - "timeFrom": null, - "timeShift": null, - "title": "", "transparent": true, "type": "text" }, @@ -3057,16 +3154,13 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "$DataSource", + "datasource": { + "uid": "$DataSource" + }, "description": "", "fieldConfig": { "defaults": { - "custom": {}, - "links": [], - "thresholds": { - "mode": "absolute", - "steps": [] - } + "links": [] }, "overrides": [] }, @@ -3076,7 +3170,7 @@ "h": 7, "w": 24, "x": 0, - "y": 9 + "y": 97 }, "hiddenSeries": false, "id": 258, @@ -3097,7 +3191,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "7.4.2", + "pluginVersion": "9.4.7", "pointradius": 2, "points": false, "renderer": "flot", @@ -3143,6 +3237,9 @@ "targets": [ { "alias": "", + "datasource": { + "uid": "$DataSource" + }, "format": "time_series", "hide": false, "rawSql": "SELECT \n [time] = $__timeGroup([snapshot_time], $aggregation, previous)\n ,[min] = min([cntr_value_calculated])\n ,[max] = max([cntr_value_calculated])\n FROM (\n select snapshot_time, [cntr_value_calculated]=sum([cntr_value_calculated])\n from [dbo].[sqlwatch_logger_perf_os_performance_counters] pc (readpast)\n\t\tinner join [dbo].[sqlwatch_meta_performance_counter] mpc (readpast)\n\t\t\ton pc.sql_instance = mpc.sql_instance\n\t\t\tand pc.performance_counter_id = mpc.performance_counter_id \n WHERE $__timeFilter(pc.snapshot_time)\n AND mpc.counter_name = 'Processor Time %' --case when serverproperty('EngineEdition') = 3 then 'CPU usage %' else 'Processor Time %' end\n --and pc.instance_name NOT IN ('internal')\n AND pc.[sql_instance] = '$sql_instance' \n group by snapshot_time\n ) t\n GROUP BY $__timeGroup([snapshot_time], $aggregation)\nORDER BY\n time ASC\n\n ", @@ -3150,6 +3247,9 @@ }, { "alias": "", + "datasource": { + "uid": "$DataSource" + }, "format": "time_series", "hide": false, "rawSql": "SELECT \n [time] = $__timeGroup(pc.[snapshot_time], $aggregation, previous)\n ,metric = case when instance_name = 'system' then 'OS' else 'SQL Server' end\n ,[value] = avg(pc.[cntr_value_calculated])\n FROM [dbo].[sqlwatch_logger_perf_os_performance_counters] pc\n\t\tinner join [dbo].[sqlwatch_meta_performance_counter] mpc\n\t\t\ton pc.sql_instance = mpc.sql_instance\n\t\t\tand pc.performance_counter_id = mpc.performance_counter_id \n WHERE $__timeFilter(pc.snapshot_time)\n AND mpc.counter_name IN ('Processor Time %')\n and pc.instance_name IN ('sql','system')\n AND pc.[sql_instance] = '$sql_instance'\n GROUP BY $__timeGroup(pc.[snapshot_time], $aggregation) , case when instance_name = 'system' then 'OS' else 'SQL Server' end\nORDER BY\n time ASC\n \n ", @@ -3157,9 +3257,7 @@ } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "Processor Utilisation", "tooltip": { "shared": true, @@ -3191,9 +3289,7 @@ "transparent": true, "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, @@ -3211,79 +3307,81 @@ { "$$hashKey": "object:192", "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": true } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } }, { - "datasource": null, - "fieldConfig": { - "defaults": { - "custom": {} - }, - "overrides": [] + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" }, "gridPos": { "h": 3, "w": 24, "x": 0, - "y": 16 + "y": 104 }, "id": 192, "options": { + "code": { + "language": "plaintext", + "showLineNumbers": false, + "showMiniMap": false + }, "content": "# Captured Wait Events\r\nWait events longer than 1 second captured by extended events session.\r\n[See captured queries and transactions that have contributed to the wait](/d/sqlwatch-wait-events/wait-events?${__url_time_range}&var-DataSource=${DataSource}&var-sql_instance=${sql_instance})", "mode": "markdown" }, - "pluginVersion": "7.4.2", + "pluginVersion": "9.4.7", "targets": [ { + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "queryType": "randomWalk", "refId": "A" } ], - "timeFrom": null, - "timeShift": null, - "title": "", "transparent": true, "type": "text" }, { - "datasource": null, - "fieldConfig": { - "defaults": { - "custom": {} - }, - "overrides": [] + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" }, "gridPos": { "h": 11, "w": 24, "x": 0, - "y": 19 + "y": 107 }, "id": 43, "options": { + "code": { + "language": "plaintext", + "showLineNumbers": false, + "showMiniMap": false + }, "content": " \r\n\r\n## Activity \r\n\r\n**Batch Requests/sec**: The number of batch requests received per second and is a good general indicator for the activity level of the SQL Server. This counter is highly dependent on the hardware and quality of code running on the server. The more powerful the hardware, the higher this number can be, even on poorly coded applications. A value of 1000 batch requests/sec is easily attainable, though a typical 100Mbs NIC can only handle about 3000 batch requests/sec. Many other counter thresholds depend upon batch requests/sec while, in some cases, a low (or high) number does not point to poor processing power. You should frequently use this counter in combination with other counters, such as processor utilization or user connections. In version 2000, \"Transactions/ sec\" was the counter most often used to measure overall activity, while versions 2005 and later use \"Batch Requests/sec\". Versions 2005 before SP2, measure this counter differently and may lead to some misunderstandings. Read the footnote for more details.\r\n\r\n**SQL Compilations/sec**: Number of times that Transact-SQL compilations occurred, per second (including recompiles). The lower this value is the better. High values often indicate excessive ad-hoc querying and should be as low as possible. If excessive ad-hoc querying is happening, try rewriting the queries as procedures or invoke the queries using sp_executeSQL. When rewriting isn’t possible, consider using a plan guide or setting the database to parameterization forced mode.\r\n\r\n**SQL Re-Compilations/sec**: The number of times, per second, that Transact-SQL objects attempted to be executed but had to be recompiled before completion. This number should be at or near zero since recompiles can cause deadlocks and exclusive compile locks. This counter’s value should follow in proportion to \"Batch Requests/sec\" and \"SQL Compilations/ sec\". This needs to be nil in your system as much as possible.\r\n\r\n**Logins/sec**: *You want < 2* The number of user logins per second. Any value over 2 may indicate insufficient connection pooling.\r\n\r\nUser Connections: The number of users currently connected to the SQL Server. This counter should roughly track with \"Batch Requests/Sec\". They should generally rise and fall together. For example, blocking problems could be revealed by rising user connections, lock waits and lock wait time coupled with declining batch requests/sec.\r\n\r\n**Transactions/sec**: Number of transactions started for the database per second.", "mode": "markdown" }, - "pluginVersion": "7.4.2", + "pluginVersion": "9.4.7", "targets": [ { + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "queryType": "randomWalk", "refId": "A" } ], - "timeFrom": null, - "timeShift": null, - "title": "", "transparent": true, "type": "text" }, @@ -3292,17 +3390,12 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "$DataSource", - "decimals": null, + "datasource": { + "uid": "$DataSource" + }, "description": "", "fieldConfig": { "defaults": { - "color": {}, - "custom": {}, - "thresholds": { - "mode": "absolute", - "steps": [] - }, "unit": "short" }, "overrides": [] @@ -3313,7 +3406,7 @@ "h": 7, "w": 24, "x": 0, - "y": 30 + "y": 118 }, "hiddenSeries": false, "id": 231, @@ -3337,7 +3430,7 @@ "alertThreshold": false }, "percentage": false, - "pluginVersion": "7.4.2", + "pluginVersion": "9.4.7", "pointradius": 2, "points": false, "renderer": "flot", @@ -3348,6 +3441,9 @@ "targets": [ { "alias": "", + "datasource": { + "uid": "$DataSource" + }, "format": "time_series", "hide": false, "rawSql": "select t.*\n\t --rate calcs\n\t ,[SQL Compilations Rate] = case when [Batch Requests/sec] > 0 then [SQL Compilations/sec] / [Batch Requests/sec] else 0 end\n\t ,[SQL Re-Compilations Rate] = case when [SQL Compilations/sec] > 0 then [SQL Re-Compilations/sec] / [SQL Compilations/sec] else 0 end\nfrom (\n SELECT \n [time] = $__timeGroup([snapshot_time], $aggregation) \n \t\t ,'SQL Compilations/sec' = AVG(case when counter_name = 'SQL Compilations/sec' then [cntr_value_calculated] else null end)\n \t\t ,'SQL Re-Compilations/sec' = AVG(case when counter_name = 'SQL Re-Compilations/sec' then [cntr_value_calculated] else null end)\n \t\t ,'Batch Requests/sec' = AVG(case when counter_name = 'Batch Requests/sec' then [cntr_value_calculated] else null end)\n \t\t ,'Logins/sec' = AVG(case when counter_name = 'Logins/sec' then [cntr_value_calculated] else null end)\n \t\t ,'Transactions/sec' = AVG(case when counter_name = 'Transactions/sec' then [cntr_value_calculated] else null end)\n \t\t ,'User Connections' = AVG(case when counter_name = 'User Connections' then [cntr_value_calculated] else null end)\n FROM [dbo].[vw_sqlwatch_report_fact_perf_os_performance_counters]\n WHERE [aggregation_interval_minutes] = 0\n AND $__timeFilter(snapshot_time)\n AND counter_name IN (\n \t\t'SQL Compilations/sec'\n \t\t,'SQL Re-Compilations/sec'\n \t\t,'Batch Requests/sec'\n \t\t,'Logins/sec'\n \t\t,'Transactions/sec'\n \t\t,'User Connections'\n \t\t,'SQL Compilations/sec'\n \t\t,'SQL Re-Compilations/sec')\n AND [sql_instance] = '$sql_instance'\n GROUP BY $__timeGroup([snapshot_time], $aggregation)\n ) t\nORDER BY\n time ASC\noption (keep plan)", @@ -3355,9 +3451,7 @@ } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "Activity", "tooltip": { "shared": true, @@ -3398,36 +3492,27 @@ "transparent": true, "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, "yaxes": [ { "$$hashKey": "object:1758", - "decimals": null, "format": "short", "label": "", "logBase": 1, - "max": null, - "min": null, "show": true }, { "$$hashKey": "object:1759", "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": false } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } }, { @@ -3435,16 +3520,13 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "$DataSource", + "datasource": { + "uid": "$DataSource" + }, "description": "", "fieldConfig": { "defaults": { - "custom": {}, - "links": [], - "thresholds": { - "mode": "absolute", - "steps": [] - } + "links": [] }, "overrides": [] }, @@ -3454,7 +3536,7 @@ "h": 7, "w": 24, "x": 0, - "y": 37 + "y": 125 }, "hiddenSeries": false, "hideTimeOverride": false, @@ -3476,7 +3558,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "7.4.2", + "pluginVersion": "9.4.7", "pointradius": 2, "points": false, "renderer": "flot", @@ -3487,6 +3569,9 @@ "targets": [ { "alias": "", + "datasource": { + "uid": "$DataSource" + }, "format": "time_series", "hide": false, "rawSql": "SELECT \n [time] = $__timeGroup([snapshot_time], $aggregation) \n ,metric = [instance_name]\n ,[value] = AVG([cntr_value_calculated])\n FROM [dbo].[vw_sqlwatch_report_fact_perf_os_performance_counters]\n WHERE [aggregation_interval_minutes] = 0\n AND $__timeFilter(snapshot_time)\n AND counter_name IN ('Transactions/sec')\n AND instance_name IN ($database)\n AND [sql_instance] = '$sql_instance'\n GROUP BY [instance_name]\n ,$__timeGroup([snapshot_time], $aggregation) \nORDER BY\n time ASC\n option (keep plan)\n ", @@ -3494,9 +3579,7 @@ } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "Database Transactions /sec", "tooltip": { "shared": true, @@ -3506,9 +3589,7 @@ "transparent": true, "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, @@ -3519,54 +3600,52 @@ "format": "short", "label": "", "logBase": 1, - "max": null, "min": "0", "show": true }, { "$$hashKey": "object:1841", "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": true } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } }, { - "datasource": null, - "fieldConfig": { - "defaults": { - "custom": {} - }, - "overrides": [] + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" }, "gridPos": { "h": 6, "w": 24, "x": 0, - "y": 44 + "y": 132 }, "id": 109, "options": { + "code": { + "language": "plaintext", + "showLineNumbers": false, + "showMiniMap": false + }, "content": "

SQL Compilations

\r\n\r\n

SQL Compilations/sec: You want it to be < 10% (of the number of Batch Requests/Sec). Number of times that Transact-SQL compilations occurred, per second (including recompiles). The lower this value is the better. High values often indicate excessive ad-hoc querying and should be as low as possible. If excessive ad-hoc querying is happening, try rewriting the queries as procedures or invoke the queries using sp_executeSQL. When rewriting isn’t possible, consider using a plan guide or setting the database to parameterization forced mode.

\r\n\r\n

SQL Re-Compilations/sec: You want it to be < 10% (of the number of SQL Compilations/sec). The number of times, per second, that Transact-SQL objects attempted to be executed but had to be recompiled before completion. This number should be at or near zero since recompiles can cause deadlocks and exclusive compile locks. This counter’s value should follow in proportion to \"Batch Requests/sec\" and \"SQL Compilations/ sec\". This needs to be nil in your system as much as possible.

\r\n", "mode": "html" }, - "pluginVersion": "7.4.2", + "pluginVersion": "9.4.7", "targets": [ { + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "queryType": "randomWalk", "refId": "A" } ], - "timeFrom": null, - "timeShift": null, - "title": "", "transparent": true, "type": "text" }, @@ -3575,16 +3654,14 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "-- Dashboard --", + "datasource": { + "type": "datasource", + "uid": "-- Dashboard --" + }, "description": "", "fieldConfig": { "defaults": { - "custom": {}, - "links": [], - "thresholds": { - "mode": "absolute", - "steps": [] - } + "links": [] }, "overrides": [] }, @@ -3594,7 +3671,7 @@ "h": 7, "w": 24, "x": 0, - "y": 50 + "y": 138 }, "hiddenSeries": false, "id": 6, @@ -3615,7 +3692,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "7.4.2", + "pluginVersion": "9.4.7", "pointradius": 2, "points": false, "renderer": "flot", @@ -3636,6 +3713,10 @@ "steppedLine": false, "targets": [ { + "datasource": { + "type": "datasource", + "uid": "-- Dashboard --" + }, "panelId": 231, "refId": "A" } @@ -3660,9 +3741,7 @@ "yaxis": "left" } ], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "Compilation Rate", "tooltip": { "shared": true, @@ -3698,9 +3777,7 @@ "transparent": true, "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, @@ -3711,69 +3788,79 @@ "format": "percentunit", "label": "", "logBase": 1, - "max": null, "min": "0", "show": true }, { "$$hashKey": "object:1203", "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": true } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } } ], + "targets": [ + { + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, + "refId": "A" + } + ], "title": "$sql_instance: SQL Server Activity", "type": "row" }, { "collapsed": true, - "datasource": null, + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "gridPos": { "h": 1, "w": 24, "x": 0, - "y": 4 + "y": 35 }, "id": 309, "panels": [ { - "datasource": null, - "fieldConfig": { - "defaults": { - "custom": {} - }, - "overrides": [] + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" }, "gridPos": { "h": 4, "w": 24, "x": 0, - "y": 1 + "y": 93 }, "id": 110, "options": { + "code": { + "language": "plaintext", + "showLineNumbers": false, + "showMiniMap": false + }, "content": "# Wait Times\r\n\r\nIf a particular resource is not available, SQL Server will have to wait before it can process the query. For example, if the storage is too slow, SQL Server will have to wait for the disk \"to deliver\" the data. Analogically, if the CPU is too busy, SQL Server will have to wait for it to become available.\r\nAll this means, that if SQL is waiting too much, our queries do not get executed straight away but are put in a queue which makes the system feel slow. This chart is critical in understanding what SQL Server is waiting on. The SQLSkills website is a great resource to learn about waits:\r\n[https://www.sqlskills.com/help/waits/](https://www.sqlskills.com/help/waits/). You can change how the wait types are grouped, either by Type or Category, using the filter on top or link in the chart.", "mode": "markdown" }, - "pluginVersion": "7.4.2", + "pluginVersion": "9.4.7", "targets": [ { + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "queryType": "randomWalk", "refId": "A" } ], - "timeFrom": null, - "timeShift": null, - "title": "", "transparent": true, "type": "text" }, @@ -3782,21 +3869,18 @@ "bars": true, "dashLength": 10, "dashes": false, - "datasource": "$DataSource", + "datasource": { + "uid": "$DataSource" + }, "description": "", "fieldConfig": { "defaults": { - "custom": {}, "links": [ { "title": "Wait Events", "url": "/d/sqlwatchwaits/wait-events?${__url_time_range}" } - ], - "thresholds": { - "mode": "absolute", - "steps": [] - } + ] }, "overrides": [] }, @@ -3806,7 +3890,7 @@ "h": 11, "w": 24, "x": 0, - "y": 5 + "y": 97 }, "hiddenSeries": false, "id": 232, @@ -3839,7 +3923,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "7.4.2", + "pluginVersion": "9.4.7", "pointradius": 2, "points": false, "renderer": "flot", @@ -3863,6 +3947,9 @@ "targets": [ { "alias": "", + "datasource": { + "uid": "$DataSource" + }, "format": "time_series", "hide": false, "rawSql": "SELECT \n [time] = $__timeGroup([snapshot_time], $aggregation) \n ,metric = case when '$Waits' = 'Category' then [wait_category] else [wait_type] end\n ,[value] = case when '$WaitCalc' = 'ms/sec' then avg([wait_time_ms_per_second]) else avg(wait_time_ms_delta) end\n FROM [dbo].[vw_sqlwatch_report_fact_perf_os_wait_stats]\n WHERE 1=1\n AND $__timeFilter(snapshot_time)\n AND [sql_instance] = '$sql_instance'\n GROUP BY case when '$Waits' = 'Category' then [wait_category] else [wait_type] end\n ,$__timeGroup([snapshot_time], $aggregation) \nORDER BY\n time ASC\n option (keep plan)\n ", @@ -3870,9 +3957,7 @@ } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "Wait Time $WaitCalc by Wait $Waits", "tooltip": { "shared": false, @@ -3883,9 +3968,7 @@ "transparent": true, "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, @@ -3896,23 +3979,19 @@ "format": "ms", "label": "", "logBase": 1, - "max": null, "min": "0", "show": true }, { "$$hashKey": "object:2017", "format": "ms", - "label": null, "logBase": 1, - "max": null, "min": "0", "show": false } ], "yaxis": { - "align": true, - "alignLevel": null + "align": true } }, { @@ -3920,16 +3999,12 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "$DataSource", + "datasource": { + "uid": "$DataSource" + }, "description": "", "fieldConfig": { "defaults": { - "color": {}, - "custom": {}, - "thresholds": { - "mode": "absolute", - "steps": [] - }, "unit": "ms" }, "overrides": [] @@ -3940,7 +4015,7 @@ "h": 5, "w": 24, "x": 0, - "y": 16 + "y": 108 }, "hiddenSeries": false, "id": 191, @@ -3967,7 +4042,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "7.4.2", + "pluginVersion": "9.4.7", "pointradius": 3, "points": true, "renderer": "flot", @@ -3978,15 +4053,16 @@ "targets": [ { "alias": "", + "datasource": { + "uid": "$DataSource" + }, "format": "time_series", "rawSql": "SELECT \n [time]= event_time\n ,[Wait Type] = case when '$Waits' = 'Category' then [wait_category] else [wait_type] end\n ,[Wait Duration] = sum([duration])\n FROM [vw_sqlwatch_report_fact_xes_wait_events]\n \n WHERE $__timeFilter(event_time)\n AND [sql_instance] = '$sql_instance'\n\n group by event_time,case when '$Waits' = 'Category' then [wait_category] else [wait_type] end\nORDER BY\n time ASC\n option (keep plan)", "refId": "A" } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "Wait Events", "tooltip": { "shared": true, @@ -3997,9 +4073,7 @@ "transparent": true, "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, @@ -4007,35 +4081,33 @@ { "$$hashKey": "object:2096", "format": "ms", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": true }, { "$$hashKey": "object:2097", "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": true } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } }, { - "datasource": "$DataSource", + "datasource": { + "uid": "$DataSource" + }, "fieldConfig": { "defaults": { "custom": { - "align": null, - "displayMode": "auto", - "filterable": false + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "filterable": false, + "inspect": false }, "links": [], "mappings": [], @@ -4132,7 +4204,7 @@ "h": 5, "w": 24, "x": 0, - "y": 21 + "y": 113 }, "id": 194, "links": [ @@ -4143,6 +4215,14 @@ } ], "options": { + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, "showHeader": true, "sortBy": [ { @@ -4151,17 +4231,18 @@ } ] }, - "pluginVersion": "7.4.2", + "pluginVersion": "9.4.7", "targets": [ { "alias": "", + "datasource": { + "uid": "$DataSource" + }, "format": "table", "rawSql": "select \t event_time\t\n\t,wait_type\t\n\t,wait_category\t\n\t--,activity_id = convert(varchar(36),activity_id)\t\n\t--,activity_id_sequence\t\n\t,duration\t\n\t---,signal_duration\t\n\t,session_id\t\n\t,username\t\n\t,client_hostname\t\n\t,client_app_name\t\n\t,database_name\t\n\t--,sql_instance\t\n\t--,snapshot_time\t\n\t--,snapshot_type_id\n\t--,sqlwatch_query_hash = '--0x'+convert(varchar(max),sqlwatch_query_hash,2)\nfrom [dbo].[vw_sqlwatch_report_fact_xes_wait_events] \nWHERE [sql_instance] = '$sql_instance'\nAND $__timeFilter(event_time)", "refId": "A" } ], - "timeFrom": null, - "timeShift": null, "title": "Queries", "transformations": [ { @@ -4191,49 +4272,64 @@ "type": "table" } ], + "targets": [ + { + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, + "refId": "A" + } + ], "title": "$sql_instance: SQL Server Waits", "type": "row" }, { "collapsed": true, - "datasource": null, + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "gridPos": { "h": 1, "w": 24, "x": 0, - "y": 5 + "y": 36 }, "id": 208, "panels": [ { - "datasource": null, - "fieldConfig": { - "defaults": { - "custom": {} - }, - "overrides": [] + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" }, "gridPos": { "h": 6, "w": 24, "x": 0, - "y": 35 + "y": 172 }, "id": 112, "options": { + "code": { + "language": "plaintext", + "showLineNumbers": false, + "showMiniMap": false + }, "content": "

Scheduler Tasks

\r\n

SQL Server has its own, internal task mechanism controlled by the SQLOS. Every time we run a query, SQL Server will invoke one or more tasks to run this task, get data from tables etc. SQL Server has one scheduler per CPU thread. More details.
\r\nRunnable Tasks: You want 0. Number of workers, with tasks assigned to them, that are waiting to be scheduled on the runnable queue. If this number is high, it may indicate CPU pressure.
\r\nPending Disk IO: You want 0. Number of pending I/Os that are waiting to be completed.
\r\nFailed To Create Worker: You want 0. Inability to create new work generally occurs because of memory constraints.
\r\nTasks Queue: You want 0. Shows number of tasks awaiting a worker to pick them up.
\r\nCurrent Tasks: Number of tasks assigned to a scheduler. Task can be actively running or waiting.\r\n

", "mode": "html" }, - "pluginVersion": "7.4.2", + "pluginVersion": "9.4.7", "targets": [ { + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "queryType": "randomWalk", "refId": "A" } ], - "timeFrom": null, - "timeShift": null, - "title": "", "transparent": true, "type": "text" }, @@ -4242,16 +4338,13 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "$DataSource", + "datasource": { + "uid": "$DataSource" + }, "description": "", "fieldConfig": { "defaults": { - "custom": {}, - "links": [], - "thresholds": { - "mode": "absolute", - "steps": [] - } + "links": [] }, "overrides": [] }, @@ -4261,7 +4354,7 @@ "h": 7, "w": 24, "x": 0, - "y": 41 + "y": 178 }, "hiddenSeries": false, "id": 12, @@ -4282,7 +4375,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "7.4.2", + "pluginVersion": "9.4.7", "pointradius": 2, "points": false, "renderer": "flot", @@ -4304,6 +4397,9 @@ "targets": [ { "alias": "", + "datasource": { + "uid": "$DataSource" + }, "format": "time_series", "hide": false, "rawSql": "SELECT \n [time] = $__timeGroup([snapshot_time], $aggregation, previous) \n ,[Runnable Tasks] = AVG([runnable_tasks_count])\n ,[Pending Disk IO] = AVG(pending_disk_io_count)\n ,[Failed To Create Worker] = AVG(failed_to_create_worker)\n ,[Tasks Queue] = AVG(work_queue_count)\n ,[Current Tasks] = avg(current_tasks_count)\n FROM [dbo].[vw_sqlwatch_report_fact_perf_os_schedulers]\n WHERE 1 = 1\n AND $__timeFilter(snapshot_time)\n AND [sql_instance] = '$sql_instance'\n GROUP BY $__timeGroup([snapshot_time], $aggregation, previous) \nORDER BY\n time ASC\n \n ", @@ -4311,9 +4407,7 @@ } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "Scheduler Tasks", "tooltip": { "shared": true, @@ -4323,34 +4417,26 @@ "transparent": true, "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, "yaxes": [ { - "decimals": null, "format": "short", "label": "", "logBase": 1, - "max": null, "min": "0", "show": true }, { "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": true } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } }, { @@ -4358,7 +4444,9 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "$DataSource", + "datasource": { + "uid": "$DataSource" + }, "description": "", "fieldConfig": { "defaults": { @@ -4377,7 +4465,7 @@ "h": 6, "w": 24, "x": 0, - "y": 48 + "y": 185 }, "hiddenSeries": false, "id": 206, @@ -4420,6 +4508,9 @@ "targets": [ { "alias": "", + "datasource": { + "uid": "$DataSource" + }, "format": "time_series", "hide": false, "rawSql": "SELECT time= $__timeGroup([snapshot_time], $aggregation, previous) \r\n ,[max_workers]=MAX([max_workers])\r\n ,[workers_created]=AVG([workers_created])\r\n ,[idle_workers]=AVG([idle_workers])\r\n ,[pending_tasks]=AVG([pending_tasks])\r\n FROM [dbo].[sqlwatch_logger_xes_query_processing]\r\n WHERE $__timeFilter(snapshot_time)\r\n AND [sql_instance] = '$sql_instance'\r\n GROUP BY $__timeGroup([snapshot_time], $aggregation, previous) \r\nORDER BY\r\n time ASC", @@ -4427,9 +4518,7 @@ } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "Query Processing", "tooltip": { "shared": true, @@ -4439,9 +4528,7 @@ "transparent": true, "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, @@ -4451,26 +4538,24 @@ "format": "short", "label": "", "logBase": 1, - "max": null, "min": "0", "show": true }, { "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": true } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } }, { - "datasource": null, + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "fieldConfig": { "defaults": { "custom": {} @@ -4481,7 +4566,7 @@ "h": 6, "w": 24, "x": 0, - "y": 54 + "y": 191 }, "id": 108, "options": { @@ -4491,13 +4576,14 @@ "pluginVersion": "7.4.2", "targets": [ { + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "queryType": "randomWalk", "refId": "A" } ], - "timeFrom": null, - "timeShift": null, - "title": "", "transparent": true, "type": "text" }, @@ -4506,8 +4592,9 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "$DataSource", - "decimals": null, + "datasource": { + "uid": "$DataSource" + }, "description": "", "fieldConfig": { "defaults": { @@ -4527,7 +4614,7 @@ "h": 6, "w": 24, "x": 0, - "y": 60 + "y": 197 }, "hiddenSeries": false, "id": 209, @@ -4562,6 +4649,9 @@ "targets": [ { "alias": "", + "datasource": { + "uid": "$DataSource" + }, "format": "time_series", "hide": false, "rawSql": "SELECT \n [time] = $__timeGroup([snapshot_time], $aggregation) \n ,'Auto-Param Attempts/sec' = avg(case when [counter_name] = 'Auto-Param Attempts/sec' then [cntr_value_calculated] else null end)\n ,'Failed Auto-Params/sec' = avg(case when [counter_name] = 'Failed Auto-Params/sec' then [cntr_value_calculated] else null end)\n ,'Forced Parameterizations/sec' = avg(case when [counter_name] = 'Forced Parameterizations/sec' then [cntr_value_calculated] else null end)\n ,'Safe Auto-Params/sec' = avg(case when [counter_name] = 'Safe Auto-Params/sec' then [cntr_value_calculated] else null end)\n ,'Unsafe Auto-Params/sec' = avg(case when [counter_name] = 'Unsafe Auto-Params/sec' then [cntr_value_calculated] else null end)\n ,'Errors/sec' = avg(case when [counter_name] = 'Errors/sec' and [instance_name] not in ('User Errors','Info Errors','_Total') then [cntr_value_calculated] else null end)\n FROM [dbo].[vw_sqlwatch_report_fact_perf_os_performance_counters]\n WHERE [aggregation_interval_minutes] = 0\n AND $__timeFilter(snapshot_time)\n AND counter_name IN ('Auto-Param Attempts/sec','Failed Auto-Params/sec','Forced Parameterizations/sec','Safe Auto-Params/sec','Unsafe Auto-Params/sec'\n ,'Errors/sec')\n AND [sql_instance] = '$sql_instance'\n GROUP BY $__timeGroup([snapshot_time], $aggregation)\nORDER BY\n time ASC", @@ -4569,9 +4659,7 @@ } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "Parametrization", "tooltip": { "shared": true, @@ -4598,9 +4686,7 @@ "transparent": true, "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, @@ -4610,26 +4696,24 @@ "format": "short", "label": "", "logBase": 1, - "max": null, "min": "0", "show": true }, { "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": false } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } }, { - "datasource": null, + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "fieldConfig": { "defaults": { "custom": {} @@ -4640,7 +4724,7 @@ "h": 4, "w": 24, "x": 0, - "y": 66 + "y": 203 }, "id": 210, "options": { @@ -4650,13 +4734,14 @@ "pluginVersion": "7.4.2", "targets": [ { + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "queryType": "randomWalk", "refId": "A" } ], - "timeFrom": null, - "timeShift": null, - "title": "", "transparent": true, "type": "text" }, @@ -4665,7 +4750,9 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "${DataSource}", + "datasource": { + "uid": "${DataSource}" + }, "description": "", "fieldConfig": { "defaults": { @@ -4685,7 +4772,7 @@ "h": 6, "w": 24, "x": 0, - "y": 70 + "y": 207 }, "hiddenSeries": false, "id": 87, @@ -4722,6 +4809,9 @@ "targets": [ { "alias": "", + "datasource": { + "uid": "${DataSource}" + }, "format": "time_series", "hide": false, "rawSql": "SELECT [time] = h.snapshot_time\r\n , [Long Sessions]=count(distinct [session_id])\r\n \r\n FROM [dbo].[sqlwatch_logger_snapshot_header] h --this is so we always get row to show the tile, even if there are no rows in the data view. otherwise the tile will not be shown\r\n left join [dbo].[vw_sqlwatch_report_fact_xes_long_queries] l\r\n on h.sql_instance = l.sql_instance\r\n and h.snapshot_time = l.snapshot_time\r\n and h.snapshot_type_id = l.snapshot_type_id\r\n where h.[sql_instance] = '$sql_instance'\r\n AND $__timeFilter(h.snapshot_time)\r\n group by h.snapshot_time\r\nORDER BY\r\n time desc", @@ -4729,9 +4819,7 @@ } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "Long Processes", "tooltip": { "shared": true, @@ -4741,9 +4829,7 @@ "transparent": true, "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, @@ -4752,29 +4838,26 @@ "$$hashKey": "object:118", "decimals": 0, "format": "short", - "label": null, "logBase": 1, - "max": null, "min": "0", "show": true }, { "$$hashKey": "object:119", "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": true } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } }, { - "datasource": null, + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "fieldConfig": { "defaults": { "custom": {} @@ -4785,7 +4868,7 @@ "h": 4, "w": 24, "x": 0, - "y": 76 + "y": 213 }, "id": 111, "options": { @@ -4795,13 +4878,14 @@ "pluginVersion": "7.4.2", "targets": [ { + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "queryType": "randomWalk", "refId": "A" } ], - "timeFrom": null, - "timeShift": null, - "title": "", "transparent": true, "type": "text" }, @@ -4810,7 +4894,10 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "-- Dashboard --", + "datasource": { + "type": "datasource", + "uid": "-- Dashboard --" + }, "description": "", "fieldConfig": { "defaults": { @@ -4828,7 +4915,7 @@ "h": 6, "w": 24, "x": 0, - "y": 80 + "y": 217 }, "hiddenSeries": false, "id": 9, @@ -4864,14 +4951,16 @@ "steppedLine": false, "targets": [ { + "datasource": { + "type": "datasource", + "uid": "-- Dashboard --" + }, "panelId": 209, "refId": "A" } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "Errors/sec", "tooltip": { "shared": true, @@ -4894,9 +4983,7 @@ "transparent": true, "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, @@ -4904,43 +4991,52 @@ { "decimals": 0, "format": "short", - "label": null, "logBase": 1, - "max": null, "min": "0", "show": true }, { "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": true } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } } ], + "targets": [ + { + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, + "refId": "A" + } + ], "title": "$sql_instance: SQL Server Query Processing", "type": "row" }, { "collapsed": true, - "datasource": null, + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "gridPos": { "h": 1, "w": 24, "x": 0, - "y": 6 + "y": 37 }, "id": 185, "panels": [ { - "datasource": null, + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "description": "", "fieldConfig": { "defaults": { @@ -4962,12 +5058,14 @@ "pluginVersion": "7.4.2", "targets": [ { + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "queryType": "randomWalk", "refId": "A" } ], - "timeFrom": null, - "timeShift": null, "title": "", "transparent": true, "type": "text" @@ -4977,7 +5075,9 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "$DataSource", + "datasource": { + "uid": "$DataSource" + }, "description": "", "fieldConfig": { "defaults": { @@ -5040,6 +5140,9 @@ "targets": [ { "alias": "", + "datasource": { + "uid": "$DataSource" + }, "format": "time_series", "hide": false, "rawSql": "SELECT \n [time] = $__timeGroup([snapshot_time], $aggregation) \n ,'Lock Requests/sec' = avg(case when [counter_name] = 'Lock Requests/sec' then [cntr_value_calculated] else null end)\n ,'Batch Requests/sec' = avg(case when [counter_name] = 'Batch Requests/sec' then [cntr_value_calculated] else null end)\n ,'Lock Timeouts/sec' = avg(case when [counter_name] = 'Lock Timeouts/sec' then [cntr_value_calculated] else null end)\n ,'Lock Waits/sec' = avg(case when [counter_name] = 'Lock Waits/sec' then [cntr_value_calculated] else null end)\n ,'Average Wait Time (ms)' = avg(case when [counter_name] = 'Average Wait Time (ms)' then [cntr_value_calculated] else null end)\n ,'Processes blocked' = sum(case when [counter_name] = 'Processes blocked' then [cntr_value_calculated] else null end)\n FROM [dbo].[vw_sqlwatch_report_fact_perf_os_performance_counters]\n WHERE [aggregation_interval_minutes] = 0\n AND $__timeFilter(snapshot_time)\n AND counter_name IN ('Lock Requests/sec','Batch Requests/sec','Lock Timeouts/sec','Lock Waits/sec','Average Wait Time (ms)','Processes blocked')\n AND [sql_instance] = '$sql_instance'\n GROUP BY $__timeGroup([snapshot_time], $aggregation) \nORDER BY\n time ASC\n \n ", @@ -5047,9 +5150,7 @@ } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "Lock Requests/sec", "tooltip": { "shared": true, @@ -5073,9 +5174,7 @@ "transparent": true, "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, @@ -5085,26 +5184,24 @@ "format": "short", "label": "", "logBase": 1, - "max": null, "min": "0", "show": true }, { "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": true } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } }, { - "datasource": null, + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "fieldConfig": { "defaults": { "custom": {} @@ -5125,12 +5222,14 @@ "pluginVersion": "7.4.2", "targets": [ { + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "queryType": "randomWalk", "refId": "A" } ], - "timeFrom": null, - "timeShift": null, "title": "", "transparent": true, "type": "text" @@ -5140,7 +5239,10 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "-- Dashboard --", + "datasource": { + "type": "datasource", + "uid": "-- Dashboard --" + }, "description": "", "fieldConfig": { "defaults": { @@ -5195,14 +5297,16 @@ "steppedLine": false, "targets": [ { + "datasource": { + "type": "datasource", + "uid": "-- Dashboard --" + }, "panelId": 79, "refId": "A" } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "Lock Timeouts/sec", "tooltip": { "shared": true, @@ -5225,9 +5329,7 @@ "transparent": true, "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, @@ -5237,26 +5339,24 @@ "format": "short", "label": "", "logBase": 1, - "max": null, "min": "0", "show": true }, { "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": true } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } }, { - "datasource": null, + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "fieldConfig": { "defaults": { "custom": {} @@ -5277,12 +5377,14 @@ "pluginVersion": "7.4.2", "targets": [ { + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "queryType": "randomWalk", "refId": "A" } ], - "timeFrom": null, - "timeShift": null, "title": "", "transparent": true, "type": "text" @@ -5292,7 +5394,10 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "-- Dashboard --", + "datasource": { + "type": "datasource", + "uid": "-- Dashboard --" + }, "description": "", "fieldConfig": { "defaults": { @@ -5347,14 +5452,16 @@ "steppedLine": false, "targets": [ { + "datasource": { + "type": "datasource", + "uid": "-- Dashboard --" + }, "panelId": 79, "refId": "A" } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "Lock Waits/sec", "tooltip": { "shared": true, @@ -5377,9 +5484,7 @@ "transparent": true, "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, @@ -5389,26 +5494,24 @@ "format": "short", "label": "", "logBase": 1, - "max": null, "min": "0", "show": true }, { "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": true } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } }, { - "datasource": null, + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "fieldConfig": { "defaults": { "custom": {} @@ -5429,12 +5532,14 @@ "pluginVersion": "7.4.2", "targets": [ { + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "queryType": "randomWalk", "refId": "A" } ], - "timeFrom": null, - "timeShift": null, "title": "", "transparent": true, "type": "text" @@ -5444,7 +5549,10 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "-- Dashboard --", + "datasource": { + "type": "datasource", + "uid": "-- Dashboard --" + }, "description": "", "fieldConfig": { "defaults": { @@ -5499,6 +5607,10 @@ "steppedLine": false, "targets": [ { + "datasource": { + "type": "datasource", + "uid": "-- Dashboard --" + }, "panelId": 79, "refId": "A" } @@ -5513,9 +5625,7 @@ "yaxis": "left" } ], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "Average Wait Time", "tooltip": { "shared": true, @@ -5538,9 +5648,7 @@ "transparent": true, "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, @@ -5550,26 +5658,24 @@ "format": "ms", "label": "", "logBase": 1, - "max": null, "min": "0", "show": true }, { "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": true } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } }, { - "datasource": null, + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "fieldConfig": { "defaults": { "custom": {} @@ -5590,12 +5696,14 @@ "pluginVersion": "7.4.2", "targets": [ { + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "queryType": "randomWalk", "refId": "A" } ], - "timeFrom": null, - "timeShift": null, "title": "", "transparent": true, "type": "text" @@ -5605,7 +5713,10 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "-- Dashboard --", + "datasource": { + "type": "datasource", + "uid": "-- Dashboard --" + }, "description": "", "fieldConfig": { "defaults": { @@ -5659,14 +5770,16 @@ "steppedLine": false, "targets": [ { + "datasource": { + "type": "datasource", + "uid": "-- Dashboard --" + }, "panelId": 79, "refId": "A" } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "Blocked Processes", "tooltip": { "shared": true, @@ -5689,9 +5802,7 @@ "transparent": true, "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, @@ -5699,43 +5810,52 @@ { "decimals": 0, "format": "short", - "label": null, "logBase": 1, - "max": null, "min": "0", "show": true }, { "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": true } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } } ], + "targets": [ + { + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, + "refId": "A" + } + ], "title": "$sql_instance: SQL Server Locking", "type": "row" }, { "collapsed": true, - "datasource": null, + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "gridPos": { "h": 1, "w": 24, "x": 0, - "y": 7 + "y": 38 }, "id": 183, "panels": [ { - "datasource": null, + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "fieldConfig": { "defaults": { "custom": {} @@ -5756,12 +5876,14 @@ "pluginVersion": "7.4.2", "targets": [ { + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "queryType": "randomWalk", "refId": "A" } ], - "timeFrom": null, - "timeShift": null, "title": "", "transparent": true, "type": "text" @@ -5771,7 +5893,9 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "$DataSource", + "datasource": { + "uid": "$DataSource" + }, "description": "", "fieldConfig": { "defaults": { @@ -5845,6 +5969,9 @@ "targets": [ { "alias": "", + "datasource": { + "uid": "$DataSource" + }, "format": "time_series", "hide": false, "rawSql": "SELECT \n [time] = $__timeGroup([snapshot_time], $aggregation) \n ,[Physical Memory in use] = AVG([physical_memory_in_use_kb])\n ,[Available Commit limit] = AVG(available_commit_limit_kb)\n ,[Physical Memory Low Indicator] = MAX(convert(int,process_physical_memory_low))\n ,[Virtual Memory Low Indicator] = MAX(convert(int,process_virtual_memory_low))\n FROM [dbo].[vw_sqlwatch_report_fact_perf_os_process_memory]\n WHERE 1 = 1\n AND $__timeFilter(snapshot_time)\n AND [sql_instance] = '$sql_instance'\n GROUP BY $__timeGroup([snapshot_time], $aggregation) \nORDER BY\n time ASC\n \n ", @@ -5852,9 +5979,7 @@ } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "Physical memory", "tooltip": { "shared": true, @@ -5864,9 +5989,7 @@ "transparent": true, "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, @@ -5876,14 +5999,12 @@ "format": "deckbytes", "label": "", "logBase": 1, - "max": null, "min": "0", "show": true }, { "decimals": 0, "format": "short", - "label": null, "logBase": 1, "max": "1", "min": "0", @@ -5891,8 +6012,7 @@ } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } }, { @@ -5900,7 +6020,9 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "$DataSource", + "datasource": { + "uid": "$DataSource" + }, "description": "", "fieldConfig": { "defaults": { @@ -5951,6 +6073,9 @@ "targets": [ { "alias": "", + "datasource": { + "uid": "$DataSource" + }, "format": "time_series", "hide": false, "rawSql": "SELECT \n [time] = $__timeGroup([snapshot_time], $aggregation) \n --this chart\n ,'Connection Memory (KB)' = avg(case when counter_name = 'Connection Memory (KB)' then [cntr_value_calculated] else null end)\n ,'Optimizer Memory (KB)' = avg(case when counter_name = 'Optimizer Memory (KB)' then [cntr_value_calculated] else null end)\n ,'SQL Cache Memory (KB)' = avg(case when counter_name = 'SQL Cache Memory (KB)' then [cntr_value_calculated] else null end)\n --other charts\n ,'Total Server Memory (KB)' = avg(case when counter_name = 'Total Server Memory (KB)' then [cntr_value_calculated] else null end)\n ,'Stolen Server Memory (KB)' = avg(case when counter_name = 'Stolen Server Memory (KB)' then [cntr_value_calculated] else null end)\n ,'Target Server Memory (KB)' = avg(case when counter_name = 'Target Server Memory (KB)' then [cntr_value_calculated] else null end)\n --\n ,'Memory Grants Outstanding' = avg(case when counter_name = 'Memory Grants Outstanding' then [cntr_value_calculated] else null end)\n ,'Memory Grants Pending' = avg(case when counter_name = 'Memory Grants Pending' then [cntr_value_calculated] else null end)\n --\n ,'Free list stalls/sec' = avg(case when counter_name = 'Free list stalls/sec' then [cntr_value_calculated] else null end)\n --\n ,'Page Lookups/sec' = avg(case when counter_name = 'Page Lookups/sec' then [cntr_value_calculated] else null end)\n ,'Batch Requests/sec' = avg(case when counter_name = 'Batch Requests/sec' then [cntr_value_calculated] else null end)\n --\n ,'Page reads/sec' = avg(case when counter_name = 'Page reads/sec' then [cntr_value_calculated] else null end)\n ,'Page writes/sec' = avg(case when counter_name = 'Page writes/sec' then [cntr_value_calculated] else null end)\n --\n ,'Readahead pages/sec' = avg(case when counter_name = 'Readahead pages/sec' then [cntr_value_calculated] else null end)\n ,'Page reads/sec' = avg(case when counter_name = 'Page reads/sec' then [cntr_value_calculated] else null end)\n --\n ,'Checkpoint pages/sec' = avg(case when counter_name = 'Checkpoint pages/sec' then [cntr_value_calculated] else null end)\n --\n ,'Lazy writes/sec' = avg(case when counter_name = 'Lazy writes/sec' then [cntr_value_calculated] else null end)\n --\n ,'Page life Expectancy' = avg(case when counter_name = 'Page life Expectancy' then [cntr_value_calculated] else null end)\n --\n ,'Buffer cache hit ratio' = avg(case when counter_name = 'Buffer cache hit ratio' then [cntr_value_calculated] else null end)\n FROM [dbo].[vw_sqlwatch_report_fact_perf_os_performance_counters]\n WHERE [aggregation_interval_minutes] = 0\n AND $__timeFilter(snapshot_time)\n AND counter_name IN ('Connection Memory (KB)','Optimizer Memory (KB)','SQL Cache Memory (KB)'\n ,'Total Server Memory (KB)','Stolen Server Memory (KB)', 'Target Server Memory (KB)'\n ,'Memory Grants Outstanding','Memory Grants Pending'\n ,'Free list stalls/sec'\n ,'Page Lookups/sec','Batch Requests/sec'\n ,'Page reads/sec','Page writes/sec'\n ,'Readahead pages/sec','Page reads/sec'\n ,'Checkpoint pages/sec'\n ,'Lazy writes/sec'\n ,'Page life Expectancy'\n ,'Buffer cache hit ratio'\n )\n AND [sql_instance] = '$sql_instance'\n GROUP BY $__timeGroup([snapshot_time], $aggregation) \nORDER BY\n time ASC\n \n ", @@ -5958,9 +6083,7 @@ } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "SQL Memory Breakdown", "tooltip": { "shared": true, @@ -5985,9 +6108,7 @@ "transparent": true, "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, @@ -5997,22 +6118,17 @@ "format": "deckbytes", "label": "", "logBase": 1, - "max": null, "min": "0", "show": true }, { "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": true } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } }, { @@ -6020,7 +6136,10 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "-- Dashboard --", + "datasource": { + "type": "datasource", + "uid": "-- Dashboard --" + }, "description": "", "fieldConfig": { "defaults": { @@ -6069,14 +6188,16 @@ "steppedLine": false, "targets": [ { + "datasource": { + "type": "datasource", + "uid": "-- Dashboard --" + }, "panelId": 34, "refId": "A" } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "Process Memory", "tooltip": { "shared": true, @@ -6101,9 +6222,7 @@ "transparent": true, "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, @@ -6113,22 +6232,17 @@ "format": "deckbytes", "label": "", "logBase": 1, - "max": null, "min": "0", "show": true }, { "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": true } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } }, { @@ -6136,7 +6250,9 @@ "bars": true, "dashLength": 10, "dashes": false, - "datasource": "$DataSource", + "datasource": { + "uid": "$DataSource" + }, "description": "", "fieldConfig": { "defaults": { @@ -6189,6 +6305,9 @@ "targets": [ { "alias": "", + "datasource": { + "uid": "$DataSource" + }, "format": "time_series", "hide": false, "rawSql": "SELECT \n [time] = $__timeGroup([snapshot_time], $aggregation) \n ,metric = [clerk_name]\n ,[value] = sum([allocated_kb])\n FROM [dbo].[vw_sqlwatch_report_fact_perf_os_memory_clerks]\n WHERE 1 = 1\n AND $__timeFilter(snapshot_time)\n AND [sql_instance] = '$sql_instance'\n GROUP BY [clerk_name]\n ,$__timeGroup([snapshot_time], $aggregation) \nORDER BY\n time ASC\n \n ", @@ -6196,9 +6315,7 @@ } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "Memory Clerks", "tooltip": { "shared": false, @@ -6208,9 +6325,7 @@ "transparent": true, "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, @@ -6220,26 +6335,24 @@ "format": "deckbytes", "label": "", "logBase": 1, - "max": null, "min": "0", "show": true }, { "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": true } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } }, { - "datasource": null, + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "fieldConfig": { "defaults": { "custom": {} @@ -6260,12 +6373,14 @@ "pluginVersion": "7.4.2", "targets": [ { + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "queryType": "randomWalk", "refId": "A" } ], - "timeFrom": null, - "timeShift": null, "title": "", "transparent": true, "type": "text" @@ -6275,7 +6390,10 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "-- Dashboard --", + "datasource": { + "type": "datasource", + "uid": "-- Dashboard --" + }, "description": "", "fieldConfig": { "defaults": { @@ -6330,14 +6448,16 @@ "steppedLine": false, "targets": [ { + "datasource": { + "type": "datasource", + "uid": "-- Dashboard --" + }, "panelId": 34, "refId": "A" } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "Memory Grants", "tooltip": { "shared": true, @@ -6361,9 +6481,7 @@ "transparent": true, "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, @@ -6373,26 +6491,24 @@ "format": "short", "label": "", "logBase": 1, - "max": null, "min": "0", "show": true }, { "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": true } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } }, { - "datasource": null, + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "fieldConfig": { "defaults": { "custom": {} @@ -6413,12 +6529,14 @@ "pluginVersion": "7.4.2", "targets": [ { + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "queryType": "randomWalk", "refId": "A" } ], - "timeFrom": null, - "timeShift": null, "title": "", "transparent": true, "type": "text" @@ -6428,7 +6546,10 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "-- Dashboard --", + "datasource": { + "type": "datasource", + "uid": "-- Dashboard --" + }, "description": "", "fieldConfig": { "defaults": { @@ -6477,6 +6598,10 @@ "steppedLine": false, "targets": [ { + "datasource": { + "type": "datasource", + "uid": "-- Dashboard --" + }, "panelId": 34, "refId": "A" } @@ -6491,9 +6616,7 @@ "yaxis": "left" } ], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "Free list stalls/sec", "tooltip": { "shared": true, @@ -6516,9 +6639,7 @@ "transparent": true, "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, @@ -6528,26 +6649,24 @@ "format": "short", "label": "", "logBase": 1, - "max": null, "min": "0", "show": true }, { "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": true } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } }, { - "datasource": null, + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "fieldConfig": { "defaults": { "custom": {} @@ -6568,12 +6687,14 @@ "pluginVersion": "7.4.2", "targets": [ { + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "queryType": "randomWalk", "refId": "A" } ], - "timeFrom": null, - "timeShift": null, "title": "", "transparent": true, "type": "text" @@ -6583,7 +6704,10 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "-- Dashboard --", + "datasource": { + "type": "datasource", + "uid": "-- Dashboard --" + }, "description": "", "fieldConfig": { "defaults": { @@ -6638,14 +6762,16 @@ "steppedLine": false, "targets": [ { + "datasource": { + "type": "datasource", + "uid": "-- Dashboard --" + }, "panelId": 34, "refId": "A" } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "Page Lookup Rate", "tooltip": { "shared": true, @@ -6685,9 +6811,7 @@ "transparent": true, "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, @@ -6697,26 +6821,24 @@ "format": "percent", "label": "", "logBase": 1, - "max": null, "min": "0", "show": true }, { "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": true } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } }, { - "datasource": null, + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "fieldConfig": { "defaults": { "custom": {} @@ -6737,12 +6859,14 @@ "pluginVersion": "7.4.2", "targets": [ { + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "queryType": "randomWalk", "refId": "A" } ], - "timeFrom": null, - "timeShift": null, "title": "", "transparent": true, "type": "text" @@ -6752,7 +6876,10 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "-- Dashboard --", + "datasource": { + "type": "datasource", + "uid": "-- Dashboard --" + }, "description": "", "fieldConfig": { "defaults": { @@ -6801,6 +6928,10 @@ "steppedLine": false, "targets": [ { + "datasource": { + "type": "datasource", + "uid": "-- Dashboard --" + }, "panelId": 34, "refId": "A" } @@ -6815,9 +6946,7 @@ "yaxis": "left" } ], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "Page reads/sec vs Page writes/sec", "tooltip": { "shared": true, @@ -6841,39 +6970,34 @@ "transparent": true, "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, "yaxes": [ { - "decimals": null, "format": "short", "label": "", "logBase": 1, - "max": null, - "min": null, "show": true }, { "decimals": 0, "format": "short", - "label": null, "logBase": 1, - "max": null, "min": "0", "show": true } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } }, { - "datasource": null, + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "fieldConfig": { "defaults": { "custom": {} @@ -6894,12 +7018,14 @@ "pluginVersion": "7.4.2", "targets": [ { + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "queryType": "randomWalk", "refId": "A" } ], - "timeFrom": null, - "timeShift": null, "title": "", "transparent": true, "type": "text" @@ -6909,7 +7035,10 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "-- Dashboard --", + "datasource": { + "type": "datasource", + "uid": "-- Dashboard --" + }, "description": "", "fieldConfig": { "defaults": { @@ -6980,14 +7109,16 @@ "steppedLine": false, "targets": [ { + "datasource": { + "type": "datasource", + "uid": "-- Dashboard --" + }, "panelId": 34, "refId": "A" } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "Readahead pages/sec", "tooltip": { "shared": true, @@ -7027,9 +7158,7 @@ "transparent": true, "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, @@ -7039,27 +7168,26 @@ "format": "none", "label": "", "logBase": 1, - "max": null, "min": "0", "show": true }, { "decimals": 0, "format": "percentunit", - "label": null, "logBase": 1, - "max": null, "min": "0", "show": true } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } }, { - "datasource": null, + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "fieldConfig": { "defaults": { "custom": {} @@ -7080,12 +7208,14 @@ "pluginVersion": "7.4.2", "targets": [ { + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "queryType": "randomWalk", "refId": "A" } ], - "timeFrom": null, - "timeShift": null, "title": "", "transparent": true, "type": "text" @@ -7095,7 +7225,10 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "-- Dashboard --", + "datasource": { + "type": "datasource", + "uid": "-- Dashboard --" + }, "description": "", "fieldConfig": { "defaults": { @@ -7144,6 +7277,10 @@ "steppedLine": false, "targets": [ { + "datasource": { + "type": "datasource", + "uid": "-- Dashboard --" + }, "panelId": 34, "refId": "A" } @@ -7158,9 +7295,7 @@ "yaxis": "left" } ], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "Checkpoint pages/sec", "tooltip": { "shared": true, @@ -7183,38 +7318,32 @@ "transparent": true, "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, "yaxes": [ { - "decimals": null, "format": "short", "label": "", "logBase": 1, - "max": null, - "min": null, "show": true }, { "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": true } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } }, { - "datasource": null, + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "fieldConfig": { "defaults": { "custom": {} @@ -7235,12 +7364,14 @@ "pluginVersion": "7.4.2", "targets": [ { + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "queryType": "randomWalk", "refId": "A" } ], - "timeFrom": null, - "timeShift": null, "title": "", "transparent": true, "type": "text" @@ -7250,7 +7381,10 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "-- Dashboard --", + "datasource": { + "type": "datasource", + "uid": "-- Dashboard --" + }, "description": "", "fieldConfig": { "defaults": { @@ -7305,6 +7439,10 @@ "steppedLine": false, "targets": [ { + "datasource": { + "type": "datasource", + "uid": "-- Dashboard --" + }, "panelId": 34, "refId": "A" } @@ -7319,9 +7457,7 @@ "yaxis": "left" } ], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "Lazy writes/sec", "tooltip": { "shared": true, @@ -7344,9 +7480,7 @@ "transparent": true, "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, @@ -7356,26 +7490,24 @@ "format": "short", "label": "", "logBase": 1, - "max": null, "min": "0", "show": true }, { "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": true } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } }, { - "datasource": null, + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "fieldConfig": { "defaults": { "custom": {} @@ -7396,12 +7528,14 @@ "pluginVersion": "7.4.2", "targets": [ { + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "queryType": "randomWalk", "refId": "A" } ], - "timeFrom": null, - "timeShift": null, "title": "", "transparent": true, "type": "text" @@ -7411,7 +7545,10 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "-- Dashboard --", + "datasource": { + "type": "datasource", + "uid": "-- Dashboard --" + }, "description": "", "fieldConfig": { "defaults": { @@ -7461,14 +7598,16 @@ "steppedLine": false, "targets": [ { + "datasource": { + "type": "datasource", + "uid": "-- Dashboard --" + }, "panelId": 34, "refId": "A" } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "Avg page life expentancy", "tooltip": { "shared": true, @@ -7491,9 +7630,7 @@ "transparent": true, "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, @@ -7501,28 +7638,24 @@ { "decimals": 1, "format": "s", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": true }, { "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": true } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } }, { - "datasource": null, + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "fieldConfig": { "defaults": { "custom": {} @@ -7543,12 +7676,14 @@ "pluginVersion": "7.4.2", "targets": [ { + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "queryType": "randomWalk", "refId": "A" } ], - "timeFrom": null, - "timeShift": null, "title": "", "transparent": true, "type": "text" @@ -7558,7 +7693,10 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "-- Dashboard --", + "datasource": { + "type": "datasource", + "uid": "-- Dashboard --" + }, "description": "", "fieldConfig": { "defaults": { @@ -7607,14 +7745,16 @@ "steppedLine": false, "targets": [ { + "datasource": { + "type": "datasource", + "uid": "-- Dashboard --" + }, "panelId": 34, "refId": "A" } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "Buffer cache hit ratio", "tooltip": { "shared": true, @@ -7637,9 +7777,7 @@ "transparent": true, "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, @@ -7647,7 +7785,6 @@ { "decimals": 0, "format": "%", - "label": null, "logBase": 1, "max": "100", "min": "0", @@ -7655,35 +7792,46 @@ }, { "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": true } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } } ], + "targets": [ + { + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, + "refId": "A" + } + ], "title": "$sql_instance: SQL Server Memory", "type": "row" }, { "collapsed": true, - "datasource": null, + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "gridPos": { "h": 1, "w": 24, "x": 0, - "y": 8 + "y": 39 }, "id": 181, "panels": [ { - "datasource": null, + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "fieldConfig": { "defaults": { "custom": {} @@ -7704,12 +7852,14 @@ "pluginVersion": "7.4.2", "targets": [ { + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "queryType": "randomWalk", "refId": "A" } ], - "timeFrom": null, - "timeShift": null, "title": "", "transparent": true, "type": "text" @@ -7719,7 +7869,9 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "$DataSource", + "datasource": { + "uid": "$DataSource" + }, "description": "", "fieldConfig": { "defaults": { @@ -7769,6 +7921,9 @@ "targets": [ { "alias": "", + "datasource": { + "uid": "$DataSource" + }, "format": "time_series", "hide": false, "rawSql": "SELECT \n [time] = $__timeGroup([snapshot_time], $aggregation) \n ,'Active Temp Tables' = avg(case when counter_name = 'Active Temp Tables' then cntr_value_calculated else null end)\n ,'Temp Tables Creation Rate' = avg(case when counter_name = 'Temp Tables Creation Rate' then cntr_value_calculated else null end)\n ,'Free Space in tempdb (KB)' = avg(case when counter_name = 'Free Space in tempdb (KB)' then cntr_value_calculated else null end)\n FROM [dbo].[vw_sqlwatch_report_fact_perf_os_performance_counters]\n WHERE [aggregation_interval_minutes] = 0\n AND $__timeFilter(snapshot_time)\n AND counter_name IN ('Active Temp Tables','Temp Tables Creation Rate','Free Space in tempdb (KB)')\n AND [sql_instance] = '$sql_instance'\n GROUP BY $__timeGroup([snapshot_time], $aggregation) \nORDER BY\n time ASC\n \n ", @@ -7776,9 +7931,7 @@ } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "Active Temp Tables", "tooltip": { "shared": true, @@ -7801,9 +7954,7 @@ "transparent": true, "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, @@ -7813,22 +7964,17 @@ "format": "short", "label": "", "logBase": 1, - "max": null, "min": "0", "show": true }, { "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": true } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } }, { @@ -7836,7 +7982,10 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "-- Dashboard --", + "datasource": { + "type": "datasource", + "uid": "-- Dashboard --" + }, "description": "", "fieldConfig": { "defaults": { @@ -7885,14 +8034,16 @@ "steppedLine": false, "targets": [ { + "datasource": { + "type": "datasource", + "uid": "-- Dashboard --" + }, "panelId": 72, "refId": "A" } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "Temp Tables Creation Rate", "tooltip": { "shared": true, @@ -7915,9 +8066,7 @@ "transparent": true, "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, @@ -7927,22 +8076,17 @@ "format": "short", "label": "", "logBase": 1, - "max": null, "min": "0", "show": true }, { "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": true } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } }, { @@ -7950,7 +8094,10 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "-- Dashboard --", + "datasource": { + "type": "datasource", + "uid": "-- Dashboard --" + }, "description": "", "fieldConfig": { "defaults": { @@ -7999,14 +8146,16 @@ "steppedLine": false, "targets": [ { + "datasource": { + "type": "datasource", + "uid": "-- Dashboard --" + }, "panelId": 72, "refId": "A" } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "Free space in tempdb", "tooltip": { "shared": true, @@ -8029,9 +8178,7 @@ "transparent": true, "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, @@ -8041,41 +8188,51 @@ "format": "deckbytes", "label": "", "logBase": 1, - "max": null, "min": "0", "show": true }, { "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": true } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } } ], + "targets": [ + { + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, + "refId": "A" + } + ], "title": "$sql_instance: SQL Server TempDB", "type": "row" }, { "collapsed": true, - "datasource": null, + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "gridPos": { "h": 1, "w": 24, "x": 0, - "y": 9 + "y": 40 }, "id": 179, "panels": [ { - "datasource": null, + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "fieldConfig": { "defaults": { "custom": {} @@ -8096,12 +8253,14 @@ "pluginVersion": "7.4.2", "targets": [ { + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "queryType": "randomWalk", "refId": "A" } ], - "timeFrom": null, - "timeShift": null, "title": "", "transparent": true, "type": "text" @@ -8111,7 +8270,9 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "$DataSource", + "datasource": { + "uid": "$DataSource" + }, "description": "", "fieldConfig": { "defaults": { @@ -8173,6 +8334,9 @@ "targets": [ { "alias": "", + "datasource": { + "uid": "$DataSource" + }, "format": "time_series", "hide": false, "rawSql": "SELECT \n [time] = $__timeGroup([snapshot_time], $aggregation) \n , [Bytes Written] = SUM([num_of_bytes_written_delta])\n , [Bytes Read] = SUM([num_of_bytes_read_delta])\n , [Bytes Written/sec] = AVG([bytes_written_per_second])\n , [Bytes Read/sec] = AVG([bytes_read_per_second])\n FROM [dbo].[vw_sqlwatch_report_fact_perf_file_stats]\n WHERE 1 = 1\n AND $__timeFilter(snapshot_time)\n AND [sql_instance] = '$sql_instance'\n AND database_name IN ($database)\n GROUP BY $__timeGroup([snapshot_time], $aggregation) \nORDER BY\n time ASC\n \n ", @@ -8180,9 +8344,7 @@ } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "Bytes Transferred", "tooltip": { "shared": true, @@ -8206,9 +8368,7 @@ "transparent": true, "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, @@ -8219,23 +8379,18 @@ "format": "decbytes", "label": "", "logBase": 1, - "max": null, "min": "0", "show": true }, { "$$hashKey": "object:2447", "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": true } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } }, { @@ -8243,7 +8398,10 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "-- Dashboard --", + "datasource": { + "type": "datasource", + "uid": "-- Dashboard --" + }, "description": "", "fieldConfig": { "defaults": { @@ -8304,14 +8462,16 @@ "steppedLine": false, "targets": [ { + "datasource": { + "type": "datasource", + "uid": "-- Dashboard --" + }, "panelId": 14, "refId": "A" } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "Bytes written/sec vs Bytes read/sec", "tooltip": { "shared": true, @@ -8335,9 +8495,7 @@ "transparent": true, "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, @@ -8348,27 +8506,25 @@ "format": "Bps", "label": "", "logBase": 1, - "max": null, "min": "0", "show": true }, { "$$hashKey": "object:2763", "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": true } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } }, { - "datasource": null, + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "fieldConfig": { "defaults": { "custom": {} @@ -8389,12 +8545,14 @@ "pluginVersion": "7.4.2", "targets": [ { + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "queryType": "randomWalk", "refId": "A" } ], - "timeFrom": null, - "timeShift": null, "title": "", "transparent": true, "type": "text" @@ -8404,7 +8562,9 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "$DataSource", + "datasource": { + "uid": "$DataSource" + }, "description": "", "fieldConfig": { "defaults": { @@ -8471,6 +8631,9 @@ "targets": [ { "alias": "", + "datasource": { + "uid": "$DataSource" + }, "format": "time_series", "hide": false, "rawSql": "SELECT \n [time] = $__timeGroup([snapshot_time], $aggregation) \n ,metric = [counter_name]\n ,[value] = AVG([cntr_value_calculated])\n FROM [dbo].[vw_sqlwatch_report_fact_perf_os_performance_counters]\n WHERE [aggregation_interval_minutes] = 0\n AND $__timeFilter(snapshot_time)\n AND counter_name IN ('Page Splits/sec','Batch Requests/Sec','Log write waits','Log Flushes/sec')\n AND [sql_instance] = '$sql_instance'\n GROUP BY [counter_name]\n ,$__timeGroup([snapshot_time], $aggregation) \nORDER BY\n time ASC\n \n ", @@ -8478,9 +8641,7 @@ } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "Page Splits/sec", "tooltip": { "shared": true, @@ -8520,9 +8681,7 @@ "transparent": true, "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, @@ -8533,7 +8692,6 @@ "format": "short", "label": "", "logBase": 1, - "max": null, "min": "0", "show": true }, @@ -8541,16 +8699,13 @@ "$$hashKey": "object:813", "decimals": 0, "format": "percentunit", - "label": null, "logBase": 1, - "max": null, "min": "0", "show": true } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } }, { @@ -8558,7 +8713,9 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "$DataSource", + "datasource": { + "uid": "$DataSource" + }, "description": "", "fieldConfig": { "defaults": { @@ -8608,6 +8765,9 @@ "targets": [ { "alias": "", + "datasource": { + "uid": "$DataSource" + }, "format": "time_series", "hide": false, "rawSql": "SELECT \n [time] = $__timeGroup([snapshot_time], $aggregation) \n ,[Latency] = SUM([total_long_ios])\n ,metric=ISNULL([longest_pending_request_file],'')\n FROM [dbo].[vw_sqlwatch_report_fact_xes_iosubsystem]\n WHERE 1 = 1\n AND $__timeFilter(snapshot_time)\n AND [sql_instance] = '$sql_instance'\n GROUP BY $__timeGroup([snapshot_time], $aggregation) ,[longest_pending_request_file]\nORDER BY\n time ASC\n \n ", @@ -8615,9 +8775,7 @@ } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "Long IO requests", "tooltip": { "shared": false, @@ -8627,9 +8785,7 @@ "transparent": true, "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, @@ -8639,7 +8795,6 @@ "format": "short", "label": "", "logBase": 1, - "max": null, "min": "0", "show": true }, @@ -8647,14 +8802,11 @@ "format": "short", "label": "", "logBase": 1, - "max": null, - "min": null, "show": false } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } }, { @@ -8662,7 +8814,10 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "-- Dashboard --", + "datasource": { + "type": "datasource", + "uid": "-- Dashboard --" + }, "description": "", "fieldConfig": { "defaults": { @@ -8716,14 +8871,16 @@ "steppedLine": false, "targets": [ { + "datasource": { + "type": "datasource", + "uid": "-- Dashboard --" + }, "panelId": 91, "refId": "A" } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "Log write waits", "tooltip": { "shared": true, @@ -8746,9 +8903,7 @@ "transparent": true, "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, @@ -8758,26 +8913,24 @@ "format": "short", "label": "", "logBase": 1, - "max": null, "min": "0", "show": true }, { "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": true } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } }, { - "datasource": null, + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "fieldConfig": { "defaults": { "custom": {} @@ -8798,12 +8951,14 @@ "pluginVersion": "7.4.2", "targets": [ { + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "queryType": "randomWalk", "refId": "A" } ], - "timeFrom": null, - "timeShift": null, "title": "", "transparent": true, "type": "text" @@ -8813,7 +8968,10 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "-- Dashboard --", + "datasource": { + "type": "datasource", + "uid": "-- Dashboard --" + }, "description": "", "fieldConfig": { "defaults": { @@ -8862,6 +9020,10 @@ "steppedLine": false, "targets": [ { + "datasource": { + "type": "datasource", + "uid": "-- Dashboard --" + }, "panelId": 91, "refId": "A" } @@ -8876,9 +9038,7 @@ "yaxis": "left" } ], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "Log Flushes/sec", "tooltip": { "shared": true, @@ -8901,38 +9061,32 @@ "transparent": true, "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, "yaxes": [ { - "decimals": null, "format": "short", "label": "", "logBase": 1, - "max": null, - "min": null, "show": true }, { "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": true } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } }, { - "datasource": null, + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "fieldConfig": { "defaults": { "custom": {} @@ -8953,12 +9107,14 @@ "pluginVersion": "7.4.2", "targets": [ { + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "queryType": "randomWalk", "refId": "A" } ], - "timeFrom": null, - "timeShift": null, "title": "", "transparent": true, "type": "text" @@ -8968,7 +9124,9 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "$DataSource", + "datasource": { + "uid": "$DataSource" + }, "description": "", "fieldConfig": { "defaults": { @@ -9018,6 +9176,9 @@ "targets": [ { "alias": "", + "datasource": { + "uid": "$DataSource" + }, "format": "time_series", "hide": false, "rawSql": "SELECT \n [time] = $__timeGroup([snapshot_time], $aggregation) \n ,metric = counter_name\n ,[value] = SUM([cntr_value_calculated])\n FROM [dbo].[vw_sqlwatch_report_fact_perf_os_performance_counters]\n WHERE [aggregation_interval_minutes] = 0\n AND $__timeFilter(snapshot_time)\n AND counter_name IN ('Log Growths')\n AND [sql_instance] = '$sql_instance'\n GROUP BY counter_name\n ,$__timeGroup([snapshot_time], $aggregation) \nORDER BY\n time ASC\n \n ", @@ -9025,9 +9186,7 @@ } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "Log Growths", "tooltip": { "shared": false, @@ -9037,9 +9196,7 @@ "transparent": true, "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, @@ -9049,26 +9206,24 @@ "format": "short", "label": "", "logBase": 1, - "max": null, "min": "0", "show": true }, { "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": true } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } }, { - "datasource": null, + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "fieldConfig": { "defaults": { "custom": {} @@ -9089,12 +9244,14 @@ "pluginVersion": "7.4.2", "targets": [ { + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "queryType": "randomWalk", "refId": "A" } ], - "timeFrom": null, - "timeShift": null, "title": "", "transparent": true, "type": "text" @@ -9104,7 +9261,9 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "$DataSource", + "datasource": { + "uid": "$DataSource" + }, "description": "", "fieldConfig": { "defaults": { @@ -9160,6 +9319,9 @@ "targets": [ { "alias": "", + "datasource": { + "uid": "$DataSource" + }, "format": "time_series", "hide": false, "rawSql": "SELECT \n [time] = $__timeGroup([snapshot_time], $aggregation) \n ,metric = [counter_name]\n ,[value] = AVG([cntr_value_calculated])\n FROM [dbo].[vw_sqlwatch_report_fact_perf_os_performance_counters]\n WHERE [aggregation_interval_minutes] = 0\n AND $__timeFilter(snapshot_time)\n AND counter_name IN ('Full Scans/sec','Index Searches/sec')\n AND [sql_instance] = '$sql_instance'\n GROUP BY [counter_name]\n ,$__timeGroup([snapshot_time], $aggregation) \nORDER BY\n time ASC\n \n ", @@ -9167,9 +9329,7 @@ } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "Full Scans /sec", "tooltip": { "shared": true, @@ -9197,9 +9357,7 @@ "transparent": true, "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, @@ -9209,14 +9367,12 @@ "format": "short", "label": "", "logBase": 1, - "max": null, "min": "0", "show": true }, { "decimals": 0, "format": "percentunit", - "label": null, "logBase": 1, "max": "1", "min": "0", @@ -9224,27 +9380,41 @@ } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } } ], + "targets": [ + { + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, + "refId": "A" + } + ], "title": "$sql_instance: SQL Server Storage", "type": "row" }, { "collapsed": true, - "datasource": null, + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "gridPos": { "h": 1, "w": 24, "x": 0, - "y": 10 + "y": 41 }, "id": 284, "panels": [ { - "datasource": null, + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "fieldConfig": { "defaults": { "custom": {} @@ -9265,12 +9435,14 @@ "pluginVersion": "7.4.2", "targets": [ { + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "queryType": "randomWalk", "refId": "A" } ], - "timeFrom": null, - "timeShift": null, "title": "", "transparent": true, "type": "text" @@ -9280,7 +9452,9 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "${DataSource}", + "datasource": { + "uid": "${DataSource}" + }, "fieldConfig": { "defaults": { "custom": {} @@ -9330,6 +9504,9 @@ "targets": [ { "alias": "", + "datasource": { + "uid": "${DataSource}" + }, "format": "time_series", "queryType": "randomWalk", "rawSql": "SELECT time=$__timeGroup(event_time,$aggregation, 0),\n [Long Queries] = count(*)\nFROM [dbo].[sqlwatch_logger_xes_long_queries]\nWHERE $__timeFilter([event_time])\nand sql_instance = '$sql_instance'\nGROUP BY $__timeGroup(event_time,$aggregation, 0)\n", @@ -9337,9 +9514,7 @@ } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "Long Queries", "tooltip": { "shared": true, @@ -9349,9 +9524,7 @@ "transparent": true, "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, @@ -9360,36 +9533,31 @@ "$$hashKey": "object:474", "decimals": 0, "format": "short", - "label": null, "logBase": 1, - "max": null, "min": "0", "show": true }, { "$$hashKey": "object:475", "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": true } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } }, { - "datasource": "${DataSource}", + "datasource": { + "uid": "${DataSource}" + }, "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "custom": { - "align": null, "filterable": false }, "mappings": [], @@ -9397,8 +9565,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -9415,8 +9582,10 @@ }, "properties": [ { - "id": "custom.displayMode", - "value": "json-view" + "id": "custom.cellOptions", + "value": { + "type": "json-view" + } } ] }, @@ -9427,8 +9596,7 @@ }, "properties": [ { - "id": "custom.width", - "value": null + "id": "custom.width" } ] } @@ -9449,20 +9617,24 @@ "targets": [ { "alias": "", + "datasource": { + "uid": "${DataSource}" + }, "format": "table", "queryType": "randomWalk", "rawSql": "SELECT event_time\n ,[event_name]\n ,[session_id]\n ,[database_name]\n ,[cpu_time]\n ,[physical_reads]\n ,[logical_reads]\n ,[writes]\n ,[spills]\n ,[username]\n ,[client_hostname]\n ,[client_app_name]\n ,[duration_ms]\n ,[long_query_id]\n , sql_text \nFROM [dbo].[vw_sqlwatch_report_fact_xes_long_queries]\nWHERE $__timeFilter([event_time])\nand sql_instance = '$sql_instance'", "refId": "A" } ], - "timeFrom": null, - "timeShift": null, "title": "Long Queries", "transparent": true, "type": "table" }, { - "datasource": null, + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "fieldConfig": { "defaults": { "custom": {} @@ -9483,33 +9655,50 @@ "pluginVersion": "7.4.2", "targets": [ { + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "queryType": "randomWalk", "refId": "A" } ], - "timeFrom": null, - "timeShift": null, "title": "", "transparent": true, "type": "text" } ], + "targets": [ + { + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, + "refId": "A" + } + ], "title": "$sql_instance: SQL Server Long Queries", "type": "row" }, { "collapsed": true, - "datasource": null, + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "gridPos": { "h": 1, "w": 24, "x": 0, - "y": 11 + "y": 42 }, "id": 177, "panels": [ { - "datasource": null, + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "fieldConfig": { "defaults": { "custom": {} @@ -9530,12 +9719,14 @@ "pluginVersion": "7.4.2", "targets": [ { + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "queryType": "randomWalk", "refId": "A" } ], - "timeFrom": null, - "timeShift": null, "title": "", "transparent": true, "type": "text" @@ -9545,7 +9736,9 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "$DataSource", + "datasource": { + "uid": "$DataSource" + }, "description": "", "fieldConfig": { "defaults": { @@ -9595,6 +9788,9 @@ "targets": [ { "alias": "", + "datasource": { + "uid": "$DataSource" + }, "format": "time_series", "hide": false, "rawSql": "SELECT \n [time] = $__timeGroup([snapshot_time], $aggregation) \n ,[Latency] = MAX([io_latency_read])+MAX([io_latency_write])\n ,metric=left([file_physical_name],1)\n FROM [dbo].[vw_sqlwatch_report_fact_perf_file_stats]\n WHERE 1 = 1\n AND $__timeFilter(snapshot_time)\n AND [sql_instance] = '$sql_instance'\n GROUP BY $__timeGroup([snapshot_time], $aggregation) , left([file_physical_name],1)\nORDER BY\n time ASC\n \n ", @@ -9621,9 +9817,7 @@ "yaxis": "left" } ], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "Logical disk latency", "tooltip": { "shared": true, @@ -9633,9 +9827,7 @@ "transparent": true, "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, @@ -9645,22 +9837,17 @@ "format": "ms", "label": "", "logBase": 1, - "max": null, "min": "0", "show": true }, { "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": true } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } }, { @@ -9668,7 +9855,9 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "$DataSource", + "datasource": { + "uid": "$DataSource" + }, "description": "", "fieldConfig": { "defaults": { @@ -9719,6 +9908,9 @@ "targets": [ { "alias": "", + "datasource": { + "uid": "$DataSource" + }, "format": "time_series", "rawSql": "SELECT \n [time] = $__timeGroup([snapshot_time], $aggregation) \n ,'Read Latency' = MAX([io_latency_read])\n ,'Write Latency' = MAX([io_latency_write])\n ,'Bytes Read Delta' = SUM([num_of_bytes_read_delta])\n ,'Bytes Written Delta' = SUM([num_of_bytes_written_delta])\n ,metric=file_physical_name\n FROM [dbo].[vw_sqlwatch_report_fact_perf_file_stats]\n WHERE 1 = 1\n AND $__timeFilter(snapshot_time)\n AND [sql_instance] = '$sql_instance'\n AND database_name IN ($database)\n GROUP BY $__timeGroup([snapshot_time], $aggregation) , file_physical_name\nORDER BY\n time ASC\n \n ", "refId": "B" @@ -9744,9 +9936,7 @@ "yaxis": "left" } ], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "Physical File Read Latency", "tooltip": { "shared": true, @@ -9773,9 +9963,7 @@ "transparent": true, "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, @@ -9785,22 +9973,17 @@ "format": "ms", "label": "", "logBase": 1, - "max": null, "min": "0", "show": true }, { "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": true } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } }, { @@ -9808,7 +9991,10 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "-- Dashboard --", + "datasource": { + "type": "datasource", + "uid": "-- Dashboard --" + }, "description": "", "fieldConfig": { "defaults": { @@ -9858,6 +10044,10 @@ "steppedLine": false, "targets": [ { + "datasource": { + "type": "datasource", + "uid": "-- Dashboard --" + }, "panelId": 61, "refId": "A" } @@ -9882,9 +10072,7 @@ "yaxis": "left" } ], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "Physical File Write Latency", "tooltip": { "shared": true, @@ -9912,9 +10100,7 @@ "transparent": true, "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, @@ -9924,22 +10110,17 @@ "format": "ms", "label": "", "logBase": 1, - "max": null, "min": "0", "show": true }, { "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": true } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } }, { @@ -9947,7 +10128,10 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "-- Dashboard --", + "datasource": { + "type": "datasource", + "uid": "-- Dashboard --" + }, "description": "", "fieldConfig": { "defaults": { @@ -9997,14 +10181,16 @@ "steppedLine": false, "targets": [ { + "datasource": { + "type": "datasource", + "uid": "-- Dashboard --" + }, "panelId": 61, "refId": "A" } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "Physical File Reads", "tooltip": { "shared": true, @@ -10031,9 +10217,7 @@ "transparent": true, "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, @@ -10043,22 +10227,17 @@ "format": "decbytes", "label": "", "logBase": 1, - "max": null, "min": "0", "show": true }, { "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": true } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } }, { @@ -10066,7 +10245,10 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "-- Dashboard --", + "datasource": { + "type": "datasource", + "uid": "-- Dashboard --" + }, "description": "", "fieldConfig": { "defaults": { @@ -10116,14 +10298,16 @@ "steppedLine": false, "targets": [ { + "datasource": { + "type": "datasource", + "uid": "-- Dashboard --" + }, "panelId": 61, "refId": "A" } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "Physical File Writes", "tooltip": { "shared": true, @@ -10150,9 +10334,7 @@ "transparent": true, "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, @@ -10162,41 +10344,51 @@ "format": "decbytes", "label": "", "logBase": 1, - "max": null, "min": "0", "show": true }, { "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": true } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } } ], + "targets": [ + { + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, + "refId": "A" + } + ], "title": "$sql_instance: OS Disks", "type": "row" }, { "collapsed": true, - "datasource": null, + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "gridPos": { "h": 1, "w": 24, "x": 0, - "y": 12 + "y": 43 }, "id": 175, "panels": [ { - "datasource": null, + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "fieldConfig": { "defaults": { "custom": {} @@ -10217,12 +10409,14 @@ "pluginVersion": "7.4.2", "targets": [ { + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "queryType": "randomWalk", "refId": "A" } ], - "timeFrom": null, - "timeShift": null, "title": "", "transparent": true, "type": "text" @@ -10232,7 +10426,9 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "$DataSource", + "datasource": { + "uid": "$DataSource" + }, "description": "", "fieldConfig": { "defaults": { @@ -10288,6 +10484,9 @@ "targets": [ { "alias": "", + "datasource": { + "uid": "$DataSource" + }, "format": "time_series", "hide": false, "rawSql": "SELECT \n [time] = $__timeGroup([snapshot_time], $aggregation) \n ,metric = [instance_name]\n ,[value] = AVG([cntr_value_calculated])\n FROM [dbo].[vw_sqlwatch_report_fact_perf_os_performance_counters]\n WHERE [aggregation_interval_minutes] = 0\n AND $__timeFilter(snapshot_time)\n AND counter_name = 'Network IO waits'\n AND [sql_instance] = '$sql_instance'\n GROUP BY [instance_name]\n ,$__timeGroup([snapshot_time], $aggregation) \nORDER BY\n time ASC\n \n ", @@ -10295,9 +10494,7 @@ } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "Network IO waits", "tooltip": { "shared": true, @@ -10307,9 +10504,7 @@ "transparent": true, "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, @@ -10319,41 +10514,51 @@ "format": "ms", "label": "", "logBase": 1, - "max": null, "min": "0", "show": true }, { "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": true } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } } ], + "targets": [ + { + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, + "refId": "A" + } + ], "title": "$sql_instance: OS Network", "type": "row" }, { "collapsed": true, - "datasource": null, + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "gridPos": { "h": 1, "w": 24, "x": 0, - "y": 13 + "y": 44 }, "id": 234, "panels": [ { - "datasource": null, + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "fieldConfig": { "defaults": { "custom": {} @@ -10374,25 +10579,28 @@ "pluginVersion": "7.4.2", "targets": [ { + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "queryType": "randomWalk", "refId": "A" } ], - "timeFrom": null, - "timeShift": null, "title": "", "transparent": true, "type": "text" }, { - "datasource": "${DataSource}", + "datasource": { + "uid": "${DataSource}" + }, "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "custom": { - "align": null, "filterable": false }, "mappings": [], @@ -10400,8 +10608,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -10426,6 +10633,9 @@ "targets": [ { "alias": "", + "datasource": { + "uid": "${DataSource}" + }, "format": "table", "queryType": "randomWalk", "rawSql": "select [hadr_group_name]\r\n ,[replica_server_name]\r\n ,[availability_mode_desc]\r\n ,[failover_mode_desc]\r\n ,[database_name]\r\n ,[is_local]\r\n ,[is_primary_replica]\r\n ,[synchronization_state_desc]\r\n ,[is_commit_participant]\r\n ,[synchronization_health_desc]\r\n\t ,[database_state]\r\n ,[database_state_desc]\r\n ,[is_suspended]\r\n ,[suspend_reason_desc]\r\n ,[log_send_queue_size]\r\n ,[log_send_rate]\r\n ,[redo_queue_size]\r\n ,[redo_rate]\r\n ,[filestream_send_rate]\r\n ,[secondary_lag_seconds]\r\n ,[last_commit_time]\r\n ,[snapshot_time]\r\n ,[sql_instance]\r\nfrom (\r\n\tSELECT *\r\n\t\r\n\t, RN=ROW_NUMBER() over (partition by hadr_group_name, replica_server_name, database_name, sql_instance order by snapshot_time desc)\r\n\t FROM [dbo].[vw_sqlwatch_report_hadr_database_replica_states]\r\n\t WHERE $__timeFilter(snapshot_time)\r\n\t AND sql_instance = '$sql_instance'\r\n\t ) t\r\nWHERE RN=1", @@ -10440,7 +10650,9 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "$DataSource", + "datasource": { + "uid": "$DataSource" + }, "description": "", "fieldConfig": { "defaults": { @@ -10496,6 +10708,9 @@ "targets": [ { "alias": "", + "datasource": { + "uid": "$DataSource" + }, "format": "time_series", "hide": false, "rawSql": "SELECT \n [time] = $__timeGroup([snapshot_time], $aggregation) \n ,metric = [instance_name]\n ,[value] = AVG([cntr_value_calculated])\n FROM [dbo].[vw_sqlwatch_report_fact_perf_os_performance_counters]\n WHERE [aggregation_interval_minutes] = 0\n AND $__timeFilter(snapshot_time)\n AND counter_name in ('Redone Bytes/sec')\n AND [sql_instance] = '$sql_instance'\n\n GROUP BY [instance_name]\n ,$__timeGroup([snapshot_time], $aggregation) \nORDER BY\n time ASC\n \n ", @@ -10503,9 +10718,7 @@ } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "Redo rate", "tooltip": { "shared": true, @@ -10515,9 +10728,7 @@ "transparent": true, "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, @@ -10527,22 +10738,17 @@ "format": "Bps", "label": "", "logBase": 1, - "max": null, "min": "0", "show": true }, { "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": true } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } }, { @@ -10550,7 +10756,9 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "$DataSource", + "datasource": { + "uid": "$DataSource" + }, "description": "", "fieldConfig": { "defaults": { @@ -10602,6 +10810,9 @@ "targets": [ { "alias": "", + "datasource": { + "uid": "$DataSource" + }, "format": "time_series", "hide": false, "rawSql": "SELECT \n [time] = $__timeGroup([snapshot_time], $aggregation) \n ,metric = [instance_name]\n ,[value] = AVG([cntr_value_calculated])\n FROM [dbo].[vw_sqlwatch_report_fact_perf_os_performance_counters]\n WHERE [aggregation_interval_minutes] = 0\n AND $__timeFilter(snapshot_time)\n AND counter_name in ('Bytes Sent to Replica/sec')\n AND [sql_instance] = '$sql_instance'\n\n GROUP BY [instance_name]\n ,$__timeGroup([snapshot_time], $aggregation) \nORDER BY\n time ASC\n \n ", @@ -10609,9 +10820,7 @@ } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "Bytes Sent to Replica", "tooltip": { "shared": true, @@ -10621,9 +10830,7 @@ "transparent": true, "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, @@ -10633,22 +10840,17 @@ "format": "Bps", "label": "", "logBase": 1, - "max": null, "min": "0", "show": true }, { "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": true } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } }, { @@ -10656,7 +10858,9 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "$DataSource", + "datasource": { + "uid": "$DataSource" + }, "description": "", "fieldConfig": { "defaults": { @@ -10713,6 +10917,9 @@ "targets": [ { "alias": "", + "datasource": { + "uid": "$DataSource" + }, "format": "time_series", "hide": false, "rawSql": "SELECT \n [time] = $__timeGroup([snapshot_time], $aggregation) \n ,metric = [instance_name]\n ,[value] = AVG([cntr_value_calculated])\n FROM [dbo].[vw_sqlwatch_report_fact_perf_os_performance_counters]\n WHERE [aggregation_interval_minutes] = 0\n AND $__timeFilter(snapshot_time)\n AND counter_name in ('Bytes Received from Replica/sec')\n AND [sql_instance] = '$sql_instance'\n GROUP BY [instance_name]\n ,$__timeGroup([snapshot_time], $aggregation) \nORDER BY\n time ASC\n \n ", @@ -10720,9 +10927,7 @@ } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "Bytes Received from Replica", "tooltip": { "shared": true, @@ -10732,9 +10937,7 @@ "transparent": true, "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, @@ -10744,26 +10947,24 @@ "format": "Bps", "label": "", "logBase": 1, - "max": null, "min": "0", "show": true }, { "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": true } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } }, { - "datasource": null, + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "fieldConfig": { "defaults": { "custom": {} @@ -10784,12 +10985,14 @@ "pluginVersion": "7.4.2", "targets": [ { + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "queryType": "randomWalk", "refId": "A" } ], - "timeFrom": null, - "timeShift": null, "title": "", "transparent": true, "type": "text" @@ -10799,7 +11002,9 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "$DataSource", + "datasource": { + "uid": "$DataSource" + }, "description": "", "fieldConfig": { "defaults": { @@ -10855,6 +11060,9 @@ "targets": [ { "alias": "", + "datasource": { + "uid": "$DataSource" + }, "format": "time_series", "hide": false, "rawSql": "SELECT \n [time] = $__timeGroup([snapshot_time], $aggregation) \n ,metric = [instance_name]\n ,[value] = AVG([cntr_value_calculated])\n FROM [dbo].[vw_sqlwatch_report_fact_perf_os_performance_counters]\n WHERE [aggregation_interval_minutes] = 0\n AND $__timeFilter(snapshot_time)\n AND counter_name in ('Log Send Queue')\n AND [sql_instance] = '$sql_instance'\n\n GROUP BY [instance_name]\n ,$__timeGroup([snapshot_time], $aggregation) \nORDER BY\n time ASC\n \n ", @@ -10862,9 +11070,7 @@ } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "Log Send Queue", "tooltip": { "shared": true, @@ -10874,9 +11080,7 @@ "transparent": true, "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, @@ -10886,36 +11090,43 @@ "format": "deckbytes", "label": "", "logBase": 1, - "max": null, "min": "0", "show": true }, { "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": true } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } } ], + "targets": [ + { + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, + "refId": "A" + } + ], "title": "$sql_instance: Availability Groups", "type": "row" }, { "collapsed": true, - "datasource": null, + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "gridPos": { "h": 1, "w": 24, "x": 0, - "y": 14 + "y": 45 }, "id": 220, "panels": [ @@ -10924,7 +11135,9 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "$DataSource", + "datasource": { + "uid": "$DataSource" + }, "description": "0 - OK\n1 - WARNING\n2 - CRITICAL\n3 - CHECK ERROR", "fieldConfig": { "defaults": { @@ -10977,6 +11190,9 @@ "targets": [ { "alias": "", + "datasource": { + "uid": "$DataSource" + }, "format": "time_series", "hide": false, "rawSql": "SELECT [metric] = replace([check_name],' failure count','')\n ,value = CASE [check_status] \n WHEN 'CRITICAL' THEN 2\n WHEN 'WARNING' THEN 1\n WHEN 'OK' THEN 0\n ELSE 3 END\n ,time=[snapshot_time]\n FROM [dbo].[vw_sqlwatch_report_fact_check] with (nolock)\n WHERE target_sql_instance = '$sql_instance'\n --AND check_enabled = 1\n AND $__timeFilter([snapshot_time])\n AND check_status <> 'OK'\n --AND last_check_status IN ($Status)\n order by time asc", @@ -10984,9 +11200,7 @@ } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "Check Failure History", "tooltip": { "shared": true, @@ -10997,9 +11211,7 @@ "transparent": true, "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, @@ -11008,35 +11220,33 @@ "$$hashKey": "object:165", "decimals": 0, "format": "short", - "label": null, "logBase": 1, - "max": null, "min": "0", "show": true }, { "$$hashKey": "object:166", "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": true } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } }, { - "datasource": "$DataSource", + "datasource": { + "uid": "$DataSource" + }, "description": "", "fieldConfig": { "defaults": { "custom": { - "align": null, - "displayMode": "color-background", + "cellOptions": { + "mode": "gradient", + "type": "color-background" + }, "filterable": true }, "links": [], @@ -11045,8 +11255,7 @@ "mode": "absolute", "steps": [ { - "color": "rgba(115, 191, 105, 0)", - "value": null + "color": "rgba(115, 191, 105, 0)" } ] } @@ -11062,40 +11271,21 @@ "id": "mappings", "value": [ { - "from": "", - "id": 0, - "operator": "", - "text": "CRITICAL", - "to": "", - "type": 1, - "value": "2" - }, - { - "from": "", - "id": 1, - "operator": "", - "text": "WARNING", - "to": "", - "type": 1, - "value": "1" - }, - { - "from": "", - "id": 2, - "operator": "", - "text": "OK", - "to": "", - "type": 1, - "value": "0" - }, - { - "from": "", - "id": 3, - "operator": "", - "text": "CHECK ERROR", - "to": "", - "type": 1, - "value": "3" + "options": { + "0": { + "text": "OK" + }, + "1": { + "text": "WARNING" + }, + "2": { + "text": "CRITICAL" + }, + "3": { + "text": "CHECK ERROR" + } + }, + "type": "value" } ] }, @@ -11105,8 +11295,7 @@ "mode": "absolute", "steps": [ { - "color": "purple", - "value": null + "color": "purple" }, { "color": "green", @@ -11148,8 +11337,10 @@ "value": 100 }, { - "id": "custom.displayMode", - "value": "auto" + "id": "custom.cellOptions", + "value": { + "type": "auto" + } }, { "id": "displayName", @@ -11164,8 +11355,10 @@ }, "properties": [ { - "id": "custom.displayMode", - "value": "json-view" + "id": "custom.cellOptions", + "value": { + "type": "json-view" + } } ] }, @@ -11208,8 +11401,10 @@ "value": 1002 }, { - "id": "custom.displayMode", - "value": "json-view" + "id": "custom.cellOptions", + "value": { + "type": "json-view" + } } ] }, @@ -11271,14 +11466,15 @@ "targets": [ { "alias": "", + "datasource": { + "uid": "$DataSource" + }, "format": "table", "hide": false, "rawSql": "SELECT [check_name] = replace([check_name],' failure count','')\n , check_description\n ,[last_check_value] = convert(varchar(max),[last_check_value])\n ,status = CASE [last_check_status] \n WHEN 'CRITICAL' THEN 2\n WHEN 'WARNING' THEN 1\n WHEN 'OK' THEN 0\n ELSE 3 END\n ,last_check_date\n FROM [dbo].[vw_sqlwatch_report_dim_check] with (nolock)\n WHERE [target_sql_instance] = '$sql_instance'\n AND check_enabled = 1\n --AND $__timeFilter(last_check_date)\n --AND last_check_status IN ($Status)\n order by case when last_check_status = 'OK' then dateadd(month,-1,last_check_date) else last_check_date end desc", "refId": "A" } ], - "timeFrom": null, - "timeShift": null, "title": "Checks", "transformations": [ { @@ -11309,7 +11505,10 @@ "type": "table" }, { - "datasource": null, + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "fieldConfig": { "defaults": { "custom": {} @@ -11330,12 +11529,14 @@ "pluginVersion": "7.4.2", "targets": [ { + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "queryType": "randomWalk", "refId": "A" } ], - "timeFrom": null, - "timeShift": null, "title": "", "transparent": true, "type": "text" @@ -11345,7 +11546,9 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "$DataSource", + "datasource": { + "uid": "$DataSource" + }, "description": "", "fieldConfig": { "defaults": { @@ -11399,6 +11602,9 @@ "targets": [ { "alias": "", + "datasource": { + "uid": "$DataSource" + }, "format": "time_series", "hide": false, "rawSql": "SELECT time=$__timeGroup(snapshot_time, $aggregation)\r\n ,metric='(' + convert(varchar(10),[check_id]) + ') ' + [check_name] \r\n ,[value]=avg([check_exec_time_ms])\r\n FROM [dbo].[vw_sqlwatch_report_fact_check] with (nolock)\r\n WHERE target_sql_instance = '$sql_instance'\r\n --AND check_enabled = 1\r\n AND $__timeFilter([snapshot_time])\r\n AND check_status <> 'OK'\r\n --AND last_check_status IN ($Status)\r\n group by $__timeGroup(snapshot_time, $aggregation), '(' + convert(varchar(10),[check_id]) + ') ' + [check_name] \r\n order by time asc", @@ -11406,9 +11612,7 @@ } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "Check Execution Time", "tooltip": { "shared": true, @@ -11419,9 +11623,7 @@ "transparent": true, "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, @@ -11430,44 +11632,53 @@ "$$hashKey": "object:225", "decimals": 0, "format": "ms", - "label": null, "logBase": 1, - "max": null, "min": "0", "show": true }, { "$$hashKey": "object:226", "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": true } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } } ], + "targets": [ + { + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, + "refId": "A" + } + ], "title": "$sql_instance: Checks", "type": "row" }, { "collapsed": true, - "datasource": null, + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "gridPos": { "h": 1, "w": 24, "x": 0, - "y": 15 + "y": 46 }, "id": 304, "panels": [ { - "datasource": null, + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "fieldConfig": { "defaults": { "custom": {} @@ -11488,18 +11699,22 @@ "pluginVersion": "7.4.2", "targets": [ { + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, "queryType": "randomWalk", "refId": "A" } ], - "timeFrom": null, - "timeShift": null, "title": "", "transparent": true, "type": "text" }, { - "datasource": "$DataSource", + "datasource": { + "uid": "$DataSource" + }, "description": "", "fieldConfig": { "defaults": { @@ -11512,8 +11727,7 @@ "mode": "absolute", "steps": [ { - "color": "dark-green", - "value": null + "color": "dark-green" } ] } @@ -11548,14 +11762,15 @@ "targets": [ { "alias": "", + "datasource": { + "uid": "$DataSource" + }, "format": "time_series", "hide": false, "rawSql": "SELECT time = r1.snapshot_time\r\n ,[running] = avg(running)\r\n ,[sleeping] = avg(sleeping)\r\n ,[dormant] = avg(dormant)\r\n --,[preconnect] = avg(preconnect)\r\n ,[cpu_time] = avg(cpu_time)\r\n ,[reads] = avg(reads)\r\n ,[writes] = avg(writes)\r\n , type = case when type = 1 then 'User' else 'System' end\r\n FROM [sqlwatch_logger_dm_exec_sessions_stats] r1 (nolock)\r\n\twhere $__timeFilter(r1.snapshot_time)\r\n and snapshot_time > dateadd(minute,-15,GETUTCDATE())\t\r\n and r1.sql_instance = '$sql_instance'\r\n group by r1.snapshot_time, case when type = 1 then 'User' else 'System' end\r\n order by time asc", "refId": "2" } ], - "timeFrom": null, - "timeShift": null, "title": "Sessions", "transformations": [ { @@ -11592,7 +11807,9 @@ "type": "stat" }, { - "datasource": "$DataSource", + "datasource": { + "uid": "$DataSource" + }, "description": "", "fieldConfig": { "defaults": { @@ -11610,8 +11827,7 @@ "mode": "absolute", "steps": [ { - "color": "dark-green", - "value": null + "color": "dark-green" } ] } @@ -11629,8 +11845,7 @@ "mode": "absolute", "steps": [ { - "color": "dark-green", - "value": null + "color": "dark-green" }, { "color": "light-orange", @@ -11675,14 +11890,15 @@ "targets": [ { "alias": "", + "datasource": { + "uid": "$DataSource" + }, "format": "time_series", "hide": false, "rawSql": "SELECT time = r1.snapshot_time\r\n , Background\t= background\r\n , Running = running\r\n , Runnable = runnable\r\n , Sleeping\t = sleeping\r\n , Suspended\t = suspended\r\n , Waiting\t = waiting_tasks\r\n FROM [sqlwatch_logger_dm_exec_requests_stats] r1 (nolock)\r\n\twhere $__timeFilter(r1.snapshot_time)\r\n\tand r1.snapshot_time > dateadd(minute,-15,getutcdate())\r\n and r1.sql_instance = '$sql_instance'\r\n and type = 1\r\n order by time asc", "refId": "A" } ], - "timeFrom": null, - "timeShift": null, "title": "Requests", "transformations": [ { @@ -11705,7 +11921,10 @@ "type": "stat" }, { - "datasource": "-- Dashboard --", + "datasource": { + "type": "datasource", + "uid": "-- Dashboard --" + }, "description": "", "fieldConfig": { "defaults": { @@ -11723,8 +11942,7 @@ "mode": "absolute", "steps": [ { - "color": "dark-green", - "value": null + "color": "dark-green" }, { "color": "dark-green", @@ -11747,8 +11965,7 @@ "mode": "absolute", "steps": [ { - "color": "dark-green", - "value": null + "color": "dark-green" }, { "color": "red", @@ -11761,11 +11978,14 @@ "id": "mappings", "value": [ { - "from": "-99999999", - "id": 1, - "text": "0", - "to": "0", - "type": 2 + "options": { + "from": -99999999, + "result": { + "text": "0" + }, + "to": 0 + }, + "type": "range" } ] } @@ -11799,12 +12019,14 @@ "pluginVersion": "7.4.2", "targets": [ { + "datasource": { + "type": "datasource", + "uid": "-- Dashboard --" + }, "panelId": 269, "refId": "A" } ], - "timeFrom": null, - "timeShift": null, "title": "SQL Memory", "transformations": [ { @@ -11867,7 +12089,10 @@ "type": "bargauge" }, { - "datasource": "-- Dashboard --", + "datasource": { + "type": "datasource", + "uid": "-- Dashboard --" + }, "description": "", "fieldConfig": { "defaults": { @@ -11884,8 +12109,7 @@ "mode": "absolute", "steps": [ { - "color": "dark-green", - "value": null + "color": "dark-green" } ] }, @@ -11918,12 +12142,14 @@ "pluginVersion": "7.4.2", "targets": [ { + "datasource": { + "type": "datasource", + "uid": "-- Dashboard --" + }, "panelId": 15, "refId": "A" } ], - "timeFrom": null, - "timeShift": null, "title": "Disk IO", "transformations": [ { @@ -11945,7 +12171,9 @@ "type": "bargauge" }, { - "datasource": "$DataSource", + "datasource": { + "uid": "$DataSource" + }, "description": "", "fieldConfig": { "defaults": { @@ -11961,8 +12189,7 @@ "mode": "absolute", "steps": [ { - "color": "dark-green", - "value": null + "color": "dark-green" }, { "color": "light-orange", @@ -12004,14 +12231,15 @@ "targets": [ { "alias": "", + "datasource": { + "uid": "$DataSource" + }, "format": "time_series", "hide": false, "rawSql": "SELECT \n [time] = snapshot_time \n ,[Latency Reads] = MAX(fs.[io_latency_read])\n ,[Latency Writes] = MAX(fs.[io_latency_write])\n \t ,[Reads IO] = AVG(fs.bytes_read_per_second)\n \t ,[Writes IO] = AVG(fs.bytes_written_per_second)\n ,[Disk] = left(upper([file_physical_name]),2) + ' ' + isnull(v.label,'')\n ,[Max Latency] = max(case when fs.[io_latency_read] > fs.[io_latency_write] then fs.[io_latency_read] else fs.[io_latency_write] end)\n FROM [dbo].[vw_sqlwatch_report_fact_perf_file_stats] fs\n outer apply (\n select top 1 label \n from [dbo].[sqlwatch_meta_os_volume] v\n\t where v.volume_name = left(fs.file_physical_name,3)) v\n WHERE 1 = 1\n AND $__timeFilter(fs.snapshot_time)\n and snapshot_time >= dateadd(minute,-15,getutcdate())\n AND [sql_instance] = '$sql_instance'\n AND database_name IN ($database)\n GROUP BY fs.snapshot_time \n , left(upper([file_physical_name]),2) + ' ' + isnull(v.label,'')\nORDER BY\n time ASC", "refId": "File Stats" } ], - "timeFrom": null, - "timeShift": null, "title": "Disk Latency", "transformations": [ { @@ -12040,12 +12268,22 @@ "type": "bargauge" } ], + "targets": [ + { + "datasource": { + "type": "mssql", + "uid": "EeAYXKY4k" + }, + "refId": "A" + } + ], "title": "$sql_instance: SQL Server Overview - Alternative Graphs", "type": "row" } ], - "refresh": "5s", - "schemaVersion": 27, + "refresh": "1m", + "revision": 1, + "schemaVersion": 38, "style": "dark", "tags": [ "SQLWATCH" @@ -12054,12 +12292,11 @@ "list": [ { "current": { - "selected": true, - "text": "SQL-2", - "value": "SQL-2" + "selected": false, + "text": "SQLWATCH", + "value": "SQLWATCH" }, "description": "The repository is the SQL Server Instance hosting the SQLWATCH database. This can be a stand alone production instance or the central repository.", - "error": null, "hide": 0, "includeAll": false, "label": "Repository", @@ -12074,16 +12311,16 @@ "type": "datasource" }, { - "allValue": null, "current": { "selected": false, - "text": "SQL-2", - "value": "SQL-2" + "text": "SQLWATCH-OSS\\SQL2019STD", + "value": "SQLWATCH-OSS\\SQL2019STD" + }, + "datasource": { + "uid": "$DataSource" }, - "datasource": "$DataSource", "definition": "SELECT [servername] FROM [dbo].[sqlwatch_meta_server]", "description": "The SQL Instance (servername) as captured by the SQLWATCH in `dbo].[sqlwatch_meta_server]. If you are connecting to the central repository, this list will show all collected servers.", - "error": null, "hide": 0, "includeAll": false, "label": "SQL Instance", @@ -12096,7 +12333,6 @@ "skipUrlSync": false, "sort": 1, "tagValuesQuery": "", - "tags": [], "tagsQuery": "", "type": "query", "useTags": false @@ -12111,7 +12347,6 @@ "value": "$__auto_interval_aggregation" }, "description": "When showing larger periods, such as last hour or last day, we have to aggregate the data as otherwise we would have killed the SQL and Grafana. Aggregation means that we're going to average the data over time buckets such 1 minute or 1 hour. You can set this to your liking but best leave to Auto.", - "error": null, "hide": 0, "label": "Aggregation", "name": "aggregation", @@ -12149,14 +12384,12 @@ "type": "interval" }, { - "allValue": null, "current": { "selected": false, "text": "Category", "value": "Category" }, "description": "Whether to show Wait Categories or Types. Wait Types are grouped into categories and whilst types provide more insight, categories give you a quick view into where the problems are.", - "error": null, "hide": 0, "includeAll": false, "label": "Waits By", @@ -12180,14 +12413,12 @@ "type": "custom" }, { - "allValue": null, "current": { "selected": false, "text": "ms/sec", "value": "ms/sec" }, "description": "How we should be showing wait calculation - as a delta between snapshots, or as absolute ms/sec within the snapshot. Delta will allow to see trends into whether waits are getting worse or better.", - "error": null, "hide": 0, "includeAll": false, "label": "Wait Calculation", @@ -12211,14 +12442,11 @@ "type": "custom" }, { - "allValue": null, "current": { "selected": false, "text": "No", "value": "No" }, - "description": null, - "error": null, "hide": 2, "includeAll": false, "label": "Show OK Checks", @@ -12242,16 +12470,15 @@ "type": "custom" }, { - "allValue": null, "current": { "selected": false, - "text": "Microsoft SQL Server 2016 (SP2) (KB4052908) - 13.0.5026.0 (X64) \n\tMar 18 2018 09:11:49 \n\tCopyright (c) Microsoft Corporation\n\tDeveloper Edition (64-bit) on Windows Server 2016 Standard 10.0 (Build 14393: ) (Hypervisor)\n", - "value": "Microsoft SQL Server 2016 (SP2) (KB4052908) - 13.0.5026.0 (X64) \n\tMar 18 2018 09:11:49 \n\tCopyright (c) Microsoft Corporation\n\tDeveloper Edition (64-bit) on Windows Server 2016 Standard 10.0 (Build 14393: ) (Hypervisor)\n" + "text": "Microsoft SQL Server 2019 (RTM) - 15.0.2000.5 (X64) \n\tSep 24 2019 13:48:23 \n\tCopyright (C) 2019 Microsoft Corporation\n\tStandard Edition (64-bit) on Windows Server 2019 Datacenter 10.0 (Build 17763: ) (Hypervisor)\n", + "value": "Microsoft SQL Server 2019 (RTM) - 15.0.2000.5 (X64) \n\tSep 24 2019 13:48:23 \n\tCopyright (C) 2019 Microsoft Corporation\n\tStandard Edition (64-bit) on Windows Server 2019 Datacenter 10.0 (Build 17763: ) (Hypervisor)\n" + }, + "datasource": { + "uid": "${DataSource}" }, - "datasource": "${DataSource}", "definition": "select [sql_version]\n FROM [dbo].[sqlwatch_meta_server]\n WHERE servername = '$sql_instance'", - "description": null, - "error": null, "hide": 2, "includeAll": false, "label": "SQL Version", @@ -12264,13 +12491,11 @@ "skipUrlSync": false, "sort": 0, "tagValuesQuery": "", - "tags": [], "tagsQuery": "", "type": "query", "useTags": false }, { - "allValue": null, "current": { "selected": true, "text": [ @@ -12280,10 +12505,11 @@ "$__all" ] }, - "datasource": "${DataSource}", + "datasource": { + "uid": "${DataSource}" + }, "definition": "select database_name from [dbo].[sqlwatch_meta_database] where sql_instance = '$sql_instance'", "description": "Filter database related metrics by database. This can be handy if we're interested in performance of a particular database. However, note that metrics at the server level (like CPU) will not account for this filter.", - "error": null, "hide": 0, "includeAll": true, "label": "Database", @@ -12296,22 +12522,21 @@ "skipUrlSync": false, "sort": 0, "tagValuesQuery": "", - "tags": [], "tagsQuery": "", "type": "query", "useTags": false }, { - "allValue": null, "current": { "selected": false, "text": "None", "value": "None" }, - "datasource": "${DataSource}", + "datasource": { + "uid": "${DataSource}" + }, "definition": "select [baseline] = 'None'\nunion all\nselect [baseline] = '-1h'\nunion all\nselect [baseline] = '-1d'\nunion all\nselect [baseline] = '-1w'\nunion all\nselect [baseline] = 'Daily'\nunion all\nSELECT [baseline] = 'User Baseline: ' + convert(varchar(100),[baseline_id])\nFROM [dbo].[sqlwatch_meta_baseline]\nWHERE sql_instance = '$sql_instance'", "description": "This is not yet Implemented", - "error": null, "hide": 2, "includeAll": false, "label": "Baseline", @@ -12324,20 +12549,17 @@ "skipUrlSync": false, "sort": 0, "tagValuesQuery": "", - "tags": [], "tagsQuery": "", "type": "query", "useTags": false }, { - "allValue": null, "current": { "selected": false, "text": "All", "value": "All" }, "description": "Whether we should only show currently running requests and sessions (as of very last capture) or all requests captured within the dashboard time period.", - "error": null, "hide": 2, "includeAll": false, "label": "Requests", @@ -12376,5 +12598,6 @@ "timezone": "utc", "title": "SQL Instance Overview", "uid": "sqlwatch-instance-overview", - "version": 3 -} \ No newline at end of file + "version": 3, + "weekStart": "" +}