├── LICENSE ├── README.md ├── dashboards ├── azuresqldb │ ├── AzureSQLDBEstate.json │ ├── AzureSQLDBPerformance.json │ └── AzureSQLDBStorage.json └── azuresqlmi │ ├── AzureSQLManagedInstancePerformance.json │ └── AzureSQLManagedInstanceStorage.json ├── grafana └── rungrafana.sh ├── influxdb └── runinfluxdb.sh ├── monitoringsetup.sh └── telegraf └── telegraf.conf /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 denzilribeiro 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Azure SQL Database / Managed Instance monitoring 2 | Solution for near-realtime monitoring on Azure SQL database and Azure SQL Managed instance using the [telegraf SQL plugin](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/sqlserver) . A previous version was covered under the blog [Near-realtime monitoring for managed instances](https://techcommunity.microsoft.com/t5/DataCAT/Real-time-performance-monitoring-for-Azure-SQL-Database-Managed/ba-p/305537) 3 | 4 | ## VM Setup 5 | Create an Ubuntu VM in a new or an existing resource group with a data disk and mount the attached data disk in the Linux OS. Other Linux distros will work as well, but commands may need to be adjusted accordingly. 6 | 7 | The easiest way it to create an Ubuntu VM using the portal, as it will setup everything automatically for you. Just make sure you configure the NSG group to allow access inbound from specific client IPs to destination port 3000 (which is the port used by Grafana UI) on this VM. 8 | 9 | **Example with Az CLI** 10 | Create a resource group with the [az group create](https://docs.microsoft.com/en-us/cli/azure/group) command. Preferably, use the region where the monitored resources are located. 11 | 12 | Create the Ubuntu VM with [az vm create](https://docs.microsoft.com/en-us/cli/azure/vm?view=azure-cli-latest#az-vm-create) : Sample CLI command here creates a VM with SSH authentication, as well as with an additional 1TB data disk which will be used to store the monitoring data. Typical customizations to the below command include: 13 | - Specify an existing public key using the `--ssh-key-values` argument 14 | - Specify an existing VNET and subnet using `--vnet-name` and `--subnet` arguments 15 | - Customize the admin username for the VM using `--admin-username` 16 | 17 | ``` 18 | az vm create --resource-group --name --image UbuntuLTS --size --generate-ssh-keys --nsg-rule SSH --data-disk-sizes-gb 1024 19 | ``` 20 | 21 | [Connect](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/ssh-from-windows#connect-to-your-vm) to the VM and [mount the new disk to the VM.](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/attach-disk-portal#connect-to-the-linux-vm-to-mount-the-new-disk). Please keep in mind 22 | that the mount point for the data disk by default is `/datadrive` (as per the above doc). 23 | The subsequent scripts in this repo assume a default of `/data/influxdb`. So either: 24 | - Use `/data/influxdb` as the mount point for the data disk, OR 25 | - Adjust the `INFLUXDB_HOST_DIRECTORY` setting mentioned later, to match the mount point used above. 26 | 27 | ## Clone repo 28 | The repo includes grafana dashboards for Azure SQL Database and Managed instances, and setup scripts for influxdb, telegraf and grafana. 29 | 30 | ``` 31 | cd $HOME 32 | sudo apt-get install git 33 | git clone https://github.com/denzilribeiro/sqldbmonitoring.git 34 | ``` 35 | 36 | ## Setup 37 | Setup will install docker.io, will install the telegraf latest release build and configure the firewall to open up port 3000 required for Grafana and pull and start the Grafana container. 38 | 39 | ``` 40 | cd $HOME/sqldbmonitoring 41 | sudo ./monitoringsetup.sh 42 | ``` 43 | 44 | If you want to install the latest nightly build with most recent telegraf changes 45 | 46 | ``` 47 | cd $HOME/sqldbmonitoring 48 | sudo ./monitoringsetup.sh nightly 49 | ``` 50 | 51 | ## Install, Configure and start InfluxDB 52 | Assuming you have mounted a separate data drive as specified in the Setup VM portion , edit the ./runinfluxdb.sh file and modify the INFLUXDB_HOST_DIRECTORY variable to point to the directory where you want the InfluxDB volume to be mounted, if it is something other than the default of /data/influxdb. 53 | ``` 54 | cd $HOME/sqldbmonitoring/influxdb 55 | sudo nano runinfluxdb.sh 56 | ``` 57 | Pull the docker image and start InfluxDB: 58 | ``` 59 | cd $HOME/sqldbmonitoring/influxdb 60 | sudo ./runinfluxdb.sh 61 | ``` 62 | 63 | ## Create Logins for each Managed Instance or SQL DB being monitored 64 | **Note:** Please ENSURE that you replace the sample passwords given below with 65 | a truly strong password, before executing the same. 66 | 67 | For Managed Instance: 68 | ``` 69 | USE master; 70 | CREATE LOGIN telegraf WITH PASSWORD = N'StrongPassword1!', CHECK_POLICY = ON; 71 | GO 72 | GRANT VIEW SERVER STATE TO telegraf; 73 | GO 74 | GRANT VIEW ANY DEFINITION TO telegraf; 75 | GO 76 | ``` 77 | 78 | For SQL DB create a database scoped user for each database being monitored: 79 | ``` 80 | CREATE USER [telegraf] WITH PASSWORD = N'Mystrongpassword1!'; 81 | GO 82 | GRANT VIEW DATABASE STATE TO [telegraf]; 83 | GO 84 | ``` 85 | 86 | ## Edit the telegraf configuration file 87 | Edit the `/etc/telegraf/telegraf.conf` to add one connection string per each database you want to monitor. Optionally, modify the `/etc/telegraf/telegraf.conf` with the options specified [here](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/sqlserver) 88 | 89 | **Note:** For **Azure SQL Database**, you would need one connection string per database you are monitoring specifying the right database name and *not* `master`. An example snippet for monitoring two databases, each on a different logical SQL server, is shown below: 90 | ``` 91 | [[inputs.sqlserver]] 92 | servers = ["Server=server1.database.windows.net;Port=1433;User Id=telegraf;Password=Mystrongpassword1!;database=myazuredb1;app name=telegraf;" 93 | ,"Server=server2.database.windows.net;Port=1433;User Id=telegraf;Password=Mystrongpassword1!;database=myazuredb2;app name=telegraf;"] 94 | 95 | query_version = 2 96 | azuredb=true 97 | ``` 98 | 99 | By default all the collectors are enabled. If you copy the sample telegraf.conf the Schedulers and SqlRequests collector are excluded as they are chattier than other collectors. You can control what collectors to exclude by including them in the excluded array in the conf file 100 | 101 | ``` 102 | exclude_query = [ 'Schedulers' , 'SqlRequests'] 103 | ``` 104 | 105 | If the influx DB docker container is on the same VM then the section below doesn’t have to change, if it is on another machine or non-default port, the url would have to be updated accordingly. 106 | 107 | ``` 108 | urls = ["[http://127.0.0.1:8086](http://127.0.0.1:8086/)"] 109 | database = "telegraf" 110 | ``` 111 | 112 | **Note:** 113 | - Port for Azure SQL Managed Instance with public endpoint is 3342 114 | - If influxDB is hosted on a different VM have to modify the url for `outputs.influxdb` 115 | - Default polling interval is 10 seconds, if you want to change that have to add /change the Agent Interval value. 116 | 117 | ## Start the telegraf service 118 | Use the commands below to start telegraf and check its status: 119 | ``` 120 | sudo systemctl start telegraf 121 | sudo systemctl status telegraf 122 | ``` 123 | To Troubleshoot any failures you can look at the log entries using the command: 124 | ``` 125 | sudo journalctl -u telegraf --no-pager 126 | ``` 127 | 128 | ## Create Telegraf database and retention policy 129 | We want to set a retention policy in influxdb based on how long data needs to be kept. 130 | To do so, you can use the ```create retention policy``` command within Influx (example below): 131 | ``` 132 | sudo docker exec -it influxdb influx 133 | use telegraf; 134 | show retention policies; 135 | create retention policy retain30days on telegraf duration 30d replication 1 default; 136 | quit 137 | ``` 138 | 139 | ## Configure Grafana data source and dashboards 140 | The Dashboards are located here: 141 | - [Azure SQL Database Dashboards](/dashboards/azuresqldb) 142 | - [Azure SQL Managed Instance Dashboards](/dashboards/azuresqlmi) 143 | 144 | But first, we need to create the data source for InfluxDB in Grafana: 145 | - Browse to your Grafana instance - http://[GRAFANA_IP_ADDRESS_OR_SERVERNAME]:3000 146 | - First time you login into Grafana, login and password are set to: `admin`. Also take a look at the [Getting Started](https://grafana.com/docs/grafana/latest/guides/getting_started/) Grafana documentation. 147 | - Add a data source for InfluxDB. Detailed instructions are at in the [grafana data source docs](http://docs.grafana.org/features/datasources/influxdb/) 148 | 149 | - Type: `InfluxDB` 150 | - Name: `InfluxDB` (this is also the default) 151 | - URL: http://[INFLUXDB_HOSTNAME_OR_IP_ADDRESS]:8086. (The default of http://localhost:8086 works if Grafana and InfluxDB are on the same machine; make sure to explicitly enter this URL in the field. ) 152 | - Database: `telegraf` 153 | - Click "Save & Test". You should see the message "Data source is working". 154 | 155 | - Then, we can download Grafana dashboard JSON definitions from the repo [Azure SQL DB dashboards](/dashboards/azuresqldb) folder or [Azure SQL Managed Instance Dashboards](/dashboards/azuresqlmi) for all the dashboards, and then [import](http://docs.grafana.org/reference/export_import/#importing-a-dashboard) them into Grafana. 156 | 157 | ** Note:** If you changed the name of the datasource above from the default value of `InfluxDB`, then you will need to edit the JSON for the dashboards and change `"datasource": "InfluxDB"` to `"datasource": "YOURDATASOURCENAME"`, where `YOURDATASOURCENAME` is a placeholder for the actual datasource name. 158 | 159 | ## Dashboard samples 160 | As mentioned above, we provide some sample dashboards, which can be customized by you as needed: 161 | - `AzureSQLDBEstate.json`: This is for Azure SQL Databases and not for Managed Instances. This gives you a row per logical SQL Server, and a top level view of all the servers and databases, from which you can then drill-through to an individual database. 162 | - `AzureSQLDBPerformance.json`: This is a database level view of performance, going from high level metrics, to wait stats, to performance counters, and typically serves as the primary performance dashboard. 163 | - `AzureSQLDBStorage.json`: This dashboard is primarily based on virtual file stats DMV, and gives you a view of storage latency for the respective databases. 164 | -------------------------------------------------------------------------------- /dashboards/azuresqldb/AzureSQLDBEstate.json: -------------------------------------------------------------------------------- 1 | { 2 | "annotations": { 3 | "list": [ 4 | { 5 | "builtIn": 1, 6 | "datasource": "-- Grafana --", 7 | "enable": true, 8 | "hide": true, 9 | "iconColor": "rgba(0, 211, 255, 1)", 10 | "name": "Annotations & Alerts", 11 | "type": "dashboard" 12 | } 13 | ] 14 | }, 15 | "description": "", 16 | "editable": true, 17 | "gnetId": null, 18 | "graphTooltip": 1, 19 | "id": 6, 20 | "iteration": 1570577085411, 21 | "links": [ 22 | { 23 | "asDropdown": true, 24 | "icon": "external link", 25 | "includeVars": false, 26 | "keepTime": true, 27 | "tags": [ 28 | "Azure SQL DB" 29 | ], 30 | "targetBlank": false, 31 | "title": "Other SQLDB Dashboards", 32 | "type": "dashboards" 33 | } 34 | ], 35 | "panels": [ 36 | { 37 | "collapsed": false, 38 | "gridPos": { 39 | "h": 1, 40 | "w": 24, 41 | "x": 0, 42 | "y": 0 43 | }, 44 | "id": 6, 45 | "panels": [], 46 | "repeat": "InstanceName", 47 | "scopedVars": { 48 | "InstanceName": { 49 | "selected": false, 50 | "text": "vs-hs", 51 | "value": "vs-hs" 52 | } 53 | }, 54 | "title": "$InstanceName", 55 | "type": "row" 56 | }, 57 | { 58 | "aliasColors": {}, 59 | "bars": false, 60 | "dashLength": 10, 61 | "dashes": false, 62 | "fill": 1, 63 | "gridPos": { 64 | "h": 7, 65 | "w": 6, 66 | "x": 0, 67 | "y": 1 68 | }, 69 | "id": 2, 70 | "legend": { 71 | "alignAsTable": true, 72 | "avg": false, 73 | "current": false, 74 | "max": false, 75 | "min": false, 76 | "rightSide": true, 77 | "show": true, 78 | "total": false, 79 | "values": false 80 | }, 81 | "lines": true, 82 | "linewidth": 1, 83 | "links": [ 84 | { 85 | "dashboard": "SQL DB Performance", 86 | "params": "__all_variables", 87 | "title": "SQL DB Performance", 88 | "type": "dashboard", 89 | "url": "/d/sqldbperf/sql-db-performance" 90 | } 91 | ], 92 | "nullPointMode": "null", 93 | "options": {}, 94 | "percentage": false, 95 | "pointradius": 2, 96 | "points": false, 97 | "renderer": "flot", 98 | "scopedVars": { 99 | "InstanceName": { 100 | "selected": false, 101 | "text": "vs-hs", 102 | "value": "vs-hs" 103 | } 104 | }, 105 | "seriesOverrides": [], 106 | "spaceLength": 10, 107 | "stack": false, 108 | "steppedLine": false, 109 | "targets": [ 110 | { 111 | "alias": "$tag_database_name", 112 | "groupBy": [ 113 | { 114 | "params": [ 115 | "database_name" 116 | ], 117 | "type": "tag" 118 | } 119 | ], 120 | "measurement": "sqlserver_azurestats", 121 | "orderByTime": "ASC", 122 | "policy": "default", 123 | "refId": "A", 124 | "resultFormat": "time_series", 125 | "select": [ 126 | [ 127 | { 128 | "params": [ 129 | "avg_cpu_percent" 130 | ], 131 | "type": "field" 132 | } 133 | ] 134 | ], 135 | "tags": [ 136 | { 137 | "key": "sql_instance", 138 | "operator": "=~", 139 | "value": "/^$InstanceName$/" 140 | } 141 | ] 142 | } 143 | ], 144 | "thresholds": [], 145 | "timeFrom": null, 146 | "timeRegions": [], 147 | "timeShift": null, 148 | "title": "Avg CPU", 149 | "tooltip": { 150 | "shared": true, 151 | "sort": 0, 152 | "value_type": "individual" 153 | }, 154 | "type": "graph", 155 | "xaxis": { 156 | "buckets": null, 157 | "mode": "time", 158 | "name": null, 159 | "show": true, 160 | "values": [] 161 | }, 162 | "yaxes": [ 163 | { 164 | "format": "percent", 165 | "label": null, 166 | "logBase": 1, 167 | "max": null, 168 | "min": null, 169 | "show": true 170 | }, 171 | { 172 | "format": "short", 173 | "label": null, 174 | "logBase": 1, 175 | "max": null, 176 | "min": null, 177 | "show": true 178 | } 179 | ], 180 | "yaxis": { 181 | "align": false, 182 | "alignLevel": null 183 | } 184 | }, 185 | { 186 | "aliasColors": {}, 187 | "bars": false, 188 | "dashLength": 10, 189 | "dashes": false, 190 | "fill": 1, 191 | "gridPos": { 192 | "h": 7, 193 | "w": 5, 194 | "x": 6, 195 | "y": 1 196 | }, 197 | "id": 4, 198 | "legend": { 199 | "alignAsTable": true, 200 | "avg": false, 201 | "current": false, 202 | "max": false, 203 | "min": false, 204 | "rightSide": true, 205 | "show": true, 206 | "total": false, 207 | "values": false 208 | }, 209 | "lines": true, 210 | "linewidth": 1, 211 | "links": [], 212 | "nullPointMode": "null", 213 | "options": {}, 214 | "percentage": false, 215 | "pointradius": 2, 216 | "points": false, 217 | "renderer": "flot", 218 | "scopedVars": { 219 | "InstanceName": { 220 | "selected": false, 221 | "text": "vs-hs", 222 | "value": "vs-hs" 223 | } 224 | }, 225 | "seriesOverrides": [], 226 | "spaceLength": 10, 227 | "stack": false, 228 | "steppedLine": false, 229 | "targets": [ 230 | { 231 | "alias": "$tag_database_name", 232 | "groupBy": [ 233 | { 234 | "params": [ 235 | "database_name" 236 | ], 237 | "type": "tag" 238 | } 239 | ], 240 | "measurement": "sqlserver_azurestats", 241 | "orderByTime": "ASC", 242 | "policy": "default", 243 | "refId": "A", 244 | "resultFormat": "time_series", 245 | "select": [ 246 | [ 247 | { 248 | "params": [ 249 | "avg_cpu_percent" 250 | ], 251 | "type": "field" 252 | } 253 | ] 254 | ], 255 | "tags": [ 256 | { 257 | "key": "sql_instance", 258 | "operator": "=~", 259 | "value": "/^$InstanceName$/" 260 | } 261 | ] 262 | } 263 | ], 264 | "thresholds": [], 265 | "timeFrom": null, 266 | "timeRegions": [], 267 | "timeShift": null, 268 | "title": "Avg Log Write", 269 | "tooltip": { 270 | "shared": true, 271 | "sort": 0, 272 | "value_type": "individual" 273 | }, 274 | "type": "graph", 275 | "xaxis": { 276 | "buckets": null, 277 | "mode": "time", 278 | "name": null, 279 | "show": true, 280 | "values": [] 281 | }, 282 | "yaxes": [ 283 | { 284 | "format": "percent", 285 | "label": null, 286 | "logBase": 1, 287 | "max": null, 288 | "min": null, 289 | "show": true 290 | }, 291 | { 292 | "format": "short", 293 | "label": null, 294 | "logBase": 1, 295 | "max": null, 296 | "min": null, 297 | "show": true 298 | } 299 | ], 300 | "yaxis": { 301 | "align": false, 302 | "alignLevel": null 303 | } 304 | }, 305 | { 306 | "aliasColors": {}, 307 | "bars": false, 308 | "dashLength": 10, 309 | "dashes": false, 310 | "fill": 1, 311 | "gridPos": { 312 | "h": 7, 313 | "w": 5, 314 | "x": 11, 315 | "y": 1 316 | }, 317 | "id": 3, 318 | "legend": { 319 | "alignAsTable": true, 320 | "avg": false, 321 | "current": false, 322 | "max": false, 323 | "min": false, 324 | "rightSide": true, 325 | "show": true, 326 | "total": false, 327 | "values": false 328 | }, 329 | "lines": true, 330 | "linewidth": 1, 331 | "links": [], 332 | "nullPointMode": "null", 333 | "options": {}, 334 | "percentage": false, 335 | "pointradius": 2, 336 | "points": false, 337 | "renderer": "flot", 338 | "scopedVars": { 339 | "InstanceName": { 340 | "selected": false, 341 | "text": "vs-hs", 342 | "value": "vs-hs" 343 | } 344 | }, 345 | "seriesOverrides": [], 346 | "spaceLength": 10, 347 | "stack": false, 348 | "steppedLine": false, 349 | "targets": [ 350 | { 351 | "alias": "$tag_database_name", 352 | "groupBy": [ 353 | { 354 | "params": [ 355 | "database_name" 356 | ], 357 | "type": "tag" 358 | } 359 | ], 360 | "measurement": "sqlserver_azurestats", 361 | "orderByTime": "ASC", 362 | "policy": "default", 363 | "refId": "A", 364 | "resultFormat": "time_series", 365 | "select": [ 366 | [ 367 | { 368 | "params": [ 369 | "avg_data_io_percent" 370 | ], 371 | "type": "field" 372 | } 373 | ] 374 | ], 375 | "tags": [ 376 | { 377 | "key": "sql_instance", 378 | "operator": "=~", 379 | "value": "/^$InstanceName$/" 380 | } 381 | ] 382 | } 383 | ], 384 | "thresholds": [], 385 | "timeFrom": null, 386 | "timeRegions": [], 387 | "timeShift": null, 388 | "title": "Avg Data IO", 389 | "tooltip": { 390 | "shared": true, 391 | "sort": 0, 392 | "value_type": "individual" 393 | }, 394 | "type": "graph", 395 | "xaxis": { 396 | "buckets": null, 397 | "mode": "time", 398 | "name": null, 399 | "show": true, 400 | "values": [] 401 | }, 402 | "yaxes": [ 403 | { 404 | "format": "percent", 405 | "label": null, 406 | "logBase": 1, 407 | "max": null, 408 | "min": null, 409 | "show": true 410 | }, 411 | { 412 | "format": "short", 413 | "label": null, 414 | "logBase": 1, 415 | "max": null, 416 | "min": null, 417 | "show": true 418 | } 419 | ], 420 | "yaxis": { 421 | "align": false, 422 | "alignLevel": null 423 | } 424 | }, 425 | { 426 | "columns": [], 427 | "fontSize": "100%", 428 | "gridPos": { 429 | "h": 7, 430 | "w": 7, 431 | "x": 16, 432 | "y": 1 433 | }, 434 | "id": 16, 435 | "links": [], 436 | "options": {}, 437 | "pageSize": null, 438 | "scopedVars": { 439 | "InstanceName": { 440 | "selected": false, 441 | "text": "vs-hs", 442 | "value": "vs-hs" 443 | } 444 | }, 445 | "scroll": true, 446 | "showHeader": true, 447 | "sort": { 448 | "col": 1, 449 | "desc": false 450 | }, 451 | "styles": [ 452 | { 453 | "alias": "Time", 454 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 455 | "pattern": "Time", 456 | "type": "hidden" 457 | }, 458 | { 459 | "alias": "DB Name", 460 | "colorMode": null, 461 | "colors": [ 462 | "rgba(245, 54, 54, 0.9)", 463 | "rgba(237, 129, 40, 0.89)", 464 | "rgba(50, 172, 45, 0.97)" 465 | ], 466 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 467 | "decimals": 2, 468 | "link": true, 469 | "linkTargetBlank": true, 470 | "linkTooltip": "${__cell:raw} Dashboard", 471 | "linkUrl": "/d/sqldbperf/sql-db-performance?var-InstanceName=${__cell_4:raw}&var-DatabaseName=${__cell:raw}", 472 | "mappingType": 1, 473 | "pattern": "database_name", 474 | "thresholds": [], 475 | "type": "string", 476 | "unit": "short" 477 | }, 478 | { 479 | "alias": "Service Level Objective", 480 | "colorMode": null, 481 | "colors": [ 482 | "rgba(245, 54, 54, 0.9)", 483 | "rgba(237, 129, 40, 0.89)", 484 | "rgba(50, 172, 45, 0.97)" 485 | ], 486 | "decimals": 2, 487 | "link": false, 488 | "pattern": "hardware_type", 489 | "thresholds": [], 490 | "type": "string", 491 | "unit": "short" 492 | }, 493 | { 494 | "alias": "Service Tier", 495 | "colorMode": null, 496 | "colors": [ 497 | "rgba(245, 54, 54, 0.9)", 498 | "rgba(237, 129, 40, 0.89)", 499 | "rgba(50, 172, 45, 0.97)" 500 | ], 501 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 502 | "decimals": 2, 503 | "mappingType": 1, 504 | "pattern": "sku", 505 | "thresholds": [], 506 | "type": "string", 507 | "unit": "short" 508 | }, 509 | { 510 | "alias": "Memory", 511 | "colorMode": null, 512 | "colors": [ 513 | "rgba(245, 54, 54, 0.9)", 514 | "rgba(237, 129, 40, 0.89)", 515 | "rgba(50, 172, 45, 0.97)" 516 | ], 517 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 518 | "decimals": 2, 519 | "mappingType": 1, 520 | "pattern": "database_memory", 521 | "thresholds": [], 522 | "type": "number", 523 | "unit": "mbytes" 524 | }, 525 | { 526 | "alias": "instance", 527 | "colorMode": null, 528 | "colors": [ 529 | "rgba(245, 54, 54, 0.9)", 530 | "rgba(237, 129, 40, 0.89)", 531 | "rgba(50, 172, 45, 0.97)" 532 | ], 533 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 534 | "decimals": 2, 535 | "mappingType": 1, 536 | "pattern": "sql_instance", 537 | "thresholds": [], 538 | "type": "string", 539 | "unit": "short", 540 | "valueMaps": [] 541 | } 542 | ], 543 | "targets": [ 544 | { 545 | "groupBy": [ 546 | { 547 | "params": [ 548 | "sql_instance" 549 | ], 550 | "type": "tag" 551 | } 552 | ], 553 | "measurement": "sqlserver_server_properties", 554 | "orderByTime": "ASC", 555 | "policy": "default", 556 | "query": "SELECT LAST(cpu_count) as Cpu, LAST(server_memory) as database_memory FROM \"sqlserver_server_properties\" WHERE \"sql_instance\" =~ /^$InstanceName$/ AND $timeFilter GROUP BY \"sql_instance\", \"database_name\" ,\"sku\", \"hardware_type\" ", 557 | "rawQuery": true, 558 | "refId": "A", 559 | "resultFormat": "table", 560 | "select": [ 561 | [ 562 | { 563 | "params": [ 564 | "cpu_count" 565 | ], 566 | "type": "field" 567 | } 568 | ] 569 | ], 570 | "tags": [] 571 | } 572 | ], 573 | "timeFrom": null, 574 | "timeShift": null, 575 | "title": "SQL DB Properties", 576 | "transform": "table", 577 | "type": "table" 578 | }, 579 | { 580 | "collapsed": false, 581 | "gridPos": { 582 | "h": 1, 583 | "w": 24, 584 | "x": 0, 585 | "y": 8 586 | }, 587 | "id": 18, 588 | "panels": [], 589 | "repeat": null, 590 | "repeatIteration": 1570577085411, 591 | "repeatPanelId": 6, 592 | "scopedVars": { 593 | "InstanceName": { 594 | "selected": false, 595 | "text": "sqlscale", 596 | "value": "sqlscale" 597 | } 598 | }, 599 | "title": "$InstanceName", 600 | "type": "row" 601 | }, 602 | { 603 | "aliasColors": {}, 604 | "bars": false, 605 | "dashLength": 10, 606 | "dashes": false, 607 | "fill": 1, 608 | "gridPos": { 609 | "h": 7, 610 | "w": 6, 611 | "x": 0, 612 | "y": 9 613 | }, 614 | "id": 19, 615 | "legend": { 616 | "alignAsTable": true, 617 | "avg": false, 618 | "current": false, 619 | "max": false, 620 | "min": false, 621 | "rightSide": true, 622 | "show": true, 623 | "total": false, 624 | "values": false 625 | }, 626 | "lines": true, 627 | "linewidth": 1, 628 | "links": [ 629 | { 630 | "dashboard": "SQL DB Performance", 631 | "params": "__all_variables", 632 | "title": "SQL DB Performance", 633 | "type": "dashboard", 634 | "url": "/d/sqldbperf/sql-db-performance" 635 | } 636 | ], 637 | "nullPointMode": "null", 638 | "options": {}, 639 | "percentage": false, 640 | "pointradius": 2, 641 | "points": false, 642 | "renderer": "flot", 643 | "repeatIteration": 1570577085411, 644 | "repeatPanelId": 2, 645 | "repeatedByRow": true, 646 | "scopedVars": { 647 | "InstanceName": { 648 | "selected": false, 649 | "text": "sqlscale", 650 | "value": "sqlscale" 651 | } 652 | }, 653 | "seriesOverrides": [], 654 | "spaceLength": 10, 655 | "stack": false, 656 | "steppedLine": false, 657 | "targets": [ 658 | { 659 | "alias": "$tag_database_name", 660 | "groupBy": [ 661 | { 662 | "params": [ 663 | "database_name" 664 | ], 665 | "type": "tag" 666 | } 667 | ], 668 | "measurement": "sqlserver_azurestats", 669 | "orderByTime": "ASC", 670 | "policy": "default", 671 | "refId": "A", 672 | "resultFormat": "time_series", 673 | "select": [ 674 | [ 675 | { 676 | "params": [ 677 | "avg_cpu_percent" 678 | ], 679 | "type": "field" 680 | } 681 | ] 682 | ], 683 | "tags": [ 684 | { 685 | "key": "sql_instance", 686 | "operator": "=~", 687 | "value": "/^$InstanceName$/" 688 | } 689 | ] 690 | } 691 | ], 692 | "thresholds": [], 693 | "timeFrom": null, 694 | "timeRegions": [], 695 | "timeShift": null, 696 | "title": "Avg CPU", 697 | "tooltip": { 698 | "shared": true, 699 | "sort": 0, 700 | "value_type": "individual" 701 | }, 702 | "type": "graph", 703 | "xaxis": { 704 | "buckets": null, 705 | "mode": "time", 706 | "name": null, 707 | "show": true, 708 | "values": [] 709 | }, 710 | "yaxes": [ 711 | { 712 | "format": "percent", 713 | "label": null, 714 | "logBase": 1, 715 | "max": null, 716 | "min": null, 717 | "show": true 718 | }, 719 | { 720 | "format": "short", 721 | "label": null, 722 | "logBase": 1, 723 | "max": null, 724 | "min": null, 725 | "show": true 726 | } 727 | ], 728 | "yaxis": { 729 | "align": false, 730 | "alignLevel": null 731 | } 732 | }, 733 | { 734 | "aliasColors": {}, 735 | "bars": false, 736 | "dashLength": 10, 737 | "dashes": false, 738 | "fill": 1, 739 | "gridPos": { 740 | "h": 7, 741 | "w": 5, 742 | "x": 6, 743 | "y": 9 744 | }, 745 | "id": 20, 746 | "legend": { 747 | "alignAsTable": true, 748 | "avg": false, 749 | "current": false, 750 | "max": false, 751 | "min": false, 752 | "rightSide": true, 753 | "show": true, 754 | "total": false, 755 | "values": false 756 | }, 757 | "lines": true, 758 | "linewidth": 1, 759 | "links": [], 760 | "nullPointMode": "null", 761 | "options": {}, 762 | "percentage": false, 763 | "pointradius": 2, 764 | "points": false, 765 | "renderer": "flot", 766 | "repeatIteration": 1570577085411, 767 | "repeatPanelId": 4, 768 | "repeatedByRow": true, 769 | "scopedVars": { 770 | "InstanceName": { 771 | "selected": false, 772 | "text": "sqlscale", 773 | "value": "sqlscale" 774 | } 775 | }, 776 | "seriesOverrides": [], 777 | "spaceLength": 10, 778 | "stack": false, 779 | "steppedLine": false, 780 | "targets": [ 781 | { 782 | "alias": "$tag_database_name", 783 | "groupBy": [ 784 | { 785 | "params": [ 786 | "database_name" 787 | ], 788 | "type": "tag" 789 | } 790 | ], 791 | "measurement": "sqlserver_azurestats", 792 | "orderByTime": "ASC", 793 | "policy": "default", 794 | "refId": "A", 795 | "resultFormat": "time_series", 796 | "select": [ 797 | [ 798 | { 799 | "params": [ 800 | "avg_cpu_percent" 801 | ], 802 | "type": "field" 803 | } 804 | ] 805 | ], 806 | "tags": [ 807 | { 808 | "key": "sql_instance", 809 | "operator": "=~", 810 | "value": "/^$InstanceName$/" 811 | } 812 | ] 813 | } 814 | ], 815 | "thresholds": [], 816 | "timeFrom": null, 817 | "timeRegions": [], 818 | "timeShift": null, 819 | "title": "Avg Log Write", 820 | "tooltip": { 821 | "shared": true, 822 | "sort": 0, 823 | "value_type": "individual" 824 | }, 825 | "type": "graph", 826 | "xaxis": { 827 | "buckets": null, 828 | "mode": "time", 829 | "name": null, 830 | "show": true, 831 | "values": [] 832 | }, 833 | "yaxes": [ 834 | { 835 | "format": "percent", 836 | "label": null, 837 | "logBase": 1, 838 | "max": null, 839 | "min": null, 840 | "show": true 841 | }, 842 | { 843 | "format": "short", 844 | "label": null, 845 | "logBase": 1, 846 | "max": null, 847 | "min": null, 848 | "show": true 849 | } 850 | ], 851 | "yaxis": { 852 | "align": false, 853 | "alignLevel": null 854 | } 855 | }, 856 | { 857 | "aliasColors": {}, 858 | "bars": false, 859 | "dashLength": 10, 860 | "dashes": false, 861 | "fill": 1, 862 | "gridPos": { 863 | "h": 7, 864 | "w": 5, 865 | "x": 11, 866 | "y": 9 867 | }, 868 | "id": 21, 869 | "legend": { 870 | "alignAsTable": true, 871 | "avg": false, 872 | "current": false, 873 | "max": false, 874 | "min": false, 875 | "rightSide": true, 876 | "show": true, 877 | "total": false, 878 | "values": false 879 | }, 880 | "lines": true, 881 | "linewidth": 1, 882 | "links": [], 883 | "nullPointMode": "null", 884 | "options": {}, 885 | "percentage": false, 886 | "pointradius": 2, 887 | "points": false, 888 | "renderer": "flot", 889 | "repeatIteration": 1570577085411, 890 | "repeatPanelId": 3, 891 | "repeatedByRow": true, 892 | "scopedVars": { 893 | "InstanceName": { 894 | "selected": false, 895 | "text": "sqlscale", 896 | "value": "sqlscale" 897 | } 898 | }, 899 | "seriesOverrides": [], 900 | "spaceLength": 10, 901 | "stack": false, 902 | "steppedLine": false, 903 | "targets": [ 904 | { 905 | "alias": "$tag_database_name", 906 | "groupBy": [ 907 | { 908 | "params": [ 909 | "database_name" 910 | ], 911 | "type": "tag" 912 | } 913 | ], 914 | "measurement": "sqlserver_azurestats", 915 | "orderByTime": "ASC", 916 | "policy": "default", 917 | "refId": "A", 918 | "resultFormat": "time_series", 919 | "select": [ 920 | [ 921 | { 922 | "params": [ 923 | "avg_data_io_percent" 924 | ], 925 | "type": "field" 926 | } 927 | ] 928 | ], 929 | "tags": [ 930 | { 931 | "key": "sql_instance", 932 | "operator": "=~", 933 | "value": "/^$InstanceName$/" 934 | } 935 | ] 936 | } 937 | ], 938 | "thresholds": [], 939 | "timeFrom": null, 940 | "timeRegions": [], 941 | "timeShift": null, 942 | "title": "Avg Data IO", 943 | "tooltip": { 944 | "shared": true, 945 | "sort": 0, 946 | "value_type": "individual" 947 | }, 948 | "type": "graph", 949 | "xaxis": { 950 | "buckets": null, 951 | "mode": "time", 952 | "name": null, 953 | "show": true, 954 | "values": [] 955 | }, 956 | "yaxes": [ 957 | { 958 | "format": "percent", 959 | "label": null, 960 | "logBase": 1, 961 | "max": null, 962 | "min": null, 963 | "show": true 964 | }, 965 | { 966 | "format": "short", 967 | "label": null, 968 | "logBase": 1, 969 | "max": null, 970 | "min": null, 971 | "show": true 972 | } 973 | ], 974 | "yaxis": { 975 | "align": false, 976 | "alignLevel": null 977 | } 978 | }, 979 | { 980 | "columns": [], 981 | "fontSize": "100%", 982 | "gridPos": { 983 | "h": 7, 984 | "w": 7, 985 | "x": 16, 986 | "y": 9 987 | }, 988 | "id": 22, 989 | "links": [], 990 | "options": {}, 991 | "pageSize": null, 992 | "repeatIteration": 1570577085411, 993 | "repeatPanelId": 16, 994 | "repeatedByRow": true, 995 | "scopedVars": { 996 | "InstanceName": { 997 | "selected": false, 998 | "text": "sqlscale", 999 | "value": "sqlscale" 1000 | } 1001 | }, 1002 | "scroll": true, 1003 | "showHeader": true, 1004 | "sort": { 1005 | "col": 1, 1006 | "desc": false 1007 | }, 1008 | "styles": [ 1009 | { 1010 | "alias": "Time", 1011 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 1012 | "pattern": "Time", 1013 | "type": "hidden" 1014 | }, 1015 | { 1016 | "alias": "DB Name", 1017 | "colorMode": null, 1018 | "colors": [ 1019 | "rgba(245, 54, 54, 0.9)", 1020 | "rgba(237, 129, 40, 0.89)", 1021 | "rgba(50, 172, 45, 0.97)" 1022 | ], 1023 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 1024 | "decimals": 2, 1025 | "link": true, 1026 | "linkTargetBlank": true, 1027 | "linkTooltip": "${__cell:raw} Dashboard", 1028 | "linkUrl": "/d/sqldbperf/sql-db-performance?var-InstanceName=${__cell_4:raw}&var-DatabaseName=${__cell:raw}", 1029 | "mappingType": 1, 1030 | "pattern": "database_name", 1031 | "thresholds": [], 1032 | "type": "string", 1033 | "unit": "short" 1034 | }, 1035 | { 1036 | "alias": "Service Level Objective", 1037 | "colorMode": null, 1038 | "colors": [ 1039 | "rgba(245, 54, 54, 0.9)", 1040 | "rgba(237, 129, 40, 0.89)", 1041 | "rgba(50, 172, 45, 0.97)" 1042 | ], 1043 | "decimals": 2, 1044 | "link": false, 1045 | "pattern": "hardware_type", 1046 | "thresholds": [], 1047 | "type": "string", 1048 | "unit": "short" 1049 | }, 1050 | { 1051 | "alias": "Service Tier", 1052 | "colorMode": null, 1053 | "colors": [ 1054 | "rgba(245, 54, 54, 0.9)", 1055 | "rgba(237, 129, 40, 0.89)", 1056 | "rgba(50, 172, 45, 0.97)" 1057 | ], 1058 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 1059 | "decimals": 2, 1060 | "mappingType": 1, 1061 | "pattern": "sku", 1062 | "thresholds": [], 1063 | "type": "string", 1064 | "unit": "short" 1065 | }, 1066 | { 1067 | "alias": "Memory", 1068 | "colorMode": null, 1069 | "colors": [ 1070 | "rgba(245, 54, 54, 0.9)", 1071 | "rgba(237, 129, 40, 0.89)", 1072 | "rgba(50, 172, 45, 0.97)" 1073 | ], 1074 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 1075 | "decimals": 2, 1076 | "mappingType": 1, 1077 | "pattern": "database_memory", 1078 | "thresholds": [], 1079 | "type": "number", 1080 | "unit": "mbytes" 1081 | }, 1082 | { 1083 | "alias": "instance", 1084 | "colorMode": null, 1085 | "colors": [ 1086 | "rgba(245, 54, 54, 0.9)", 1087 | "rgba(237, 129, 40, 0.89)", 1088 | "rgba(50, 172, 45, 0.97)" 1089 | ], 1090 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 1091 | "decimals": 2, 1092 | "mappingType": 1, 1093 | "pattern": "sql_instance", 1094 | "thresholds": [], 1095 | "type": "string", 1096 | "unit": "short", 1097 | "valueMaps": [] 1098 | } 1099 | ], 1100 | "targets": [ 1101 | { 1102 | "groupBy": [ 1103 | { 1104 | "params": [ 1105 | "sql_instance" 1106 | ], 1107 | "type": "tag" 1108 | } 1109 | ], 1110 | "measurement": "sqlserver_server_properties", 1111 | "orderByTime": "ASC", 1112 | "policy": "default", 1113 | "query": "SELECT LAST(cpu_count) as Cpu, LAST(server_memory) as database_memory FROM \"sqlserver_server_properties\" WHERE \"sql_instance\" =~ /^$InstanceName$/ AND $timeFilter GROUP BY \"sql_instance\", \"database_name\" ,\"sku\", \"hardware_type\" ", 1114 | "rawQuery": true, 1115 | "refId": "A", 1116 | "resultFormat": "table", 1117 | "select": [ 1118 | [ 1119 | { 1120 | "params": [ 1121 | "cpu_count" 1122 | ], 1123 | "type": "field" 1124 | } 1125 | ] 1126 | ], 1127 | "tags": [] 1128 | } 1129 | ], 1130 | "timeFrom": null, 1131 | "timeShift": null, 1132 | "title": "SQL DB Properties", 1133 | "transform": "table", 1134 | "type": "table" 1135 | }, 1136 | { 1137 | "collapsed": false, 1138 | "gridPos": { 1139 | "h": 1, 1140 | "w": 24, 1141 | "x": 0, 1142 | "y": 16 1143 | }, 1144 | "id": 23, 1145 | "panels": [], 1146 | "repeat": null, 1147 | "repeatIteration": 1570577085411, 1148 | "repeatPanelId": 6, 1149 | "scopedVars": { 1150 | "InstanceName": { 1151 | "selected": false, 1152 | "text": "dmmssqlsrv", 1153 | "value": "dmmssqlsrv" 1154 | } 1155 | }, 1156 | "title": "$InstanceName", 1157 | "type": "row" 1158 | }, 1159 | { 1160 | "aliasColors": {}, 1161 | "bars": false, 1162 | "dashLength": 10, 1163 | "dashes": false, 1164 | "fill": 1, 1165 | "gridPos": { 1166 | "h": 7, 1167 | "w": 6, 1168 | "x": 0, 1169 | "y": 17 1170 | }, 1171 | "id": 24, 1172 | "legend": { 1173 | "alignAsTable": true, 1174 | "avg": false, 1175 | "current": false, 1176 | "max": false, 1177 | "min": false, 1178 | "rightSide": true, 1179 | "show": true, 1180 | "total": false, 1181 | "values": false 1182 | }, 1183 | "lines": true, 1184 | "linewidth": 1, 1185 | "links": [ 1186 | { 1187 | "dashboard": "SQL DB Performance", 1188 | "params": "__all_variables", 1189 | "title": "SQL DB Performance", 1190 | "type": "dashboard", 1191 | "url": "/d/sqldbperf/sql-db-performance" 1192 | } 1193 | ], 1194 | "nullPointMode": "null", 1195 | "options": {}, 1196 | "percentage": false, 1197 | "pointradius": 2, 1198 | "points": false, 1199 | "renderer": "flot", 1200 | "repeatIteration": 1570577085411, 1201 | "repeatPanelId": 2, 1202 | "repeatedByRow": true, 1203 | "scopedVars": { 1204 | "InstanceName": { 1205 | "selected": false, 1206 | "text": "dmmssqlsrv", 1207 | "value": "dmmssqlsrv" 1208 | } 1209 | }, 1210 | "seriesOverrides": [], 1211 | "spaceLength": 10, 1212 | "stack": false, 1213 | "steppedLine": false, 1214 | "targets": [ 1215 | { 1216 | "alias": "$tag_database_name", 1217 | "groupBy": [ 1218 | { 1219 | "params": [ 1220 | "database_name" 1221 | ], 1222 | "type": "tag" 1223 | } 1224 | ], 1225 | "measurement": "sqlserver_azurestats", 1226 | "orderByTime": "ASC", 1227 | "policy": "default", 1228 | "refId": "A", 1229 | "resultFormat": "time_series", 1230 | "select": [ 1231 | [ 1232 | { 1233 | "params": [ 1234 | "avg_cpu_percent" 1235 | ], 1236 | "type": "field" 1237 | } 1238 | ] 1239 | ], 1240 | "tags": [ 1241 | { 1242 | "key": "sql_instance", 1243 | "operator": "=~", 1244 | "value": "/^$InstanceName$/" 1245 | } 1246 | ] 1247 | } 1248 | ], 1249 | "thresholds": [], 1250 | "timeFrom": null, 1251 | "timeRegions": [], 1252 | "timeShift": null, 1253 | "title": "Avg CPU", 1254 | "tooltip": { 1255 | "shared": true, 1256 | "sort": 0, 1257 | "value_type": "individual" 1258 | }, 1259 | "type": "graph", 1260 | "xaxis": { 1261 | "buckets": null, 1262 | "mode": "time", 1263 | "name": null, 1264 | "show": true, 1265 | "values": [] 1266 | }, 1267 | "yaxes": [ 1268 | { 1269 | "format": "percent", 1270 | "label": null, 1271 | "logBase": 1, 1272 | "max": null, 1273 | "min": null, 1274 | "show": true 1275 | }, 1276 | { 1277 | "format": "short", 1278 | "label": null, 1279 | "logBase": 1, 1280 | "max": null, 1281 | "min": null, 1282 | "show": true 1283 | } 1284 | ], 1285 | "yaxis": { 1286 | "align": false, 1287 | "alignLevel": null 1288 | } 1289 | }, 1290 | { 1291 | "aliasColors": {}, 1292 | "bars": false, 1293 | "dashLength": 10, 1294 | "dashes": false, 1295 | "fill": 1, 1296 | "gridPos": { 1297 | "h": 7, 1298 | "w": 5, 1299 | "x": 6, 1300 | "y": 17 1301 | }, 1302 | "id": 25, 1303 | "legend": { 1304 | "alignAsTable": true, 1305 | "avg": false, 1306 | "current": false, 1307 | "max": false, 1308 | "min": false, 1309 | "rightSide": true, 1310 | "show": true, 1311 | "total": false, 1312 | "values": false 1313 | }, 1314 | "lines": true, 1315 | "linewidth": 1, 1316 | "links": [], 1317 | "nullPointMode": "null", 1318 | "options": {}, 1319 | "percentage": false, 1320 | "pointradius": 2, 1321 | "points": false, 1322 | "renderer": "flot", 1323 | "repeatIteration": 1570577085411, 1324 | "repeatPanelId": 4, 1325 | "repeatedByRow": true, 1326 | "scopedVars": { 1327 | "InstanceName": { 1328 | "selected": false, 1329 | "text": "dmmssqlsrv", 1330 | "value": "dmmssqlsrv" 1331 | } 1332 | }, 1333 | "seriesOverrides": [], 1334 | "spaceLength": 10, 1335 | "stack": false, 1336 | "steppedLine": false, 1337 | "targets": [ 1338 | { 1339 | "alias": "$tag_database_name", 1340 | "groupBy": [ 1341 | { 1342 | "params": [ 1343 | "database_name" 1344 | ], 1345 | "type": "tag" 1346 | } 1347 | ], 1348 | "measurement": "sqlserver_azurestats", 1349 | "orderByTime": "ASC", 1350 | "policy": "default", 1351 | "refId": "A", 1352 | "resultFormat": "time_series", 1353 | "select": [ 1354 | [ 1355 | { 1356 | "params": [ 1357 | "avg_cpu_percent" 1358 | ], 1359 | "type": "field" 1360 | } 1361 | ] 1362 | ], 1363 | "tags": [ 1364 | { 1365 | "key": "sql_instance", 1366 | "operator": "=~", 1367 | "value": "/^$InstanceName$/" 1368 | } 1369 | ] 1370 | } 1371 | ], 1372 | "thresholds": [], 1373 | "timeFrom": null, 1374 | "timeRegions": [], 1375 | "timeShift": null, 1376 | "title": "Avg Log Write", 1377 | "tooltip": { 1378 | "shared": true, 1379 | "sort": 0, 1380 | "value_type": "individual" 1381 | }, 1382 | "type": "graph", 1383 | "xaxis": { 1384 | "buckets": null, 1385 | "mode": "time", 1386 | "name": null, 1387 | "show": true, 1388 | "values": [] 1389 | }, 1390 | "yaxes": [ 1391 | { 1392 | "format": "percent", 1393 | "label": null, 1394 | "logBase": 1, 1395 | "max": null, 1396 | "min": null, 1397 | "show": true 1398 | }, 1399 | { 1400 | "format": "short", 1401 | "label": null, 1402 | "logBase": 1, 1403 | "max": null, 1404 | "min": null, 1405 | "show": true 1406 | } 1407 | ], 1408 | "yaxis": { 1409 | "align": false, 1410 | "alignLevel": null 1411 | } 1412 | }, 1413 | { 1414 | "aliasColors": {}, 1415 | "bars": false, 1416 | "dashLength": 10, 1417 | "dashes": false, 1418 | "fill": 1, 1419 | "gridPos": { 1420 | "h": 7, 1421 | "w": 5, 1422 | "x": 11, 1423 | "y": 17 1424 | }, 1425 | "id": 26, 1426 | "legend": { 1427 | "alignAsTable": true, 1428 | "avg": false, 1429 | "current": false, 1430 | "max": false, 1431 | "min": false, 1432 | "rightSide": true, 1433 | "show": true, 1434 | "total": false, 1435 | "values": false 1436 | }, 1437 | "lines": true, 1438 | "linewidth": 1, 1439 | "links": [], 1440 | "nullPointMode": "null", 1441 | "options": {}, 1442 | "percentage": false, 1443 | "pointradius": 2, 1444 | "points": false, 1445 | "renderer": "flot", 1446 | "repeatIteration": 1570577085411, 1447 | "repeatPanelId": 3, 1448 | "repeatedByRow": true, 1449 | "scopedVars": { 1450 | "InstanceName": { 1451 | "selected": false, 1452 | "text": "dmmssqlsrv", 1453 | "value": "dmmssqlsrv" 1454 | } 1455 | }, 1456 | "seriesOverrides": [], 1457 | "spaceLength": 10, 1458 | "stack": false, 1459 | "steppedLine": false, 1460 | "targets": [ 1461 | { 1462 | "alias": "$tag_database_name", 1463 | "groupBy": [ 1464 | { 1465 | "params": [ 1466 | "database_name" 1467 | ], 1468 | "type": "tag" 1469 | } 1470 | ], 1471 | "measurement": "sqlserver_azurestats", 1472 | "orderByTime": "ASC", 1473 | "policy": "default", 1474 | "refId": "A", 1475 | "resultFormat": "time_series", 1476 | "select": [ 1477 | [ 1478 | { 1479 | "params": [ 1480 | "avg_data_io_percent" 1481 | ], 1482 | "type": "field" 1483 | } 1484 | ] 1485 | ], 1486 | "tags": [ 1487 | { 1488 | "key": "sql_instance", 1489 | "operator": "=~", 1490 | "value": "/^$InstanceName$/" 1491 | } 1492 | ] 1493 | } 1494 | ], 1495 | "thresholds": [], 1496 | "timeFrom": null, 1497 | "timeRegions": [], 1498 | "timeShift": null, 1499 | "title": "Avg Data IO", 1500 | "tooltip": { 1501 | "shared": true, 1502 | "sort": 0, 1503 | "value_type": "individual" 1504 | }, 1505 | "type": "graph", 1506 | "xaxis": { 1507 | "buckets": null, 1508 | "mode": "time", 1509 | "name": null, 1510 | "show": true, 1511 | "values": [] 1512 | }, 1513 | "yaxes": [ 1514 | { 1515 | "format": "percent", 1516 | "label": null, 1517 | "logBase": 1, 1518 | "max": null, 1519 | "min": null, 1520 | "show": true 1521 | }, 1522 | { 1523 | "format": "short", 1524 | "label": null, 1525 | "logBase": 1, 1526 | "max": null, 1527 | "min": null, 1528 | "show": true 1529 | } 1530 | ], 1531 | "yaxis": { 1532 | "align": false, 1533 | "alignLevel": null 1534 | } 1535 | }, 1536 | { 1537 | "columns": [], 1538 | "fontSize": "100%", 1539 | "gridPos": { 1540 | "h": 7, 1541 | "w": 7, 1542 | "x": 16, 1543 | "y": 17 1544 | }, 1545 | "id": 27, 1546 | "links": [], 1547 | "options": {}, 1548 | "pageSize": null, 1549 | "repeatIteration": 1570577085411, 1550 | "repeatPanelId": 16, 1551 | "repeatedByRow": true, 1552 | "scopedVars": { 1553 | "InstanceName": { 1554 | "selected": false, 1555 | "text": "dmmssqlsrv", 1556 | "value": "dmmssqlsrv" 1557 | } 1558 | }, 1559 | "scroll": true, 1560 | "showHeader": true, 1561 | "sort": { 1562 | "col": 1, 1563 | "desc": false 1564 | }, 1565 | "styles": [ 1566 | { 1567 | "alias": "Time", 1568 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 1569 | "pattern": "Time", 1570 | "type": "hidden" 1571 | }, 1572 | { 1573 | "alias": "DB Name", 1574 | "colorMode": null, 1575 | "colors": [ 1576 | "rgba(245, 54, 54, 0.9)", 1577 | "rgba(237, 129, 40, 0.89)", 1578 | "rgba(50, 172, 45, 0.97)" 1579 | ], 1580 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 1581 | "decimals": 2, 1582 | "link": true, 1583 | "linkTargetBlank": true, 1584 | "linkTooltip": "${__cell:raw} Dashboard", 1585 | "linkUrl": "/d/sqldbperf/sql-db-performance?var-InstanceName=${__cell_4:raw}&var-DatabaseName=${__cell:raw}", 1586 | "mappingType": 1, 1587 | "pattern": "database_name", 1588 | "thresholds": [], 1589 | "type": "string", 1590 | "unit": "short" 1591 | }, 1592 | { 1593 | "alias": "Service Level Objective", 1594 | "colorMode": null, 1595 | "colors": [ 1596 | "rgba(245, 54, 54, 0.9)", 1597 | "rgba(237, 129, 40, 0.89)", 1598 | "rgba(50, 172, 45, 0.97)" 1599 | ], 1600 | "decimals": 2, 1601 | "link": false, 1602 | "pattern": "hardware_type", 1603 | "thresholds": [], 1604 | "type": "string", 1605 | "unit": "short" 1606 | }, 1607 | { 1608 | "alias": "Service Tier", 1609 | "colorMode": null, 1610 | "colors": [ 1611 | "rgba(245, 54, 54, 0.9)", 1612 | "rgba(237, 129, 40, 0.89)", 1613 | "rgba(50, 172, 45, 0.97)" 1614 | ], 1615 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 1616 | "decimals": 2, 1617 | "mappingType": 1, 1618 | "pattern": "sku", 1619 | "thresholds": [], 1620 | "type": "string", 1621 | "unit": "short" 1622 | }, 1623 | { 1624 | "alias": "Memory", 1625 | "colorMode": null, 1626 | "colors": [ 1627 | "rgba(245, 54, 54, 0.9)", 1628 | "rgba(237, 129, 40, 0.89)", 1629 | "rgba(50, 172, 45, 0.97)" 1630 | ], 1631 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 1632 | "decimals": 2, 1633 | "mappingType": 1, 1634 | "pattern": "database_memory", 1635 | "thresholds": [], 1636 | "type": "number", 1637 | "unit": "mbytes" 1638 | }, 1639 | { 1640 | "alias": "instance", 1641 | "colorMode": null, 1642 | "colors": [ 1643 | "rgba(245, 54, 54, 0.9)", 1644 | "rgba(237, 129, 40, 0.89)", 1645 | "rgba(50, 172, 45, 0.97)" 1646 | ], 1647 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 1648 | "decimals": 2, 1649 | "mappingType": 1, 1650 | "pattern": "sql_instance", 1651 | "thresholds": [], 1652 | "type": "string", 1653 | "unit": "short", 1654 | "valueMaps": [] 1655 | } 1656 | ], 1657 | "targets": [ 1658 | { 1659 | "groupBy": [ 1660 | { 1661 | "params": [ 1662 | "sql_instance" 1663 | ], 1664 | "type": "tag" 1665 | } 1666 | ], 1667 | "measurement": "sqlserver_server_properties", 1668 | "orderByTime": "ASC", 1669 | "policy": "default", 1670 | "query": "SELECT LAST(cpu_count) as Cpu, LAST(server_memory) as database_memory FROM \"sqlserver_server_properties\" WHERE \"sql_instance\" =~ /^$InstanceName$/ AND $timeFilter GROUP BY \"sql_instance\", \"database_name\" ,\"sku\", \"hardware_type\" ", 1671 | "rawQuery": true, 1672 | "refId": "A", 1673 | "resultFormat": "table", 1674 | "select": [ 1675 | [ 1676 | { 1677 | "params": [ 1678 | "cpu_count" 1679 | ], 1680 | "type": "field" 1681 | } 1682 | ] 1683 | ], 1684 | "tags": [] 1685 | } 1686 | ], 1687 | "timeFrom": null, 1688 | "timeShift": null, 1689 | "title": "SQL DB Properties", 1690 | "transform": "table", 1691 | "type": "table" 1692 | }, 1693 | { 1694 | "collapsed": false, 1695 | "gridPos": { 1696 | "h": 1, 1697 | "w": 24, 1698 | "x": 0, 1699 | "y": 24 1700 | }, 1701 | "id": 17, 1702 | "panels": [], 1703 | "repeat": "InstanceName", 1704 | "repeatIteration": 1570464970711, 1705 | "repeatPanelId": 6, 1706 | "scopedVars": { 1707 | "InstanceName": { 1708 | "selected": false, 1709 | "text": "vs-hs", 1710 | "value": "vs-hs" 1711 | } 1712 | }, 1713 | "title": "$InstanceName", 1714 | "type": "row" 1715 | }, 1716 | { 1717 | "collapsed": false, 1718 | "gridPos": { 1719 | "h": 1, 1720 | "w": 24, 1721 | "x": 0, 1722 | "y": 25 1723 | }, 1724 | "id": 28, 1725 | "panels": [], 1726 | "repeat": null, 1727 | "repeatIteration": 1570577085411, 1728 | "repeatPanelId": 17, 1729 | "scopedVars": { 1730 | "InstanceName": { 1731 | "selected": false, 1732 | "text": "sqlscale", 1733 | "value": "sqlscale" 1734 | } 1735 | }, 1736 | "title": "$InstanceName", 1737 | "type": "row" 1738 | }, 1739 | { 1740 | "collapsed": false, 1741 | "gridPos": { 1742 | "h": 1, 1743 | "w": 24, 1744 | "x": 0, 1745 | "y": 26 1746 | }, 1747 | "id": 29, 1748 | "panels": [], 1749 | "repeat": null, 1750 | "repeatIteration": 1570577085411, 1751 | "repeatPanelId": 17, 1752 | "scopedVars": { 1753 | "InstanceName": { 1754 | "selected": false, 1755 | "text": "dmmssqlsrv", 1756 | "value": "dmmssqlsrv" 1757 | } 1758 | }, 1759 | "title": "$InstanceName", 1760 | "type": "row" 1761 | } 1762 | ], 1763 | "refresh": false, 1764 | "schemaVersion": 18, 1765 | "style": "dark", 1766 | "tags": [ 1767 | "Azure SQL DB" 1768 | ], 1769 | "templating": { 1770 | "list": [ 1771 | { 1772 | "allValue": null, 1773 | "current": { 1774 | "text": "All", 1775 | "value": [ 1776 | "$__all" 1777 | ] 1778 | }, 1779 | "datasource": "InfluxDB", 1780 | "definition": " select sql_instance from (select \"sql_instance\", LAST(\"engine_edition\") from \"sqlserver_server_properties\" where \"engine_edition\" = 5 and $timeFilter GROUP BY sql_instance)", 1781 | "hide": 0, 1782 | "includeAll": true, 1783 | "label": "Server Name", 1784 | "multi": true, 1785 | "name": "InstanceName", 1786 | "options": [], 1787 | "query": " select sql_instance from (select \"sql_instance\", LAST(\"engine_edition\") from \"sqlserver_server_properties\" where \"engine_edition\" = 5 and $timeFilter GROUP BY sql_instance)", 1788 | "refresh": 2, 1789 | "regex": "", 1790 | "skipUrlSync": false, 1791 | "sort": 2, 1792 | "tagValuesQuery": "", 1793 | "tags": [], 1794 | "tagsQuery": "", 1795 | "type": "query", 1796 | "useTags": false 1797 | } 1798 | ] 1799 | }, 1800 | "time": { 1801 | "from": "now-15m", 1802 | "to": "now" 1803 | }, 1804 | "timepicker": { 1805 | "refresh_intervals": [ 1806 | "5s", 1807 | "10s", 1808 | "30s", 1809 | "1m" 1810 | ], 1811 | "time_options": [ 1812 | "5m", 1813 | "15m", 1814 | "1h", 1815 | "6h", 1816 | "12h", 1817 | "24h", 1818 | "2d", 1819 | "7d", 1820 | "30d" 1821 | ] 1822 | }, 1823 | "timezone": "", 1824 | "title": "Azure SQL DB Estate", 1825 | "uid": "sqldboverview", 1826 | "version": 21 1827 | } -------------------------------------------------------------------------------- /dashboards/azuresqlmi/AzureSQLManagedInstanceStorage.json: -------------------------------------------------------------------------------- 1 | { 2 | "annotations": { 3 | "list": [ 4 | { 5 | "builtIn": 1, 6 | "datasource": "-- Grafana --", 7 | "enable": true, 8 | "hide": true, 9 | "iconColor": "rgba(0, 211, 255, 1)", 10 | "name": "Annotations & Alerts", 11 | "type": "dashboard" 12 | } 13 | ] 14 | }, 15 | "editable": true, 16 | "gnetId": null, 17 | "graphTooltip": 0, 18 | "id": 7, 19 | "iteration": 1565977948951, 20 | "links": [ 21 | { 22 | "asDropdown": true, 23 | "icon": "external link", 24 | "includeVars": true, 25 | "keepTime": true, 26 | "tags": [ 27 | "SQLMI" 28 | ], 29 | "title": "Other Managed Instance Dashboards", 30 | "type": "dashboards" 31 | } 32 | ], 33 | "panels": [ 34 | { 35 | "collapsed": false, 36 | "gridPos": { 37 | "h": 1, 38 | "w": 24, 39 | "x": 0, 40 | "y": 0 41 | }, 42 | "id": 21, 43 | "panels": [], 44 | "title": "Azure SQL Managed Instance Properties", 45 | "type": "row" 46 | }, 47 | { 48 | "cacheTimeout": null, 49 | "colorBackground": false, 50 | "colorValue": true, 51 | "colors": [ 52 | "#d44a3a", 53 | "rgba(237, 129, 40, 0.89)", 54 | "#3f6833" 55 | ], 56 | "datasource": "InfluxDB", 57 | "format": "short", 58 | "gauge": { 59 | "maxValue": 100, 60 | "minValue": 0, 61 | "show": false, 62 | "thresholdLabels": false, 63 | "thresholdMarkers": true 64 | }, 65 | "gridPos": { 66 | "h": 2, 67 | "w": 2, 68 | "x": 0, 69 | "y": 1 70 | }, 71 | "id": 29, 72 | "interval": null, 73 | "links": [], 74 | "mappingType": 1, 75 | "mappingTypes": [ 76 | { 77 | "name": "value to text", 78 | "value": 1 79 | }, 80 | { 81 | "name": "range to text", 82 | "value": 2 83 | } 84 | ], 85 | "maxDataPoints": 100, 86 | "nullPointMode": "connected", 87 | "nullText": null, 88 | "options": {}, 89 | "postfix": "", 90 | "postfixFontSize": "50%", 91 | "prefix": "", 92 | "prefixFontSize": "50%", 93 | "rangeMaps": [ 94 | { 95 | "from": "null", 96 | "text": "N/A", 97 | "to": "null" 98 | } 99 | ], 100 | "sparkline": { 101 | "fillColor": "rgb(42, 35, 10)", 102 | "full": true, 103 | "lineColor": "rgb(31, 120, 193)", 104 | "show": false 105 | }, 106 | "tableColumn": "", 107 | "targets": [ 108 | { 109 | "groupBy": [], 110 | "measurement": "sqlserver_server_properties", 111 | "orderByTime": "ASC", 112 | "policy": "default", 113 | "refId": "A", 114 | "resultFormat": "time_series", 115 | "select": [ 116 | [ 117 | { 118 | "params": [ 119 | "cpu_count" 120 | ], 121 | "type": "field" 122 | }, 123 | { 124 | "params": [], 125 | "type": "last" 126 | } 127 | ] 128 | ], 129 | "tags": [ 130 | { 131 | "key": "sql_instance", 132 | "operator": "=~", 133 | "value": "/$InstanceName$/" 134 | } 135 | ] 136 | } 137 | ], 138 | "thresholds": "", 139 | "title": "Virtual Cores", 140 | "type": "singlestat", 141 | "valueFontSize": "50%", 142 | "valueMaps": [ 143 | { 144 | "op": "=", 145 | "text": "N/A", 146 | "value": "null" 147 | } 148 | ], 149 | "valueName": "avg" 150 | }, 151 | { 152 | "cacheTimeout": null, 153 | "colorBackground": false, 154 | "colorValue": true, 155 | "colors": [ 156 | "#299c46", 157 | "rgba(237, 129, 40, 0.89)", 158 | "#d44a3a" 159 | ], 160 | "datasource": "InfluxDB", 161 | "format": "mbytes", 162 | "gauge": { 163 | "maxValue": 100, 164 | "minValue": 0, 165 | "show": false, 166 | "thresholdLabels": false, 167 | "thresholdMarkers": true 168 | }, 169 | "gridPos": { 170 | "h": 2, 171 | "w": 2, 172 | "x": 2, 173 | "y": 1 174 | }, 175 | "id": 31, 176 | "interval": null, 177 | "links": [], 178 | "mappingType": 1, 179 | "mappingTypes": [ 180 | { 181 | "name": "value to text", 182 | "value": 1 183 | }, 184 | { 185 | "name": "range to text", 186 | "value": 2 187 | } 188 | ], 189 | "maxDataPoints": 100, 190 | "nullPointMode": "connected", 191 | "nullText": null, 192 | "options": {}, 193 | "postfix": "", 194 | "postfixFontSize": "50%", 195 | "prefix": "", 196 | "prefixFontSize": "50%", 197 | "rangeMaps": [ 198 | { 199 | "from": "null", 200 | "text": "N/A", 201 | "to": "null" 202 | } 203 | ], 204 | "sparkline": { 205 | "fillColor": "rgba(31, 118, 189, 0.18)", 206 | "full": false, 207 | "lineColor": "rgb(31, 120, 193)", 208 | "show": false 209 | }, 210 | "tableColumn": "", 211 | "targets": [ 212 | { 213 | "groupBy": [ 214 | { 215 | "params": [ 216 | "$__interval" 217 | ], 218 | "type": "time" 219 | }, 220 | { 221 | "params": [ 222 | "null" 223 | ], 224 | "type": "fill" 225 | } 226 | ], 227 | "measurement": "sqlserver_server_properties", 228 | "orderByTime": "ASC", 229 | "policy": "default", 230 | "query": "SELECT last(\"server_memory\") FROM \"sqlserver_server_properties\" WHERE (\"sql_instance\" =~ /^$InstanceName$/) AND $timeFilter GROUP BY time($__interval) fill(null)", 231 | "rawQuery": false, 232 | "refId": "A", 233 | "resultFormat": "time_series", 234 | "select": [ 235 | [ 236 | { 237 | "params": [ 238 | "server_memory" 239 | ], 240 | "type": "field" 241 | }, 242 | { 243 | "params": [], 244 | "type": "last" 245 | } 246 | ] 247 | ], 248 | "tags": [ 249 | { 250 | "key": "sql_instance", 251 | "operator": "=~", 252 | "value": "/^$InstanceName$/" 253 | } 254 | ] 255 | } 256 | ], 257 | "thresholds": "", 258 | "title": "Server Memory", 259 | "type": "singlestat", 260 | "valueFontSize": "50%", 261 | "valueMaps": [ 262 | { 263 | "op": "=", 264 | "text": "N/A", 265 | "value": "null" 266 | } 267 | ], 268 | "valueName": "avg" 269 | }, 270 | { 271 | "cacheTimeout": null, 272 | "colorBackground": false, 273 | "colorValue": true, 274 | "colors": [ 275 | "#299c46", 276 | "rgba(237, 129, 40, 0.89)", 277 | "#d44a3a" 278 | ], 279 | "datasource": "InfluxDB", 280 | "format": "short", 281 | "gauge": { 282 | "maxValue": 100, 283 | "minValue": 0, 284 | "show": false, 285 | "thresholdLabels": false, 286 | "thresholdMarkers": true 287 | }, 288 | "gridPos": { 289 | "h": 2, 290 | "w": 2, 291 | "x": 4, 292 | "y": 1 293 | }, 294 | "id": 33, 295 | "interval": null, 296 | "links": [], 297 | "mappingType": 1, 298 | "mappingTypes": [ 299 | { 300 | "name": "value to text", 301 | "value": 1 302 | }, 303 | { 304 | "name": "range to text", 305 | "value": 2 306 | } 307 | ], 308 | "maxDataPoints": 100, 309 | "nullPointMode": "connected", 310 | "nullText": null, 311 | "options": {}, 312 | "postfix": "", 313 | "postfixFontSize": "50%", 314 | "prefix": "", 315 | "prefixFontSize": "50%", 316 | "rangeMaps": [ 317 | { 318 | "from": "null", 319 | "text": "N/A", 320 | "to": "null" 321 | } 322 | ], 323 | "sparkline": { 324 | "fillColor": "rgba(31, 118, 189, 0.18)", 325 | "full": false, 326 | "lineColor": "rgb(31, 120, 193)", 327 | "show": false 328 | }, 329 | "tableColumn": "", 330 | "targets": [ 331 | { 332 | "groupBy": [], 333 | "measurement": "sqlserver_server_properties", 334 | "orderByTime": "ASC", 335 | "policy": "default", 336 | "query": "SHOW TAG VALUES WITH KEY = \"sku\" WHERE \"sql_instance\" =~ /^$InstanceName$/ AND $timeFilter", 337 | "rawQuery": true, 338 | "refId": "A", 339 | "resultFormat": "time_series", 340 | "select": [ 341 | [ 342 | { 343 | "params": [ 344 | "TotalStorageMB" 345 | ], 346 | "type": "field" 347 | } 348 | ] 349 | ], 350 | "tags": [ 351 | { 352 | "key": "sql_instance", 353 | "operator": "=~", 354 | "value": "/^$InstanceName$/" 355 | } 356 | ] 357 | } 358 | ], 359 | "thresholds": "", 360 | "title": "Service Tier", 361 | "type": "singlestat", 362 | "valueFontSize": "50%", 363 | "valueMaps": [ 364 | { 365 | "op": "=", 366 | "text": "N/A", 367 | "value": "null" 368 | } 369 | ], 370 | "valueName": "current" 371 | }, 372 | { 373 | "cacheTimeout": null, 374 | "colorBackground": false, 375 | "colorValue": true, 376 | "colors": [ 377 | "#299c46", 378 | "rgba(237, 129, 40, 0.89)", 379 | "#d44a3a" 380 | ], 381 | "datasource": "InfluxDB", 382 | "format": "none", 383 | "gauge": { 384 | "maxValue": 100, 385 | "minValue": 0, 386 | "show": false, 387 | "thresholdLabels": false, 388 | "thresholdMarkers": true 389 | }, 390 | "gridPos": { 391 | "h": 2, 392 | "w": 2, 393 | "x": 6, 394 | "y": 1 395 | }, 396 | "id": 49, 397 | "interval": null, 398 | "links": [], 399 | "mappingType": 1, 400 | "mappingTypes": [ 401 | { 402 | "name": "value to text", 403 | "value": 1 404 | }, 405 | { 406 | "name": "range to text", 407 | "value": 2 408 | } 409 | ], 410 | "maxDataPoints": 100, 411 | "nullPointMode": "connected", 412 | "nullText": null, 413 | "options": {}, 414 | "postfix": "", 415 | "postfixFontSize": "50%", 416 | "prefix": "", 417 | "prefixFontSize": "50%", 418 | "rangeMaps": [ 419 | { 420 | "from": "null", 421 | "text": "N/A", 422 | "to": "null" 423 | } 424 | ], 425 | "sparkline": { 426 | "fillColor": "rgba(31, 118, 189, 0.18)", 427 | "full": false, 428 | "lineColor": "rgb(31, 120, 193)", 429 | "show": false 430 | }, 431 | "tableColumn": "", 432 | "targets": [ 433 | { 434 | "groupBy": [ 435 | { 436 | "params": [ 437 | "$__interval" 438 | ], 439 | "type": "time" 440 | }, 441 | { 442 | "params": [ 443 | "null" 444 | ], 445 | "type": "fill" 446 | } 447 | ], 448 | "measurement": "sqlserver_server_properties", 449 | "orderByTime": "ASC", 450 | "policy": "default", 451 | "query": "SHOW TAG VALUES WITH KEY = \"hardware_type\" WHERE \"sql_instance\" =~ /^$InstanceName$/ AND $timeFilter AND \"hardware_type\" != 'HYPERVISOR'", 452 | "rawQuery": true, 453 | "refId": "A", 454 | "resultFormat": "time_series", 455 | "select": [ 456 | [ 457 | { 458 | "params": [ 459 | "hardware_type" 460 | ], 461 | "type": "field" 462 | }, 463 | { 464 | "params": [], 465 | "type": "mean" 466 | } 467 | ] 468 | ], 469 | "tags": [ 470 | { 471 | "key": "sql_instance", 472 | "operator": "=~", 473 | "value": "/^$InstanceName$/" 474 | } 475 | ] 476 | } 477 | ], 478 | "thresholds": "", 479 | "title": "Service Level Objective", 480 | "type": "singlestat", 481 | "valueFontSize": "50%", 482 | "valueMaps": [ 483 | { 484 | "op": "=", 485 | "text": "N/A", 486 | "value": "null" 487 | } 488 | ], 489 | "valueName": "current" 490 | }, 491 | { 492 | "cacheTimeout": null, 493 | "colorBackground": false, 494 | "colorValue": true, 495 | "colors": [ 496 | "#299c46", 497 | "rgba(237, 129, 40, 0.89)", 498 | "#d44a3a" 499 | ], 500 | "datasource": "InfluxDB", 501 | "format": "mbytes", 502 | "gauge": { 503 | "maxValue": 100, 504 | "minValue": 0, 505 | "show": false, 506 | "thresholdLabels": false, 507 | "thresholdMarkers": true 508 | }, 509 | "gridPos": { 510 | "h": 2, 511 | "w": 2, 512 | "x": 8, 513 | "y": 1 514 | }, 515 | "id": 39, 516 | "interval": null, 517 | "links": [], 518 | "mappingType": 1, 519 | "mappingTypes": [ 520 | { 521 | "name": "value to text", 522 | "value": 1 523 | }, 524 | { 525 | "name": "range to text", 526 | "value": 2 527 | } 528 | ], 529 | "maxDataPoints": 100, 530 | "nullPointMode": "connected", 531 | "nullText": null, 532 | "options": {}, 533 | "postfix": "", 534 | "postfixFontSize": "50%", 535 | "prefix": "", 536 | "prefixFontSize": "50%", 537 | "rangeMaps": [ 538 | { 539 | "from": "null", 540 | "text": "N/A", 541 | "to": "null" 542 | } 543 | ], 544 | "sparkline": { 545 | "fillColor": "rgba(31, 118, 189, 0.18)", 546 | "full": false, 547 | "lineColor": "rgb(31, 120, 193)", 548 | "show": false 549 | }, 550 | "tableColumn": "", 551 | "targets": [ 552 | { 553 | "groupBy": [], 554 | "measurement": "sqlserver_server_properties", 555 | "orderByTime": "ASC", 556 | "policy": "default", 557 | "refId": "A", 558 | "resultFormat": "time_series", 559 | "select": [ 560 | [ 561 | { 562 | "params": [ 563 | "total_storage_mb" 564 | ], 565 | "type": "field" 566 | }, 567 | { 568 | "params": [], 569 | "type": "last" 570 | } 571 | ] 572 | ], 573 | "tags": [ 574 | { 575 | "key": "sql_instance", 576 | "operator": "=~", 577 | "value": "/^$InstanceName$/" 578 | } 579 | ] 580 | } 581 | ], 582 | "thresholds": "", 583 | "title": "Total Storage", 584 | "type": "singlestat", 585 | "valueFontSize": "50%", 586 | "valueMaps": [ 587 | { 588 | "op": "=", 589 | "text": "N/A", 590 | "value": "null" 591 | } 592 | ], 593 | "valueName": "current" 594 | }, 595 | { 596 | "cacheTimeout": null, 597 | "colorBackground": false, 598 | "colorValue": true, 599 | "colors": [ 600 | "#299c46", 601 | "rgba(237, 129, 40, 0.89)", 602 | "#d44a3a" 603 | ], 604 | "datasource": "InfluxDB", 605 | "format": "mbytes", 606 | "gauge": { 607 | "maxValue": 100, 608 | "minValue": 0, 609 | "show": false, 610 | "thresholdLabels": false, 611 | "thresholdMarkers": true 612 | }, 613 | "gridPos": { 614 | "h": 2, 615 | "w": 2, 616 | "x": 10, 617 | "y": 1 618 | }, 619 | "id": 47, 620 | "interval": null, 621 | "links": [], 622 | "mappingType": 1, 623 | "mappingTypes": [ 624 | { 625 | "name": "value to text", 626 | "value": 1 627 | }, 628 | { 629 | "name": "range to text", 630 | "value": 2 631 | } 632 | ], 633 | "maxDataPoints": 100, 634 | "nullPointMode": "connected", 635 | "nullText": null, 636 | "options": {}, 637 | "postfix": "", 638 | "postfixFontSize": "50%", 639 | "prefix": "", 640 | "prefixFontSize": "50%", 641 | "rangeMaps": [ 642 | { 643 | "from": "null", 644 | "text": "N/A", 645 | "to": "null" 646 | } 647 | ], 648 | "sparkline": { 649 | "fillColor": "rgba(31, 118, 189, 0.18)", 650 | "full": false, 651 | "lineColor": "rgb(31, 120, 193)", 652 | "show": false 653 | }, 654 | "tableColumn": "", 655 | "targets": [ 656 | { 657 | "groupBy": [], 658 | "measurement": "sqlserver_server_properties", 659 | "orderByTime": "ASC", 660 | "policy": "default", 661 | "refId": "A", 662 | "resultFormat": "time_series", 663 | "select": [ 664 | [ 665 | { 666 | "params": [ 667 | "available_storage_mb" 668 | ], 669 | "type": "field" 670 | }, 671 | { 672 | "params": [], 673 | "type": "last" 674 | } 675 | ] 676 | ], 677 | "tags": [ 678 | { 679 | "key": "sql_instance", 680 | "operator": "=~", 681 | "value": "/^$InstanceName$/" 682 | } 683 | ] 684 | } 685 | ], 686 | "thresholds": "", 687 | "title": "Available Storage", 688 | "type": "singlestat", 689 | "valueFontSize": "50%", 690 | "valueMaps": [ 691 | { 692 | "op": "=", 693 | "text": "N/A", 694 | "value": "null" 695 | } 696 | ], 697 | "valueName": "current" 698 | }, 699 | { 700 | "cacheTimeout": null, 701 | "colorBackground": false, 702 | "colorValue": true, 703 | "colors": [ 704 | "#299c46", 705 | "rgba(237, 129, 40, 0.89)", 706 | "#d44a3a" 707 | ], 708 | "datasource": "InfluxDB", 709 | "format": "short", 710 | "gauge": { 711 | "maxValue": 100, 712 | "minValue": 0, 713 | "show": false, 714 | "thresholdLabels": false, 715 | "thresholdMarkers": true 716 | }, 717 | "gridPos": { 718 | "h": 2, 719 | "w": 2, 720 | "x": 12, 721 | "y": 1 722 | }, 723 | "id": 57, 724 | "interval": null, 725 | "links": [], 726 | "mappingType": 1, 727 | "mappingTypes": [ 728 | { 729 | "name": "value to text", 730 | "value": 1 731 | }, 732 | { 733 | "name": "range to text", 734 | "value": 2 735 | } 736 | ], 737 | "maxDataPoints": 100, 738 | "nullPointMode": "connected", 739 | "nullText": null, 740 | "options": {}, 741 | "postfix": "", 742 | "postfixFontSize": "50%", 743 | "prefix": "", 744 | "prefixFontSize": "50%", 745 | "rangeMaps": [ 746 | { 747 | "from": "null", 748 | "text": "N/A", 749 | "to": "null" 750 | } 751 | ], 752 | "sparkline": { 753 | "fillColor": "rgba(31, 118, 189, 0.18)", 754 | "full": false, 755 | "lineColor": "rgb(31, 120, 193)", 756 | "show": false 757 | }, 758 | "tableColumn": "", 759 | "targets": [ 760 | { 761 | "groupBy": [ 762 | { 763 | "params": [ 764 | "$__interval" 765 | ], 766 | "type": "time" 767 | }, 768 | { 769 | "params": [ 770 | "null" 771 | ], 772 | "type": "fill" 773 | } 774 | ], 775 | "measurement": "sqlserver_server_properties", 776 | "orderByTime": "ASC", 777 | "policy": "default", 778 | "refId": "A", 779 | "resultFormat": "time_series", 780 | "select": [ 781 | [ 782 | { 783 | "params": [ 784 | "db_online" 785 | ], 786 | "type": "field" 787 | }, 788 | { 789 | "params": [], 790 | "type": "last" 791 | } 792 | ] 793 | ], 794 | "tags": [ 795 | { 796 | "key": "sql_instance", 797 | "operator": "=~", 798 | "value": "/^$InstanceName$/" 799 | } 800 | ] 801 | } 802 | ], 803 | "thresholds": "", 804 | "title": "# Databases", 805 | "type": "singlestat", 806 | "valueFontSize": "50%", 807 | "valueMaps": [ 808 | { 809 | "op": "=", 810 | "text": "N/A", 811 | "value": "null" 812 | } 813 | ], 814 | "valueName": "current" 815 | }, 816 | { 817 | "cacheTimeout": null, 818 | "colorBackground": false, 819 | "colorValue": true, 820 | "colors": [ 821 | "#299c46", 822 | "rgba(237, 129, 40, 0.89)", 823 | "#d44a3a" 824 | ], 825 | "datasource": "InfluxDB", 826 | "format": "bytes", 827 | "gauge": { 828 | "maxValue": 100, 829 | "minValue": 0, 830 | "show": false, 831 | "thresholdLabels": false, 832 | "thresholdMarkers": true 833 | }, 834 | "gridPos": { 835 | "h": 2, 836 | "w": 2, 837 | "x": 0, 838 | "y": 3 839 | }, 840 | "id": 51, 841 | "interval": null, 842 | "links": [], 843 | "mappingType": 1, 844 | "mappingTypes": [ 845 | { 846 | "name": "value to text", 847 | "value": 1 848 | }, 849 | { 850 | "name": "range to text", 851 | "value": 2 852 | } 853 | ], 854 | "maxDataPoints": 100, 855 | "nullPointMode": "connected", 856 | "nullText": null, 857 | "options": {}, 858 | "postfix": "", 859 | "postfixFontSize": "50%", 860 | "prefix": "", 861 | "prefixFontSize": "50%", 862 | "rangeMaps": [ 863 | { 864 | "from": "null", 865 | "text": "N/A", 866 | "to": "null" 867 | } 868 | ], 869 | "sparkline": { 870 | "fillColor": "rgba(31, 118, 189, 0.18)", 871 | "full": false, 872 | "lineColor": "rgb(31, 120, 193)", 873 | "show": false 874 | }, 875 | "tableColumn": "", 876 | "targets": [ 877 | { 878 | "groupBy": [], 879 | "measurement": "sqlserver_instance_resource_governance", 880 | "orderByTime": "ASC", 881 | "policy": "default", 882 | "query": "SELECT last(\"total_storage_mb\") FROM \"sqlserver_server_properties\" WHERE (\"sql_instance\" =~ /^$InstanceName$/) AND $timeFilter", 883 | "rawQuery": false, 884 | "refId": "A", 885 | "resultFormat": "time_series", 886 | "select": [ 887 | [ 888 | { 889 | "params": [ 890 | "instance_max_log_rate" 891 | ], 892 | "type": "field" 893 | }, 894 | { 895 | "params": [], 896 | "type": "last" 897 | } 898 | ] 899 | ], 900 | "tags": [ 901 | { 902 | "key": "sql_instance", 903 | "operator": "=~", 904 | "value": "/^$InstanceName$/" 905 | } 906 | ] 907 | } 908 | ], 909 | "thresholds": "", 910 | "title": "Max Log Rate", 911 | "type": "singlestat", 912 | "valueFontSize": "50%", 913 | "valueMaps": [ 914 | { 915 | "op": "=", 916 | "text": "N/A", 917 | "value": "null" 918 | } 919 | ], 920 | "valueName": "current" 921 | }, 922 | { 923 | "cacheTimeout": null, 924 | "colorBackground": false, 925 | "colorValue": true, 926 | "colors": [ 927 | "#299c46", 928 | "rgba(237, 129, 40, 0.89)", 929 | "#d44a3a" 930 | ], 931 | "datasource": "InfluxDB", 932 | "format": "none", 933 | "gauge": { 934 | "maxValue": 100, 935 | "minValue": 0, 936 | "show": false, 937 | "thresholdLabels": false, 938 | "thresholdMarkers": true 939 | }, 940 | "gridPos": { 941 | "h": 2, 942 | "w": 2, 943 | "x": 2, 944 | "y": 3 945 | }, 946 | "id": 53, 947 | "interval": null, 948 | "links": [], 949 | "mappingType": 1, 950 | "mappingTypes": [ 951 | { 952 | "name": "value to text", 953 | "value": 1 954 | }, 955 | { 956 | "name": "range to text", 957 | "value": 2 958 | } 959 | ], 960 | "maxDataPoints": 100, 961 | "nullPointMode": "connected", 962 | "nullText": null, 963 | "options": {}, 964 | "postfix": "", 965 | "postfixFontSize": "50%", 966 | "prefix": "", 967 | "prefixFontSize": "50%", 968 | "rangeMaps": [ 969 | { 970 | "from": "null", 971 | "text": "N/A", 972 | "to": "null" 973 | } 974 | ], 975 | "sparkline": { 976 | "fillColor": "rgba(31, 118, 189, 0.18)", 977 | "full": false, 978 | "lineColor": "rgb(31, 120, 193)", 979 | "show": false 980 | }, 981 | "tableColumn": "", 982 | "targets": [ 983 | { 984 | "groupBy": [ 985 | { 986 | "params": [ 987 | "$interval" 988 | ], 989 | "type": "time" 990 | } 991 | ], 992 | "measurement": "sqlserver_instance_resource_governance", 993 | "orderByTime": "ASC", 994 | "policy": "default", 995 | "query": "SELECT last(\"total_storage_mb\") FROM \"sqlserver_server_properties\" WHERE (\"sql_instance\" =~ /^$InstanceName$/) AND $timeFilter", 996 | "rawQuery": false, 997 | "refId": "A", 998 | "resultFormat": "time_series", 999 | "select": [ 1000 | [ 1001 | { 1002 | "params": [ 1003 | "instance_max_worker_threads" 1004 | ], 1005 | "type": "field" 1006 | }, 1007 | { 1008 | "params": [], 1009 | "type": "last" 1010 | } 1011 | ] 1012 | ], 1013 | "tags": [ 1014 | { 1015 | "key": "sql_instance", 1016 | "operator": "=~", 1017 | "value": "/^$InstanceName$/" 1018 | } 1019 | ] 1020 | } 1021 | ], 1022 | "thresholds": "", 1023 | "timeFrom": null, 1024 | "title": "Max workers", 1025 | "type": "singlestat", 1026 | "valueFontSize": "50%", 1027 | "valueMaps": [ 1028 | { 1029 | "op": "=", 1030 | "text": "N/A", 1031 | "value": "null" 1032 | } 1033 | ], 1034 | "valueName": "current" 1035 | }, 1036 | { 1037 | "cacheTimeout": null, 1038 | "colorBackground": false, 1039 | "colorValue": true, 1040 | "colors": [ 1041 | "#299c46", 1042 | "rgba(237, 129, 40, 0.89)", 1043 | "#d44a3a" 1044 | ], 1045 | "datasource": "InfluxDB", 1046 | "format": "locale", 1047 | "gauge": { 1048 | "maxValue": 100, 1049 | "minValue": 0, 1050 | "show": false, 1051 | "thresholdLabels": false, 1052 | "thresholdMarkers": true 1053 | }, 1054 | "gridPos": { 1055 | "h": 2, 1056 | "w": 2, 1057 | "x": 4, 1058 | "y": 3 1059 | }, 1060 | "id": 55, 1061 | "interval": null, 1062 | "links": [], 1063 | "mappingType": 1, 1064 | "mappingTypes": [ 1065 | { 1066 | "name": "value to text", 1067 | "value": 1 1068 | }, 1069 | { 1070 | "name": "range to text", 1071 | "value": 2 1072 | } 1073 | ], 1074 | "maxDataPoints": 100, 1075 | "nullPointMode": "connected", 1076 | "nullText": null, 1077 | "options": {}, 1078 | "postfix": "", 1079 | "postfixFontSize": "50%", 1080 | "prefix": "", 1081 | "prefixFontSize": "50%", 1082 | "rangeMaps": [ 1083 | { 1084 | "from": "null", 1085 | "text": "N/A", 1086 | "to": "null" 1087 | } 1088 | ], 1089 | "sparkline": { 1090 | "fillColor": "rgba(31, 118, 189, 0.18)", 1091 | "full": false, 1092 | "lineColor": "rgb(31, 120, 193)", 1093 | "show": false 1094 | }, 1095 | "tableColumn": "", 1096 | "targets": [ 1097 | { 1098 | "groupBy": [], 1099 | "measurement": "sqlserver_instance_resource_governance", 1100 | "orderByTime": "ASC", 1101 | "policy": "default", 1102 | "query": "SELECT last(\"total_storage_mb\") FROM \"sqlserver_server_properties\" WHERE (\"sql_instance\" =~ /^$InstanceName$/) AND $timeFilter", 1103 | "rawQuery": false, 1104 | "refId": "A", 1105 | "resultFormat": "time_series", 1106 | "select": [ 1107 | [ 1108 | { 1109 | "params": [ 1110 | "vol_ext_xtore_iops" 1111 | ], 1112 | "type": "field" 1113 | }, 1114 | { 1115 | "params": [], 1116 | "type": "last" 1117 | } 1118 | ] 1119 | ], 1120 | "tags": [ 1121 | { 1122 | "key": "sql_instance", 1123 | "operator": "=~", 1124 | "value": "/^$InstanceName$/" 1125 | } 1126 | ] 1127 | } 1128 | ], 1129 | "thresholds": "", 1130 | "title": "Xstore IOPS", 1131 | "type": "singlestat", 1132 | "valueFontSize": "50%", 1133 | "valueMaps": [ 1134 | { 1135 | "op": "=", 1136 | "text": "N/A", 1137 | "value": "null" 1138 | } 1139 | ], 1140 | "valueName": "current" 1141 | }, 1142 | { 1143 | "collapsed": false, 1144 | "gridPos": { 1145 | "h": 1, 1146 | "w": 24, 1147 | "x": 0, 1148 | "y": 5 1149 | }, 1150 | "id": 2, 1151 | "panels": [], 1152 | "title": "Database IO Stats", 1153 | "type": "row" 1154 | }, 1155 | { 1156 | "aliasColors": {}, 1157 | "bars": false, 1158 | "dashLength": 10, 1159 | "dashes": false, 1160 | "datasource": "InfluxDB", 1161 | "fill": 1, 1162 | "gridPos": { 1163 | "h": 9, 1164 | "w": 12, 1165 | "x": 0, 1166 | "y": 6 1167 | }, 1168 | "id": 12, 1169 | "legend": { 1170 | "alignAsTable": true, 1171 | "avg": true, 1172 | "current": false, 1173 | "hideEmpty": true, 1174 | "hideZero": true, 1175 | "max": false, 1176 | "min": false, 1177 | "rightSide": true, 1178 | "show": true, 1179 | "sort": "avg", 1180 | "sortDesc": true, 1181 | "total": false, 1182 | "values": true 1183 | }, 1184 | "lines": true, 1185 | "linewidth": 1, 1186 | "links": [], 1187 | "nullPointMode": "null", 1188 | "options": {}, 1189 | "percentage": false, 1190 | "pointradius": 5, 1191 | "points": false, 1192 | "renderer": "flot", 1193 | "seriesOverrides": [], 1194 | "spaceLength": 10, 1195 | "stack": false, 1196 | "steppedLine": false, 1197 | "targets": [ 1198 | { 1199 | "alias": "$tag_database_name | $tag_logical_filename", 1200 | "groupBy": [ 1201 | { 1202 | "params": [ 1203 | "database_name" 1204 | ], 1205 | "type": "tag" 1206 | }, 1207 | { 1208 | "params": [ 1209 | "logical_filename" 1210 | ], 1211 | "type": "tag" 1212 | } 1213 | ], 1214 | "measurement": "sqlserver_database_io", 1215 | "orderByTime": "ASC", 1216 | "policy": "default", 1217 | "refId": "A", 1218 | "resultFormat": "time_series", 1219 | "select": [ 1220 | [ 1221 | { 1222 | "params": [ 1223 | "read_bytes" 1224 | ], 1225 | "type": "field" 1226 | }, 1227 | { 1228 | "params": [ 1229 | "1s" 1230 | ], 1231 | "type": "non_negative_derivative" 1232 | } 1233 | ] 1234 | ], 1235 | "tags": [ 1236 | { 1237 | "key": "sql_instance", 1238 | "operator": "=~", 1239 | "value": "/^$InstanceName$/" 1240 | } 1241 | ] 1242 | } 1243 | ], 1244 | "thresholds": [], 1245 | "timeFrom": null, 1246 | "timeRegions": [], 1247 | "timeShift": null, 1248 | "title": "Read Bytes/sec", 1249 | "tooltip": { 1250 | "shared": true, 1251 | "sort": 0, 1252 | "value_type": "individual" 1253 | }, 1254 | "type": "graph", 1255 | "xaxis": { 1256 | "buckets": null, 1257 | "mode": "time", 1258 | "name": null, 1259 | "show": true, 1260 | "values": [] 1261 | }, 1262 | "yaxes": [ 1263 | { 1264 | "format": "bytes", 1265 | "label": null, 1266 | "logBase": 1, 1267 | "max": null, 1268 | "min": null, 1269 | "show": true 1270 | }, 1271 | { 1272 | "format": "short", 1273 | "label": null, 1274 | "logBase": 1, 1275 | "max": null, 1276 | "min": null, 1277 | "show": true 1278 | } 1279 | ], 1280 | "yaxis": { 1281 | "align": false, 1282 | "alignLevel": null 1283 | } 1284 | }, 1285 | { 1286 | "aliasColors": {}, 1287 | "bars": false, 1288 | "dashLength": 10, 1289 | "dashes": false, 1290 | "datasource": "InfluxDB", 1291 | "fill": 1, 1292 | "gridPos": { 1293 | "h": 9, 1294 | "w": 12, 1295 | "x": 12, 1296 | "y": 6 1297 | }, 1298 | "id": 14, 1299 | "legend": { 1300 | "alignAsTable": true, 1301 | "avg": true, 1302 | "current": false, 1303 | "hideEmpty": true, 1304 | "hideZero": true, 1305 | "max": false, 1306 | "min": false, 1307 | "rightSide": true, 1308 | "show": true, 1309 | "sort": "avg", 1310 | "sortDesc": true, 1311 | "total": false, 1312 | "values": true 1313 | }, 1314 | "lines": true, 1315 | "linewidth": 1, 1316 | "links": [], 1317 | "nullPointMode": "null", 1318 | "options": {}, 1319 | "percentage": false, 1320 | "pointradius": 5, 1321 | "points": false, 1322 | "renderer": "flot", 1323 | "seriesOverrides": [], 1324 | "spaceLength": 10, 1325 | "stack": false, 1326 | "steppedLine": false, 1327 | "targets": [ 1328 | { 1329 | "alias": "$tag_database_name | $tag_logical_filename", 1330 | "groupBy": [ 1331 | { 1332 | "params": [ 1333 | "database_name" 1334 | ], 1335 | "type": "tag" 1336 | }, 1337 | { 1338 | "params": [ 1339 | "logical_filename" 1340 | ], 1341 | "type": "tag" 1342 | } 1343 | ], 1344 | "measurement": "sqlserver_database_io", 1345 | "orderByTime": "ASC", 1346 | "policy": "default", 1347 | "refId": "A", 1348 | "resultFormat": "time_series", 1349 | "select": [ 1350 | [ 1351 | { 1352 | "params": [ 1353 | "write_bytes" 1354 | ], 1355 | "type": "field" 1356 | }, 1357 | { 1358 | "params": [ 1359 | "1s" 1360 | ], 1361 | "type": "non_negative_derivative" 1362 | } 1363 | ] 1364 | ], 1365 | "tags": [ 1366 | { 1367 | "key": "sql_instance", 1368 | "operator": "=~", 1369 | "value": "/^$InstanceName$/" 1370 | } 1371 | ] 1372 | } 1373 | ], 1374 | "thresholds": [], 1375 | "timeFrom": null, 1376 | "timeRegions": [], 1377 | "timeShift": null, 1378 | "title": "Write Bytes/sec", 1379 | "tooltip": { 1380 | "shared": true, 1381 | "sort": 0, 1382 | "value_type": "individual" 1383 | }, 1384 | "type": "graph", 1385 | "xaxis": { 1386 | "buckets": null, 1387 | "mode": "time", 1388 | "name": null, 1389 | "show": true, 1390 | "values": [] 1391 | }, 1392 | "yaxes": [ 1393 | { 1394 | "format": "bytes", 1395 | "label": null, 1396 | "logBase": 1, 1397 | "max": null, 1398 | "min": null, 1399 | "show": true 1400 | }, 1401 | { 1402 | "format": "short", 1403 | "label": null, 1404 | "logBase": 1, 1405 | "max": null, 1406 | "min": null, 1407 | "show": true 1408 | } 1409 | ], 1410 | "yaxis": { 1411 | "align": false, 1412 | "alignLevel": null 1413 | } 1414 | }, 1415 | { 1416 | "aliasColors": {}, 1417 | "bars": false, 1418 | "dashLength": 10, 1419 | "dashes": false, 1420 | "datasource": "InfluxDB", 1421 | "fill": 1, 1422 | "gridPos": { 1423 | "h": 9, 1424 | "w": 12, 1425 | "x": 0, 1426 | "y": 15 1427 | }, 1428 | "id": 18, 1429 | "legend": { 1430 | "alignAsTable": true, 1431 | "avg": true, 1432 | "current": false, 1433 | "hideEmpty": true, 1434 | "hideZero": true, 1435 | "max": false, 1436 | "min": false, 1437 | "rightSide": true, 1438 | "show": true, 1439 | "sort": "avg", 1440 | "sortDesc": true, 1441 | "total": false, 1442 | "values": true 1443 | }, 1444 | "lines": true, 1445 | "linewidth": 1, 1446 | "links": [], 1447 | "nullPointMode": "null", 1448 | "options": {}, 1449 | "percentage": false, 1450 | "pointradius": 5, 1451 | "points": false, 1452 | "renderer": "flot", 1453 | "seriesOverrides": [], 1454 | "spaceLength": 10, 1455 | "stack": false, 1456 | "steppedLine": false, 1457 | "targets": [ 1458 | { 1459 | "alias": "$tag_database_name | $tag_logical_filename", 1460 | "groupBy": [ 1461 | { 1462 | "params": [ 1463 | "database_name" 1464 | ], 1465 | "type": "tag" 1466 | }, 1467 | { 1468 | "params": [ 1469 | "logical_filename" 1470 | ], 1471 | "type": "tag" 1472 | } 1473 | ], 1474 | "measurement": "sqlserver_database_io", 1475 | "orderByTime": "ASC", 1476 | "policy": "default", 1477 | "query": "SELECT non_negative_derivative(\"read_latency_ms\", 1s) / non_negative_derivative(\"reads\", 1s) FROM \"sqlserver_database_io\" WHERE (\"sql_instance\" =~ /^$InstanceName$/) AND $timeFilter GROUP BY \"database_name\", \"logical_filename\"", 1478 | "rawQuery": true, 1479 | "refId": "A", 1480 | "resultFormat": "time_series", 1481 | "select": [ 1482 | [ 1483 | { 1484 | "params": [ 1485 | "read_latency_ms" 1486 | ], 1487 | "type": "field" 1488 | }, 1489 | { 1490 | "params": [ 1491 | "1s" 1492 | ], 1493 | "type": "non_negative_derivative" 1494 | } 1495 | ] 1496 | ], 1497 | "tags": [ 1498 | { 1499 | "key": "sql_instance", 1500 | "operator": "=~", 1501 | "value": "/^$InstanceName$/" 1502 | } 1503 | ] 1504 | } 1505 | ], 1506 | "thresholds": [], 1507 | "timeFrom": null, 1508 | "timeRegions": [], 1509 | "timeShift": null, 1510 | "title": "Read Latency", 1511 | "tooltip": { 1512 | "shared": true, 1513 | "sort": 0, 1514 | "value_type": "individual" 1515 | }, 1516 | "type": "graph", 1517 | "xaxis": { 1518 | "buckets": null, 1519 | "mode": "time", 1520 | "name": null, 1521 | "show": true, 1522 | "values": [] 1523 | }, 1524 | "yaxes": [ 1525 | { 1526 | "format": "ms", 1527 | "label": null, 1528 | "logBase": 1, 1529 | "max": null, 1530 | "min": null, 1531 | "show": true 1532 | }, 1533 | { 1534 | "format": "short", 1535 | "label": null, 1536 | "logBase": 1, 1537 | "max": null, 1538 | "min": null, 1539 | "show": true 1540 | } 1541 | ], 1542 | "yaxis": { 1543 | "align": false, 1544 | "alignLevel": null 1545 | } 1546 | }, 1547 | { 1548 | "aliasColors": {}, 1549 | "bars": false, 1550 | "dashLength": 10, 1551 | "dashes": false, 1552 | "datasource": "InfluxDB", 1553 | "fill": 1, 1554 | "gridPos": { 1555 | "h": 9, 1556 | "w": 12, 1557 | "x": 12, 1558 | "y": 15 1559 | }, 1560 | "id": 19, 1561 | "legend": { 1562 | "alignAsTable": true, 1563 | "avg": true, 1564 | "current": false, 1565 | "hideEmpty": true, 1566 | "hideZero": true, 1567 | "max": false, 1568 | "min": false, 1569 | "rightSide": true, 1570 | "show": true, 1571 | "sort": "avg", 1572 | "sortDesc": true, 1573 | "total": false, 1574 | "values": true 1575 | }, 1576 | "lines": true, 1577 | "linewidth": 1, 1578 | "links": [], 1579 | "nullPointMode": "null", 1580 | "options": {}, 1581 | "percentage": false, 1582 | "pointradius": 5, 1583 | "points": false, 1584 | "renderer": "flot", 1585 | "seriesOverrides": [], 1586 | "spaceLength": 10, 1587 | "stack": false, 1588 | "steppedLine": false, 1589 | "targets": [ 1590 | { 1591 | "alias": "$tag_database_name | $tag_logical_filename", 1592 | "groupBy": [ 1593 | { 1594 | "params": [ 1595 | "database_name" 1596 | ], 1597 | "type": "tag" 1598 | }, 1599 | { 1600 | "params": [ 1601 | "logical_filename" 1602 | ], 1603 | "type": "tag" 1604 | } 1605 | ], 1606 | "measurement": "sqlserver_database_io", 1607 | "orderByTime": "ASC", 1608 | "policy": "default", 1609 | "query": "SELECT non_negative_derivative(\"write_latency_ms\", 1s)/non_negative_derivative(\"writes\", 1s) FROM \"sqlserver_database_io\" WHERE (\"sql_instance\" =~ /^$InstanceName$/) AND $timeFilter GROUP BY \"database_name\", \"logical_filename\"", 1610 | "rawQuery": true, 1611 | "refId": "A", 1612 | "resultFormat": "time_series", 1613 | "select": [ 1614 | [ 1615 | { 1616 | "params": [ 1617 | "write_latency_ms" 1618 | ], 1619 | "type": "field" 1620 | }, 1621 | { 1622 | "params": [ 1623 | "1s" 1624 | ], 1625 | "type": "non_negative_derivative" 1626 | } 1627 | ] 1628 | ], 1629 | "tags": [ 1630 | { 1631 | "key": "sql_instance", 1632 | "operator": "=~", 1633 | "value": "/^$InstanceName$/" 1634 | } 1635 | ] 1636 | } 1637 | ], 1638 | "thresholds": [], 1639 | "timeFrom": null, 1640 | "timeRegions": [], 1641 | "timeShift": null, 1642 | "title": "Write Latency", 1643 | "tooltip": { 1644 | "shared": true, 1645 | "sort": 0, 1646 | "value_type": "individual" 1647 | }, 1648 | "type": "graph", 1649 | "xaxis": { 1650 | "buckets": null, 1651 | "mode": "time", 1652 | "name": null, 1653 | "show": true, 1654 | "values": [] 1655 | }, 1656 | "yaxes": [ 1657 | { 1658 | "format": "ms", 1659 | "label": null, 1660 | "logBase": 1, 1661 | "max": null, 1662 | "min": null, 1663 | "show": true 1664 | }, 1665 | { 1666 | "format": "short", 1667 | "label": null, 1668 | "logBase": 1, 1669 | "max": null, 1670 | "min": null, 1671 | "show": true 1672 | } 1673 | ], 1674 | "yaxis": { 1675 | "align": false, 1676 | "alignLevel": null 1677 | } 1678 | }, 1679 | { 1680 | "aliasColors": {}, 1681 | "bars": false, 1682 | "dashLength": 10, 1683 | "dashes": false, 1684 | "datasource": "InfluxDB", 1685 | "fill": 1, 1686 | "gridPos": { 1687 | "h": 9, 1688 | "w": 12, 1689 | "x": 0, 1690 | "y": 24 1691 | }, 1692 | "id": 16, 1693 | "legend": { 1694 | "alignAsTable": true, 1695 | "avg": true, 1696 | "current": false, 1697 | "max": false, 1698 | "min": false, 1699 | "rightSide": true, 1700 | "show": true, 1701 | "sort": "avg", 1702 | "sortDesc": true, 1703 | "total": false, 1704 | "values": true 1705 | }, 1706 | "lines": true, 1707 | "linewidth": 1, 1708 | "links": [], 1709 | "nullPointMode": "null", 1710 | "options": {}, 1711 | "percentage": false, 1712 | "pointradius": 5, 1713 | "points": false, 1714 | "renderer": "flot", 1715 | "seriesOverrides": [], 1716 | "spaceLength": 10, 1717 | "stack": false, 1718 | "steppedLine": false, 1719 | "targets": [ 1720 | { 1721 | "alias": "$tag_database_name | $tag_logical_filename", 1722 | "groupBy": [ 1723 | { 1724 | "params": [ 1725 | "database_name" 1726 | ], 1727 | "type": "tag" 1728 | }, 1729 | { 1730 | "params": [ 1731 | "logical_filename" 1732 | ], 1733 | "type": "tag" 1734 | } 1735 | ], 1736 | "measurement": "sqlserver_database_io", 1737 | "orderByTime": "ASC", 1738 | "policy": "default", 1739 | "refId": "A", 1740 | "resultFormat": "time_series", 1741 | "select": [ 1742 | [ 1743 | { 1744 | "params": [ 1745 | "reads" 1746 | ], 1747 | "type": "field" 1748 | }, 1749 | { 1750 | "params": [ 1751 | "1s" 1752 | ], 1753 | "type": "non_negative_derivative" 1754 | } 1755 | ] 1756 | ], 1757 | "tags": [ 1758 | { 1759 | "key": "sql_instance", 1760 | "operator": "=~", 1761 | "value": "/^$InstanceName$/" 1762 | } 1763 | ] 1764 | } 1765 | ], 1766 | "thresholds": [], 1767 | "timeFrom": null, 1768 | "timeRegions": [], 1769 | "timeShift": null, 1770 | "title": "Reads/sec", 1771 | "tooltip": { 1772 | "shared": true, 1773 | "sort": 0, 1774 | "value_type": "individual" 1775 | }, 1776 | "type": "graph", 1777 | "xaxis": { 1778 | "buckets": null, 1779 | "mode": "time", 1780 | "name": null, 1781 | "show": true, 1782 | "values": [] 1783 | }, 1784 | "yaxes": [ 1785 | { 1786 | "format": "short", 1787 | "label": null, 1788 | "logBase": 1, 1789 | "max": null, 1790 | "min": null, 1791 | "show": true 1792 | }, 1793 | { 1794 | "format": "short", 1795 | "label": null, 1796 | "logBase": 1, 1797 | "max": null, 1798 | "min": null, 1799 | "show": true 1800 | } 1801 | ], 1802 | "yaxis": { 1803 | "align": false, 1804 | "alignLevel": null 1805 | } 1806 | }, 1807 | { 1808 | "aliasColors": {}, 1809 | "bars": false, 1810 | "dashLength": 10, 1811 | "dashes": false, 1812 | "datasource": "InfluxDB", 1813 | "fill": 1, 1814 | "gridPos": { 1815 | "h": 9, 1816 | "w": 12, 1817 | "x": 12, 1818 | "y": 24 1819 | }, 1820 | "id": 17, 1821 | "legend": { 1822 | "alignAsTable": true, 1823 | "avg": true, 1824 | "current": false, 1825 | "hideEmpty": true, 1826 | "hideZero": true, 1827 | "max": false, 1828 | "min": false, 1829 | "rightSide": true, 1830 | "show": true, 1831 | "sort": "avg", 1832 | "sortDesc": true, 1833 | "total": false, 1834 | "values": true 1835 | }, 1836 | "lines": true, 1837 | "linewidth": 1, 1838 | "links": [], 1839 | "nullPointMode": "null", 1840 | "options": {}, 1841 | "percentage": false, 1842 | "pointradius": 5, 1843 | "points": false, 1844 | "renderer": "flot", 1845 | "seriesOverrides": [], 1846 | "spaceLength": 10, 1847 | "stack": false, 1848 | "steppedLine": false, 1849 | "targets": [ 1850 | { 1851 | "alias": "$tag_database_name | $tag_logical_filename", 1852 | "groupBy": [ 1853 | { 1854 | "params": [ 1855 | "database_name" 1856 | ], 1857 | "type": "tag" 1858 | }, 1859 | { 1860 | "params": [ 1861 | "logical_filename" 1862 | ], 1863 | "type": "tag" 1864 | } 1865 | ], 1866 | "measurement": "sqlserver_database_io", 1867 | "orderByTime": "ASC", 1868 | "policy": "default", 1869 | "query": "SELECT non_negative_derivative(\"writes\", 1s) FROM \"sqlserver_database_io\" WHERE (\"sql_instance\" =~ /^$InstanceName$/) AND $timeFilter GROUP BY \"database_name\", \"logical_filename\"", 1870 | "rawQuery": true, 1871 | "refId": "A", 1872 | "resultFormat": "time_series", 1873 | "select": [ 1874 | [ 1875 | { 1876 | "params": [ 1877 | "writes" 1878 | ], 1879 | "type": "field" 1880 | }, 1881 | { 1882 | "params": [ 1883 | "1s" 1884 | ], 1885 | "type": "non_negative_derivative" 1886 | } 1887 | ] 1888 | ], 1889 | "tags": [ 1890 | { 1891 | "key": "sql_instance", 1892 | "operator": "=~", 1893 | "value": "/^$InstanceName$/" 1894 | } 1895 | ] 1896 | } 1897 | ], 1898 | "thresholds": [], 1899 | "timeFrom": null, 1900 | "timeRegions": [], 1901 | "timeShift": null, 1902 | "title": "Writes/sec", 1903 | "tooltip": { 1904 | "shared": true, 1905 | "sort": 0, 1906 | "value_type": "individual" 1907 | }, 1908 | "type": "graph", 1909 | "xaxis": { 1910 | "buckets": null, 1911 | "mode": "time", 1912 | "name": null, 1913 | "show": true, 1914 | "values": [] 1915 | }, 1916 | "yaxes": [ 1917 | { 1918 | "format": "short", 1919 | "label": null, 1920 | "logBase": 1, 1921 | "max": null, 1922 | "min": null, 1923 | "show": true 1924 | }, 1925 | { 1926 | "format": "short", 1927 | "label": null, 1928 | "logBase": 1, 1929 | "max": null, 1930 | "min": null, 1931 | "show": true 1932 | } 1933 | ], 1934 | "yaxis": { 1935 | "align": false, 1936 | "alignLevel": null 1937 | } 1938 | }, 1939 | { 1940 | "collapsed": true, 1941 | "gridPos": { 1942 | "h": 1, 1943 | "w": 24, 1944 | "x": 0, 1945 | "y": 33 1946 | }, 1947 | "id": 23, 1948 | "panels": [], 1949 | "title": "Database File Size", 1950 | "type": "row" 1951 | }, 1952 | { 1953 | "aliasColors": {}, 1954 | "bars": false, 1955 | "dashLength": 10, 1956 | "dashes": false, 1957 | "datasource": "InfluxDB", 1958 | "fill": 1, 1959 | "gridPos": { 1960 | "h": 8, 1961 | "w": 12, 1962 | "x": 0, 1963 | "y": 34 1964 | }, 1965 | "id": 25, 1966 | "legend": { 1967 | "alignAsTable": true, 1968 | "avg": false, 1969 | "current": true, 1970 | "hideEmpty": true, 1971 | "hideZero": true, 1972 | "max": false, 1973 | "min": false, 1974 | "rightSide": true, 1975 | "show": true, 1976 | "sort": "current", 1977 | "sortDesc": true, 1978 | "total": false, 1979 | "values": true 1980 | }, 1981 | "lines": true, 1982 | "linewidth": 1, 1983 | "links": [], 1984 | "nullPointMode": "null", 1985 | "options": {}, 1986 | "percentage": false, 1987 | "pointradius": 5, 1988 | "points": false, 1989 | "renderer": "flot", 1990 | "seriesOverrides": [], 1991 | "spaceLength": 10, 1992 | "stack": false, 1993 | "steppedLine": false, 1994 | "targets": [ 1995 | { 1996 | "alias": "$tag_instance", 1997 | "groupBy": [ 1998 | { 1999 | "params": [ 2000 | "instance" 2001 | ], 2002 | "type": "tag" 2003 | } 2004 | ], 2005 | "measurement": "sqlserver_performance", 2006 | "orderByTime": "ASC", 2007 | "policy": "default", 2008 | "refId": "A", 2009 | "resultFormat": "time_series", 2010 | "select": [ 2011 | [ 2012 | { 2013 | "params": [ 2014 | "value" 2015 | ], 2016 | "type": "field" 2017 | } 2018 | ] 2019 | ], 2020 | "tags": [ 2021 | { 2022 | "key": "sql_instance", 2023 | "operator": "=~", 2024 | "value": "/^$InstanceName$/" 2025 | }, 2026 | { 2027 | "condition": "AND", 2028 | "key": "counter", 2029 | "operator": "=", 2030 | "value": "Data File(s) Size (KB)" 2031 | } 2032 | ] 2033 | } 2034 | ], 2035 | "thresholds": [], 2036 | "timeFrom": null, 2037 | "timeRegions": [], 2038 | "timeShift": null, 2039 | "title": "Data File Size", 2040 | "tooltip": { 2041 | "shared": true, 2042 | "sort": 2, 2043 | "value_type": "individual" 2044 | }, 2045 | "type": "graph", 2046 | "xaxis": { 2047 | "buckets": null, 2048 | "mode": "time", 2049 | "name": null, 2050 | "show": true, 2051 | "values": [] 2052 | }, 2053 | "yaxes": [ 2054 | { 2055 | "decimals": 3, 2056 | "format": "kbytes", 2057 | "label": null, 2058 | "logBase": 1, 2059 | "max": null, 2060 | "min": null, 2061 | "show": true 2062 | }, 2063 | { 2064 | "format": "short", 2065 | "label": null, 2066 | "logBase": 1, 2067 | "max": null, 2068 | "min": null, 2069 | "show": true 2070 | } 2071 | ], 2072 | "yaxis": { 2073 | "align": false, 2074 | "alignLevel": null 2075 | } 2076 | }, 2077 | { 2078 | "aliasColors": {}, 2079 | "bars": false, 2080 | "dashLength": 10, 2081 | "dashes": false, 2082 | "datasource": "InfluxDB", 2083 | "fill": 1, 2084 | "gridPos": { 2085 | "h": 8, 2086 | "w": 12, 2087 | "x": 12, 2088 | "y": 34 2089 | }, 2090 | "id": 27, 2091 | "legend": { 2092 | "alignAsTable": true, 2093 | "avg": false, 2094 | "current": true, 2095 | "max": false, 2096 | "min": false, 2097 | "rightSide": true, 2098 | "show": true, 2099 | "sort": "current", 2100 | "sortDesc": true, 2101 | "total": false, 2102 | "values": true 2103 | }, 2104 | "lines": true, 2105 | "linewidth": 1, 2106 | "links": [], 2107 | "nullPointMode": "null", 2108 | "options": {}, 2109 | "percentage": false, 2110 | "pointradius": 5, 2111 | "points": false, 2112 | "renderer": "flot", 2113 | "seriesOverrides": [], 2114 | "spaceLength": 10, 2115 | "stack": false, 2116 | "steppedLine": false, 2117 | "targets": [ 2118 | { 2119 | "alias": "$tag_instance", 2120 | "groupBy": [ 2121 | { 2122 | "params": [ 2123 | "instance" 2124 | ], 2125 | "type": "tag" 2126 | } 2127 | ], 2128 | "measurement": "sqlserver_performance", 2129 | "orderByTime": "ASC", 2130 | "policy": "default", 2131 | "refId": "A", 2132 | "resultFormat": "time_series", 2133 | "select": [ 2134 | [ 2135 | { 2136 | "params": [ 2137 | "value" 2138 | ], 2139 | "type": "field" 2140 | } 2141 | ] 2142 | ], 2143 | "tags": [ 2144 | { 2145 | "key": "sql_instance", 2146 | "operator": "=~", 2147 | "value": "/^$InstanceName$/" 2148 | }, 2149 | { 2150 | "condition": "AND", 2151 | "key": "counter", 2152 | "operator": "=", 2153 | "value": "Log File(s) Used Size (KB)" 2154 | } 2155 | ] 2156 | } 2157 | ], 2158 | "thresholds": [], 2159 | "timeFrom": null, 2160 | "timeRegions": [], 2161 | "timeShift": null, 2162 | "title": "Log File Used", 2163 | "tooltip": { 2164 | "shared": true, 2165 | "sort": 2, 2166 | "value_type": "individual" 2167 | }, 2168 | "type": "graph", 2169 | "xaxis": { 2170 | "buckets": null, 2171 | "mode": "time", 2172 | "name": null, 2173 | "show": true, 2174 | "values": [] 2175 | }, 2176 | "yaxes": [ 2177 | { 2178 | "decimals": 3, 2179 | "format": "kbytes", 2180 | "label": null, 2181 | "logBase": 1, 2182 | "max": null, 2183 | "min": null, 2184 | "show": true 2185 | }, 2186 | { 2187 | "format": "short", 2188 | "label": null, 2189 | "logBase": 1, 2190 | "max": null, 2191 | "min": null, 2192 | "show": true 2193 | } 2194 | ], 2195 | "yaxis": { 2196 | "align": false, 2197 | "alignLevel": null 2198 | } 2199 | }, 2200 | { 2201 | "aliasColors": {}, 2202 | "bars": false, 2203 | "dashLength": 10, 2204 | "dashes": false, 2205 | "datasource": "InfluxDB", 2206 | "fill": 1, 2207 | "gridPos": { 2208 | "h": 8, 2209 | "w": 12, 2210 | "x": 0, 2211 | "y": 42 2212 | }, 2213 | "id": 26, 2214 | "legend": { 2215 | "alignAsTable": true, 2216 | "avg": false, 2217 | "current": true, 2218 | "max": false, 2219 | "min": false, 2220 | "rightSide": true, 2221 | "show": true, 2222 | "sort": "current", 2223 | "sortDesc": true, 2224 | "total": false, 2225 | "values": true 2226 | }, 2227 | "lines": true, 2228 | "linewidth": 1, 2229 | "links": [], 2230 | "nullPointMode": "null", 2231 | "options": {}, 2232 | "percentage": false, 2233 | "pointradius": 5, 2234 | "points": false, 2235 | "renderer": "flot", 2236 | "seriesOverrides": [], 2237 | "spaceLength": 10, 2238 | "stack": false, 2239 | "steppedLine": false, 2240 | "targets": [ 2241 | { 2242 | "alias": "$tag_instance", 2243 | "groupBy": [ 2244 | { 2245 | "params": [ 2246 | "instance" 2247 | ], 2248 | "type": "tag" 2249 | } 2250 | ], 2251 | "measurement": "sqlserver_performance", 2252 | "orderByTime": "ASC", 2253 | "policy": "default", 2254 | "refId": "A", 2255 | "resultFormat": "time_series", 2256 | "select": [ 2257 | [ 2258 | { 2259 | "params": [ 2260 | "value" 2261 | ], 2262 | "type": "field" 2263 | } 2264 | ] 2265 | ], 2266 | "tags": [ 2267 | { 2268 | "key": "sql_instance", 2269 | "operator": "=~", 2270 | "value": "/^$InstanceName$/" 2271 | }, 2272 | { 2273 | "condition": "AND", 2274 | "key": "counter", 2275 | "operator": "=", 2276 | "value": "Log File(s) Size (KB)" 2277 | } 2278 | ] 2279 | } 2280 | ], 2281 | "thresholds": [], 2282 | "timeFrom": null, 2283 | "timeRegions": [], 2284 | "timeShift": null, 2285 | "title": "Log File Size", 2286 | "tooltip": { 2287 | "shared": true, 2288 | "sort": 2, 2289 | "value_type": "individual" 2290 | }, 2291 | "type": "graph", 2292 | "xaxis": { 2293 | "buckets": null, 2294 | "mode": "time", 2295 | "name": null, 2296 | "show": true, 2297 | "values": [] 2298 | }, 2299 | "yaxes": [ 2300 | { 2301 | "decimals": 3, 2302 | "format": "kbytes", 2303 | "label": null, 2304 | "logBase": 1, 2305 | "max": null, 2306 | "min": null, 2307 | "show": true 2308 | }, 2309 | { 2310 | "format": "short", 2311 | "label": null, 2312 | "logBase": 1, 2313 | "max": null, 2314 | "min": null, 2315 | "show": true 2316 | } 2317 | ], 2318 | "yaxis": { 2319 | "align": false, 2320 | "alignLevel": null 2321 | } 2322 | } 2323 | ], 2324 | "refresh": "10s", 2325 | "schemaVersion": 18, 2326 | "style": "dark", 2327 | "tags": [ 2328 | "SQLMI" 2329 | ], 2330 | "templating": { 2331 | "list": [ 2332 | { 2333 | "allValue": null, 2334 | "current": { 2335 | "text": "sqlperfmi.3a7f4f11ae66.database.windows.net", 2336 | "value": "sqlperfmi.3a7f4f11ae66.database.windows.net" 2337 | }, 2338 | "datasource": "InfluxDB", 2339 | "definition": " select sql_instance from (select \"sql_instance\", LAST(\"engine_edition\") from \"sqlserver_server_properties\" where \"engine_edition\" = 8 and $timeFilter GROUP BY sql_instance)", 2340 | "hide": 0, 2341 | "includeAll": false, 2342 | "label": "InstanceName", 2343 | "multi": false, 2344 | "name": "InstanceName", 2345 | "options": [], 2346 | "query": " select sql_instance from (select \"sql_instance\", LAST(\"engine_edition\") from \"sqlserver_server_properties\" where \"engine_edition\" = 8 and $timeFilter GROUP BY sql_instance)", 2347 | "refresh": 2, 2348 | "regex": "", 2349 | "skipUrlSync": false, 2350 | "sort": 0, 2351 | "tagValuesQuery": "", 2352 | "tags": [], 2353 | "tagsQuery": "", 2354 | "type": "query", 2355 | "useTags": false 2356 | } 2357 | ] 2358 | }, 2359 | "time": { 2360 | "from": "now-15m", 2361 | "to": "now" 2362 | }, 2363 | "timepicker": { 2364 | "refresh_intervals": [ 2365 | "5s", 2366 | "10s", 2367 | "30s", 2368 | "1m", 2369 | "5m", 2370 | "15m", 2371 | "30m", 2372 | "1h", 2373 | "2h", 2374 | "1d" 2375 | ], 2376 | "time_options": [ 2377 | "5m", 2378 | "15m", 2379 | "1h", 2380 | "6h", 2381 | "12h", 2382 | "24h", 2383 | "2d", 2384 | "7d", 2385 | "30d" 2386 | ] 2387 | }, 2388 | "timezone": "", 2389 | "title": "SQL Managed Instance Storage", 2390 | "uid": "sqlmistorage", 2391 | "version": 11 2392 | } -------------------------------------------------------------------------------- /grafana/rungrafana.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #We use the grafana image that Grafana Labs provides http://docs.grafana.org/installation/docker/ 4 | # If you wish to modify the port that Grafana runs on, you can do that here. 5 | GRAFANA_HOST_DIRECTORY="/data/grafana" 6 | 7 | sudo docker run --user root --detach -p 3000:3000 --net=host --restart=always \ 8 | -v $GRAFANA_HOST_DIRECTORY:/var/lib/grafana \ 9 | -e "GF_INSTALL_PLUGINS=grafana-piechart-panel,savantly-heatmap-panel" \ 10 | --name grafana grafana/grafana 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /influxdb/runinfluxdb.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Make sure this folder exists on the host.Ideally it is a volume reserved for influxdb 3 | # This directory from the host gets passed through to the docker container. 4 | INFLUXDB_HOST_DIRECTORY="/data/influxdb" 5 | 6 | 7 | sudo docker run --detach --net=host \ 8 | -v $INFLUXDB_HOST_DIRECTORY:/var/lib/influxdb:rw \ 9 | --hostname influxdb \ 10 | --restart=always \ 11 | -p 8086:8086 \ 12 | --name influxdb influxdb:1.8 13 | 14 | -------------------------------------------------------------------------------- /monitoringsetup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Pass argument "nightly" to use nightly build instead of release build. 4 | telegrafbuild=$1 5 | 6 | if [[ -z $telegrafbuild ]]; then 7 | releasebuild=1; 8 | else 9 | if [[ $telegrafbuild -eq "nightly" ]]; then 10 | releasebuild=0 11 | else 12 | releasebuild=1 13 | fi 14 | fi 15 | echo $releasebuild 16 | 17 | 18 | echo "**********Starting Setup **********" 19 | #dpkg-query -l docker.io 20 | PKG_DOCKER=$(dpkg-query -W --showformat='${Status}\n' docker.io|grep "install ok installed") 21 | echo Package Docker: $PKG_DOCKER 22 | if [ "" == "$PKG_DOCKER" ]; 23 | then 24 | echo "***********Installing Docker***************" 25 | sudo apt-get install docker.io -y 26 | else 27 | echo "Docker already installed" 28 | fi 29 | 30 | echo "************Installing Telegraf***********" 31 | cd $HOME 32 | #Add influx repo 33 | sudo rm -rf /etc/apt/sources.list.d/influxdb.list 34 | sudo wget -qO- https://repos.influxdata.com/influxdb.key | sudo apt-key add - 35 | source /etc/lsb-release 36 | echo "Adding telegraf repo" 37 | sudo echo "deb https://repos.influxdata.com/${DISTRIB_ID,,} ${DISTRIB_CODENAME} stable" 38 | sudo echo "deb https://repos.influxdata.com/${DISTRIB_ID,,} ${DISTRIB_CODENAME} stable" | sudo tee /etc/apt/sources.list.d/influxdb.list 39 | 40 | 41 | #sudo dpkg-query -l telegraf 42 | #dpkg-query -l telegraf 43 | PKG_TELEGRAF=$(dpkg-query -W --showformat='${Status}\n' telegraf|grep "install ok installed") 44 | echo Package telegraf: $PKG_TELEGRAF 45 | if [ "" == "$PKG_TELEGRAF" ]; 46 | then 47 | echo "***********Installing telegraf***************" 48 | if [[ $releasebuild == 1 ]] 49 | then 50 | echo "*** Telegraf Release Build being installed" 51 | sudo apt-get update && sudo apt-get install telegraf 52 | else 53 | echo "*** Telegraf Nightly build being installed" 54 | wget https://dl.influxdata.com/telegraf/nightlies/telegraf_nightly_amd64.deb 55 | sudo dpkg -i telegraf_nightly_amd64.deb 56 | fi 57 | else 58 | echo "Telegraf already installed" 59 | fi 60 | 61 | 62 | echo "********* Firewall rule for Grafana port **********" 63 | sudo ufw allow 3000/tcp 64 | sudo ufw reload 65 | 66 | echo "****** copying telegraf.conf sample for SQL, original conf renamed to /etc/telegraf/telegraf_original.conf ****/" 67 | sudo mv /etc/telegraf/telegraf.conf /etc/telegraf/telegraf_original.conf 68 | sudo cp $HOME/sqldbmonitoring/telegraf/telegraf.conf /etc/telegraf/telegraf.conf 69 | sudo chown root:root /etc/telegraf/telegraf.conf 70 | sudo chmod 644 /etc/telegraf/telegraf.conf 71 | 72 | echo "********Pulling grafana container ****************" 73 | cd $HOME/sqldbmonitoring/grafana 74 | sudo ./rungrafana.sh 75 | 76 | 77 | -------------------------------------------------------------------------------- /telegraf/telegraf.conf: -------------------------------------------------------------------------------- 1 | # Global tags can be specified here in key="value" format. 2 | # [global_tags] 3 | # dc = "us-east-1" # will tag all metrics with dc=us-east-1 4 | # rack = "1a" 5 | # Environment variables can be used as tags, and throughout the config file 6 | # user = "$USER" 7 | 8 | # Configuration for telegraf agent 9 | [agent] 10 | # Default data collection interval for all inputs 11 | interval = "15s" 12 | 13 | 14 | # Read metrics from SQL Server 15 | # Various sections for each Database Type. 16 | 17 | 18 | [[inputs.sqlserver]] 19 | interval = "15s" 20 | #Setting Database to Managed Instance. 21 | database_type = "AzureSQLDB" 22 | 23 | #List of Servers to Collect Data from 24 | #servers = ["Server=YOURSERVER.database.windows.net;User Id=telegraf;Password=MyComplexPassword1!;database=YOURDB;app name=telegraf;connection timeout = 5"] 25 | 26 | 27 | ## database_type = AzureSQLDB by default collects the following queries 28 | ## - AzureSQLDBWaitStats 29 | ## - AzureSQLDBResourceStats 30 | ## - AzureSQLDBResourceGovernance 31 | ## - AzureSQLDBDatabaseIO 32 | ## - AzureSQLDBServerProperties 33 | ## - AzureSQLDBOsWaitstats 34 | ## - AzureSQLDBMemoryClerks 35 | ## - AzureSQLDBPerformanceCounters 36 | ## - AzureSQLDBRequests 37 | ## - AzureSQLDBSchedulers 38 | 39 | exclude_query = [ 'AzureSQLDBSchedulers' , 'AzureSQLDBSqlRequests'] 40 | 41 | 42 | 43 | [[inputs.sqlserver]] 44 | interval = "15s" 45 | #Setting Database to Managed Instance. 46 | 47 | database_type = "AzureSQLManagedInstance" 48 | #servers = ["Server=YOURSERVER.database.windows.net;Port=1433;User Id=telegraf;Password=MyComplexPassword1!;app name=telegraf;connection timeout = 5"] 49 | 50 | #List of Servers to Collect Data from 51 | ## Possible collectors for database_type = AzureSQLManagedInstance by default collects the following queries 52 | ## - AzureSQLMIResourceStats 53 | ## - AzureSQLMIResourceGovernance 54 | ## - AzureSQLMIDatabaseIO 55 | ## - AzureSQLMIServerProperties 56 | ## - AzureSQLMIOsWaitstats 57 | ## - AzureSQLMIMemoryClerks 58 | ## - AzureSQLMIPerformanceCounters 59 | ## - AzureSQLMIRequests 60 | ## - AzureSQLMISchedulers 61 | 62 | exclude_query = [ 'AzureSQLMISchedulers' , 'AzureSQLMISqlRequests'] 63 | 64 | 65 | 66 | [[inputs.sqlserver]] 67 | interval = "15s" 68 | #Setting Database to Managed Instance. 69 | database_type = "SQLServer" 70 | 71 | #List of Servers to Collect Data from 72 | #servers = ["Server=YOURSERVER.database.windows.net;Port=1433;User Id=telegraf;Password=MyComplexPassword1!;app name=telegraf;connection timeout = 5"] 73 | 74 | 75 | ## database_type = SQLServer by default collects the following queries 76 | ## - SQLServerPerformanceCounters 77 | ## - SQLServerWaitStatsCategorized 78 | ## - SQLServerDatabaseIO 79 | ## - SQLServerProperties 80 | ## - SQLServerMemoryClerks 81 | ## - SQLServerSchedulers 82 | ## - SQLServerRequests 83 | ## - SQLServerVolumeSpace 84 | ## - SQLServerCpu 85 | 86 | exclude_query = [ 'SQLServerRequests' , 'SQLServerSchedulers'] 87 | 88 | 89 | 90 | #Change the influxDB settings to point to your InfluxDB install 91 | [[outputs.influxdb]] 92 | database = "telegraf" 93 | urls = ["http://localhost:8086"] 94 | 95 | # if you want sparate databases, use namepass which will direct output metrics to specific databases 96 | #[[outputs.influxdb]] 97 | # database = "mssql_metrics" 98 | # urls = ["http://localhost:8086"] 99 | # namepass = ["sqlserver*"] 100 | 101 | #[[outputs.influxdb]] 102 | # database = "docker_metrics" 103 | # urls = ["http://localhost:8086"] 104 | # namepass = ["*_docker"] 105 | 106 | --------------------------------------------------------------------------------