├── .gitignore ├── LICENSE ├── README.md ├── SECURITY.md ├── collectd ├── Dockerfile ├── LICENSE ├── collectd.conf ├── run-collectd.sh ├── run.sh ├── service-template └── types.db.mssql ├── grafana ├── LICENSE └── run.sh ├── grafana_dashboard_templates ├── core_server_metrics.json ├── core_server_metrics_by_core.json └── core_sql_metrics.json ├── influxdb ├── Dockerfile ├── LICENSE ├── influxdb.conf ├── run-influxdb.sh ├── run.sh └── types.db.mssql └── media ├── core_cpu_metrics.PNG ├── core_server_metrics.png ├── core_sql_metrics.png └── solution_diagram.png /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.suo 8 | *.user 9 | *.userosscache 10 | *.sln.docstates 11 | 12 | # User-specific files (MonoDevelop/Xamarin Studio) 13 | *.userprefs 14 | 15 | # Build results 16 | [Dd]ebug/ 17 | [Dd]ebugPublic/ 18 | [Rr]elease/ 19 | [Rr]eleases/ 20 | x64/ 21 | x86/ 22 | bld/ 23 | [Bb]in/ 24 | [Oo]bj/ 25 | [Ll]og/ 26 | 27 | # Visual Studio 2015 cache/options directory 28 | .vs/ 29 | # Uncomment if you have tasks that create the project's static files in wwwroot 30 | #wwwroot/ 31 | 32 | # MSTest test Results 33 | [Tt]est[Rr]esult*/ 34 | [Bb]uild[Ll]og.* 35 | 36 | # NUNIT 37 | *.VisualState.xml 38 | TestResult.xml 39 | 40 | # Build Results of an ATL Project 41 | [Dd]ebugPS/ 42 | [Rr]eleasePS/ 43 | dlldata.c 44 | 45 | # .NET Core 46 | project.lock.json 47 | project.fragment.lock.json 48 | artifacts/ 49 | **/Properties/launchSettings.json 50 | 51 | *_i.c 52 | *_p.c 53 | *_i.h 54 | *.ilk 55 | *.meta 56 | *.obj 57 | *.pch 58 | *.pdb 59 | *.pgc 60 | *.pgd 61 | *.rsp 62 | *.sbr 63 | *.tlb 64 | *.tli 65 | *.tlh 66 | *.tmp 67 | *.tmp_proj 68 | *.log 69 | *.vspscc 70 | *.vssscc 71 | .builds 72 | *.pidb 73 | *.svclog 74 | *.scc 75 | 76 | # Chutzpah Test files 77 | _Chutzpah* 78 | 79 | # Visual C++ cache files 80 | ipch/ 81 | *.aps 82 | *.ncb 83 | *.opendb 84 | *.opensdf 85 | *.sdf 86 | *.cachefile 87 | *.VC.db 88 | *.VC.VC.opendb 89 | 90 | # Visual Studio profiler 91 | *.psess 92 | *.vsp 93 | *.vspx 94 | *.sap 95 | 96 | # TFS 2012 Local Workspace 97 | $tf/ 98 | 99 | # Guidance Automation Toolkit 100 | *.gpState 101 | 102 | # ReSharper is a .NET coding add-in 103 | _ReSharper*/ 104 | *.[Rr]e[Ss]harper 105 | *.DotSettings.user 106 | 107 | # JustCode is a .NET coding add-in 108 | .JustCode 109 | 110 | # TeamCity is a build add-in 111 | _TeamCity* 112 | 113 | # DotCover is a Code Coverage Tool 114 | *.dotCover 115 | 116 | # Visual Studio code coverage results 117 | *.coverage 118 | *.coveragexml 119 | 120 | # NCrunch 121 | _NCrunch_* 122 | .*crunch*.local.xml 123 | nCrunchTemp_* 124 | 125 | # MightyMoose 126 | *.mm.* 127 | AutoTest.Net/ 128 | 129 | # Web workbench (sass) 130 | .sass-cache/ 131 | 132 | # Installshield output folder 133 | [Ee]xpress/ 134 | 135 | # DocProject is a documentation generator add-in 136 | DocProject/buildhelp/ 137 | DocProject/Help/*.HxT 138 | DocProject/Help/*.HxC 139 | DocProject/Help/*.hhc 140 | DocProject/Help/*.hhk 141 | DocProject/Help/*.hhp 142 | DocProject/Help/Html2 143 | DocProject/Help/html 144 | 145 | # Click-Once directory 146 | publish/ 147 | 148 | # Publish Web Output 149 | *.[Pp]ublish.xml 150 | *.azurePubxml 151 | # TODO: Comment the next line if you want to checkin your web deploy settings 152 | # but database connection strings (with potential passwords) will be unencrypted 153 | *.pubxml 154 | *.publishproj 155 | 156 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 157 | # checkin your Azure Web App publish settings, but sensitive information contained 158 | # in these scripts will be unencrypted 159 | PublishScripts/ 160 | 161 | # NuGet Packages 162 | *.nupkg 163 | # The packages folder can be ignored because of Package Restore 164 | **/packages/* 165 | # except build/, which is used as an MSBuild target. 166 | !**/packages/build/ 167 | # Uncomment if necessary however generally it will be regenerated when needed 168 | #!**/packages/repositories.config 169 | # NuGet v3's project.json files produces more ignorable files 170 | *.nuget.props 171 | *.nuget.targets 172 | 173 | # Microsoft Azure Build Output 174 | csx/ 175 | *.build.csdef 176 | 177 | # Microsoft Azure Emulator 178 | ecf/ 179 | rcf/ 180 | 181 | # Windows Store app package directories and files 182 | AppPackages/ 183 | BundleArtifacts/ 184 | Package.StoreAssociation.xml 185 | _pkginfo.txt 186 | 187 | # Visual Studio cache files 188 | # files ending in .cache can be ignored 189 | *.[Cc]ache 190 | # but keep track of directories ending in .cache 191 | !*.[Cc]ache/ 192 | 193 | # Others 194 | ClientBin/ 195 | ~$* 196 | *~ 197 | *.dbmdl 198 | *.dbproj.schemaview 199 | *.jfm 200 | *.pfx 201 | *.publishsettings 202 | orleans.codegen.cs 203 | 204 | # Since there are multiple workflows, uncomment next line to ignore bower_components 205 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 206 | #bower_components/ 207 | 208 | # RIA/Silverlight projects 209 | Generated_Code/ 210 | 211 | # Backup & report files from converting an old project file 212 | # to a newer Visual Studio version. Backup files are not needed, 213 | # because we have git ;-) 214 | _UpgradeReport_Files/ 215 | Backup*/ 216 | UpgradeLog*.XML 217 | UpgradeLog*.htm 218 | 219 | # SQL Server files 220 | *.mdf 221 | *.ldf 222 | *.ndf 223 | 224 | # Business Intelligence projects 225 | *.rdl.data 226 | *.bim.layout 227 | *.bim_*.settings 228 | 229 | # Microsoft Fakes 230 | FakesAssemblies/ 231 | 232 | # GhostDoc plugin setting file 233 | *.GhostDoc.xml 234 | 235 | # Node.js Tools for Visual Studio 236 | .ntvs_analysis.dat 237 | node_modules/ 238 | 239 | # Typescript v1 declaration files 240 | typings/ 241 | 242 | # Visual Studio 6 build log 243 | *.plg 244 | 245 | # Visual Studio 6 workspace options file 246 | *.opt 247 | 248 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 249 | *.vbw 250 | 251 | # Visual Studio LightSwitch build output 252 | **/*.HTMLClient/GeneratedArtifacts 253 | **/*.DesktopClient/GeneratedArtifacts 254 | **/*.DesktopClient/ModelManifest.xml 255 | **/*.Server/GeneratedArtifacts 256 | **/*.Server/ModelManifest.xml 257 | _Pvt_Extensions 258 | 259 | # Paket dependency manager 260 | .paket/paket.exe 261 | paket-files/ 262 | 263 | # FAKE - F# Make 264 | .fake/ 265 | 266 | # JetBrains Rider 267 | .idea/ 268 | *.sln.iml 269 | 270 | # CodeRush 271 | .cr/ 272 | 273 | # Python Tools for Visual Studio (PTVS) 274 | __pycache__/ 275 | *.pyc 276 | 277 | # Cake - Uncomment if you are using it 278 | # tools/** 279 | # !tools/packages.config 280 | 281 | # Telerik's JustMock configuration file 282 | *.jmconfig 283 | 284 | # BizTalk build output 285 | *.btp.cs 286 | *.btm.cs 287 | *.odx.cs 288 | *.xsd.cs 289 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) Microsoft Corporation. All rights reserved. 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 | # What is this project? 2 | 3 | This is a project to get users started on monitoring Microsoft SQL Server on Linux using [collectd](https://collectd.org/), [InfluxDB](https://www.influxdata.com/) and [Grafana](https://grafana.com/). Please see [How the SQLCAT Customer Lab is Monitoring SQL on Linux](https://blogs.msdn.microsoft.com/sqlcat/2017/07/03/how-the-sqlcat-customer-lab-is-monitoring-sql-on-linux/) for more details on the project. 4 | 5 | # What do I need? 6 | 7 | There are a few things that you will need bofore you can implement this monitoring environment. 8 | 9 | - Access to docker.io and Github for pulling Docker images and this repository. 10 | - A SQL machine or VM that you would like to monitor. 11 | - 1-2 machines for running InfluxDB and Grafana, depending on how large your deployment is. 12 | - InfluxDB opened ports: 25826 (inbound data to InfluxDB), 8086 (outbound queries from Grafana) 13 | - Grafana opened port: 3000 (default web port for inbound connections) 14 | 15 | 16 | # Setting up InfluxDb. 17 | 18 | For sizing InfluxDB, refer to their [documentation](https://docs.influxdata.com/influxdb/v1.2/guides/hardware_sizing/#general-hardware-guidelines-for-a-single-node). Also note that it is also recommended that you provision SSD volumes for the InfluxDB data and wal directories. Not a requirement if you are doing a small (monitoring a few machines) scale setup. 19 | 20 | - Install Docker Engine 21 | ``` 22 | wget -qO- https://get.docker.com/ | sudo sh 23 | ``` 24 | - Clone this repository 25 | ``` 26 | git clone https://github.com/Microsoft/mssql-monitoring.git 27 | ``` 28 | - Browse to ./mssql-monitoring/influxdb 29 | - Edit run.sh and change the variables to match your environment 30 | - Run run.sh. This will pull down the InfluxDB image and create and run the container 31 | ``` 32 | sudo bash ./run.sh 33 | ``` 34 | 35 | # Setting up collectd on the Linux SQL Server you want to monitor 36 | 37 | - Install Docker Engine 38 | ``` 39 | wget -qO- https://get.docker.com/ | sudo sh 40 | ``` 41 | - Clone this repository 42 | ``` 43 | git clone https://github.com/Microsoft/mssql-monitoring.git 44 | ``` 45 | - Browse to ./mssql-monitoring/collectd 46 | - Edit run.sh and change the variables to match your environment 47 | - Run run.sh. This will pull down the collectd image, set it to start on reboot and create and run the container. 48 | ``` 49 | sudo bash ./run.sh 50 | ``` 51 | 52 | # Setting up Grafana 53 | 54 | If you are doing a small (monitoring a few machines) scale setup, you should be fine running this on the same host as your InfluxDB container. We use the image created by [Grafana Labs](http://docs.grafana.org/installation/docker/) and we just added a run.sh file that you can use to run the container. 55 | 56 | - Install Docker Engine 57 | ``` 58 | wget -qO- https://get.docker.com/ | sudo sh 59 | ``` 60 | - If you are running this separately, you will need to clone this repository 61 | ``` 62 | git clone https://github.com/Microsoft/mssql-monitoring.git 63 | ``` 64 | - Browse to ./mssql-monitoring/grafana 65 | - Run run.sh. This will pull down the Grafana image and create and run the container 66 | ``` 67 | sudo bash ./run.sh 68 | ``` 69 | - Browse to the URL where Grafana is running http://[MACHINE_IP]:3000 70 | - Add your first data source 71 | * Name: influxdb 72 | * Type: InfluxDB 73 | * Url: http://[INFLUXDB_IP]:8086 (If you are running Grafana on the same host as InfluxDB, you will need to specify the public end point for your InfluxDB instance. Alternatively, you can edit the run.sh file to include /net=host and the default URL will work.) 74 | * Database: collectd_db 75 | - Click Add 76 | - Browse back to the main page and import the dashboards from the dashboard dropdown menu. 77 | Dashboards are located under [./sqlserver_perf_monitoring/grafana_dashboard_templates](https://github.com/Microsoft/mssql-monitoring/tree/master/grafana_dashboard_templates) in the GitHub repo. 78 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | ## Security 4 | 5 | Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/). 6 | 7 | If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/opensource/security/definition), please report it to us as described below. 8 | 9 | ## Reporting Security Issues 10 | 11 | **Please do not report security vulnerabilities through public GitHub issues.** 12 | 13 | Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/opensource/security/create-report). 14 | 15 | If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/opensource/security/pgpkey). 16 | 17 | You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://aka.ms/opensource/security/msrc). 18 | 19 | Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue: 20 | 21 | * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.) 22 | * Full paths of source file(s) related to the manifestation of the issue 23 | * The location of the affected source code (tag/branch/commit or direct URL) 24 | * Any special configuration required to reproduce the issue 25 | * Step-by-step instructions to reproduce the issue 26 | * Proof-of-concept or exploit code (if possible) 27 | * Impact of the issue, including how an attacker might exploit the issue 28 | 29 | This information will help us triage your report more quickly. 30 | 31 | If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/opensource/security/bounty) page for more details about our active programs. 32 | 33 | ## Preferred Languages 34 | 35 | We prefer all communications to be in English. 36 | 37 | ## Policy 38 | 39 | Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/opensource/security/cvd). 40 | 41 | 42 | -------------------------------------------------------------------------------- /collectd/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM phusion/baseimage:0.9.19 2 | MAINTAINER Steven Schneider 3 | 4 | RUN apt-get update &&\ 5 | apt-get -y upgrade &&\ 6 | apt-get -y install collectd &&\ 7 | apt-get -y install libdbd-freetds 8 | 9 | ENV SQL_HOSTNAME empty 10 | ENV SQL_USERNAME sa 11 | ENV SQL_PASSWORD nopass 12 | 13 | ENV INFLUX_DB_SERVER 127.0.0.1 14 | ENV INFLUX_DB_PORT 25826 15 | 16 | ADD collectd.conf /etc/collectd/collectd-template.conf 17 | ADD types.db.mssql /usr/share/collectd/types.db.mssql 18 | 19 | RUN mkdir -p /etc/service/collectd 20 | ADD run-collectd.sh /etc/service/collectd/run 21 | RUN chmod +x /etc/service/collectd/run 22 | 23 | 24 | ENV HOME /root 25 | CMD ["/sbin/my_init"] 26 | -------------------------------------------------------------------------------- /collectd/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 scschneider 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 | -------------------------------------------------------------------------------- /collectd/collectd.conf: -------------------------------------------------------------------------------- 1 | # 2 | # Config file for collectd(1). 3 | # Please read collectd.conf(5) for a list of options. 4 | # http://collectd.org/ 5 | # 6 | 7 | ############################################################################## 8 | # Global # 9 | #----------------------------------------------------------------------------# 10 | # Global settings for the daemon. # 11 | ############################################################################## 12 | 13 | Hostname "##SQL_HOSTNAME##" 14 | FQDNLookup false 15 | 16 | #BaseDir "/var/lib/collectd" 17 | #PIDFile "/var/run/collectd.pid" 18 | #PluginDir "/usr/lib64/collectd" 19 | TypesDB "/usr/share/collectd/types.db" 20 | TypesDB "/usr/share/collectd/types.db.mssql" 21 | 22 | #----------------------------------------------------------------------------# 23 | # When enabled, plugins are loaded automatically with the default options # 24 | # when an appropriate block is encountered. # 25 | # Disabled by default. # 26 | #----------------------------------------------------------------------------# 27 | #AutoLoadPlugin false 28 | 29 | #----------------------------------------------------------------------------# 30 | # When enabled, internal statistics are collected, using "collectd" as the # 31 | # plugin name. # 32 | # Disabled by default. # 33 | #----------------------------------------------------------------------------# 34 | #CollectInternalStats false 35 | 36 | #----------------------------------------------------------------------------# 37 | # Interval at which to query values. This may be overwritten on a per-plugin # 38 | # base by using the 'Interval' option of the LoadPlugin block: # 39 | # # 40 | # Interval 60 # 41 | # # 42 | #----------------------------------------------------------------------------# 43 | Interval 5 44 | 45 | #MaxReadInterval 86400 46 | Timeout 2 47 | #ReadThreads 5 48 | WriteThreads 5 49 | 50 | # Limit the size of the write queue. Default is no limit. Setting up a limit is 51 | # recommended for servers handling a high volume of traffic. 52 | #WriteQueueLimitHigh 1000000 53 | #WriteQueueLimitLow 800000 54 | 55 | ############################################################################## 56 | # Logging # 57 | #----------------------------------------------------------------------------# 58 | # Plugins which provide logging functions should be loaded first, so log # 59 | # messages generated when loading or configuring other plugins can be # 60 | # accessed. # 61 | ############################################################################## 62 | 63 | 64 | #LoadPlugin logfile 65 | #LoadPlugin log_logstash 66 | 67 | # 68 | # LogLevel info 69 | # File STDOUT 70 | # Timestamp true 71 | # PrintSeverity false 72 | # 73 | 74 | # 75 | # LogLevel info 76 | # File "/var/log/collectd.json.log" 77 | # 78 | 79 | # 80 | # LogLevel info 81 | # 82 | 83 | ############################################################################## 84 | # LoadPlugin section # 85 | #----------------------------------------------------------------------------# 86 | # Lines beginning with a single `#' belong to plugins which have been built # 87 | # but are disabled by default. # 88 | # # 89 | # Lines begnning with `##' belong to plugins which have not been built due # 90 | # to missing dependencies or because they have been deactivated explicitly. # 91 | ############################################################################## 92 | 93 | LoadPlugin network 94 | LoadPlugin cpu 95 | LoadPlugin df 96 | LoadPlugin load 97 | LoadPlugin memory 98 | LoadPlugin disk 99 | LoadPlugin interface 100 | LoadPlugin uptime 101 | LoadPlugin swap 102 | LoadPlugin processes 103 | 104 | ############################################################################## 105 | # Plugin configuration # 106 | #----------------------------------------------------------------------------# 107 | # In this section configuration stubs for each plugin are provided. A desc- # 108 | # ription of those options is available in the collectd.conf(5) manual page. # 109 | ############################################################################## 110 | 111 | 112 | Server "##INFLUX_DB_SERVER##" "##INFLUX_DB_PORT##" 113 | 114 | 115 | 116 | Interval ##SQL_POLL_INTERVAL## 117 | 118 | 119 | 120 | 121 | Statement "select replace(rtrim(counter_name),' ','_') as counter_name, replace(rtrim(instance_name),' ','_') as instance_name,cntr_value from sys.dm_os_performance_counters where (counter_name in ('SQL Compilations/sec','SQL Re-Compilations/sec','User Connections','Batch Requests/sec','Logouts/sec','Logins/sec','Processes blocked','Latch Waits/sec','Full Scans/sec','Index Searches/sec','Page Splits/sec','Page Lookups/sec','Page Reads/sec','Page Writes/sec','Readahead Pages/sec','Lazy Writes/sec','Checkpoint Pages/sec','Database Cache Memory (KB)','Log Pool Memory (KB)','Optimizer Memory (KB)','SQL Cache Memory (KB)','Connection Memory (KB)','Lock Memory (KB)', 'Memory broker clerk size','Page life expectancy')) or (instance_name in ('_Total','Column store object pool') and counter_name in ('Transactions/sec','Write Transactions/sec','Log Flushes/sec','Log Flush Wait Time','Lock Timeouts/sec','Number of Deadlocks/sec','Lock Waits/sec','Latch Waits/sec','Memory broker clerk size','Log Bytes Flushed/sec','Bytes Sent to Replica/sec','Log Send Queue','Bytes Sent to Transport/sec','Sends to Replica/sec','Bytes Sent to Transport/sec','Sends to Transport/sec','Bytes Received from Replica/sec','Receives from Replica/sec','Flow Control Time (ms/sec)','Flow Control/sec','Resent Messages/sec','Redone Bytes/sec') or (object_name = 'SQLServer:Database Replica' and counter_name in ('Log Bytes Received/sec','Log Apply Pending Queue','Redone Bytes/sec','Recovery Queue','Log Apply Ready Queue') and instance_name = '_Total')) or (object_name = 'SQLServer:Database Replica' and counter_name in ('Transaction Delay'))" 122 | 123 | Type "sql_server_perf_stats" 124 | InstancesFrom "counter_name" "instance_name" 125 | ValuesFrom "cntr_value" 126 | 127 | 128 | 129 | 130 | Statement "WITH WaitCategoryStats ( wait_category, wait_type, wait_time_ms, waiting_tasks_count, max_wait_time_ms) AS ( SELECT CASE WHEN wait_type LIKE 'LCK%' THEN 'LOCKS' WHEN wait_type LIKE 'PAGEIO%' THEN 'PAGE I/O LATCH' WHEN wait_type LIKE 'PAGELATCH%' THEN 'PAGE LATCH (non-I/O)' WHEN wait_type LIKE 'LATCH%' THEN 'LATCH (non-buffer)' WHEN wait_type LIKE 'LATCH%' THEN 'LATCH (non-buffer)' ELSE wait_type END AS wait_category, wait_type, wait_time_ms, waiting_tasks_count, max_wait_time_ms FROM sys.dm_os_wait_stats WHERE wait_type NOT IN ('LAZYWRITER_SLEEP', 'CLR_AUTO_EVENT' , 'CLR_MANUAL_EVENT', 'REQUEST_FOR_DEADLOCK_SEARCH', 'BACKUPTHREAD', 'CHECKPOINT_QUEUE' , 'EXECSYNC', 'FFT_RECOVERY', 'SNI_CRITICAL_SECTION', 'SOS_PHYS_PAGE_CACHE' , 'CXROWSET_SYNC', 'DAC_INIT', 'DIRTY_PAGE_POLL', 'PWAIT_ALL_COMPONENTS_INITIALIZED' , 'MSQL_XP', 'WAIT_FOR','DBMIRRORING_CMD','DBMIRROR_DBM_EVENT','DBMIRROR_EVENTS_QUEUE','DBMIRROR_WORKER_QUEUE', 'XE_TIMER_EVENT','XE_DISPATCHER_WAIT','WAITFOR_TASKSHUTDOWN','WAIT_FOR_RESULTS' ,'SQLTRACE_INCREMENTAL_FLUSH_SLEEP','WAITFOR' ,'QDS_CLEANUP_STALE_QUERIES_TASK_MAIN_LOOP_SLEEP','QDS_PERSIST_TASK_MAIN_LOOP_SLEEP','HADR_FILESTREAM_IOMGR_IOCOMPLETION','LOGMGR_QUEUE','FSAGENT' ) AND wait_type NOT LIKE 'PREEMPTIVE%' AND wait_type NOT LIKE 'SQLTRACE%' AND wait_type NOT LIKE 'SLEEP%' AND wait_type NOT LIKE 'FT_%' AND wait_type NOT LIKE 'XE%' AND wait_type NOT LIKE 'BROKER%' AND wait_type NOT LIKE 'DISPATCHER%' AND wait_type NOT LIKE 'PWAIT%' AND wait_type NOT LIKE 'SP_SERVER%') select wait_category, sum(wait_time_ms) as wait_time_ms, sum(waiting_tasks_count) as waiting_tasks_count, max(max_wait_time_ms) as max_wait_time_ms from WaitCategoryStats where wait_time_ms >100 group by wait_category" 131 | 132 | Type "sql_server_wait_stats" 133 | InstancesFrom "wait_category" 134 | ValuesFrom "wait_time_ms" "waiting_tasks_count" "max_wait_time_ms" 135 | 136 | 137 | 138 | 139 | Host "##SQL_HOSTNAME##" 140 | Driver "freetds" 141 | DriverOption "host" "127.0.0.1" 142 | DriverOption "username" "##SQL_USERNAME##" 143 | DriverOption "password" "##SQL_PASSWORD##" 144 | Query "perfstats" 145 | Query "waitstats" 146 | 147 | 148 | 149 | 150 | # expose host's mounts into container using -v /:/host:ro (location inside container does not matter much) 151 | # ignore rootfs; else, the root file-system would appear twice, causing 152 | # one of the updates to fail and spam the log 153 | FSType rootfs 154 | # ignore the usual virtual / temporary file-systems 155 | FSType sysfs 156 | FSType proc 157 | FSType devtmpfs 158 | FSType devpts 159 | FSType tmpfs 160 | FSType fusectl 161 | FSType cgroup 162 | FSType overlay 163 | FSType debugfs 164 | FSType pstore 165 | FSType securityfs 166 | FSType hugetlbfs 167 | FSType squashfs 168 | FSType mqueue 169 | MountPoint "/etc/resolv.conf" 170 | MountPoint "/etc/hostname" 171 | MountPoint "/etc/hosts" 172 | IgnoreSelected true 173 | ReportByDevice false 174 | ReportReserved true 175 | ReportInodes true 176 | ValuesAbsolute true 177 | ValuesPercentage true 178 | ReportInodes true 179 | 180 | 181 | 182 | Disk "/^[s]d[a-z]?$/" 183 | Disk "/^dm-[0-9]?$/" 184 | IgnoreSelected false 185 | 186 | 187 | 188 | ReportByState true 189 | ReportByCpu true 190 | ValuesPercentage true 191 | 192 | 193 | 194 | Interface "lo" 195 | Interface "/^veth.*/" 196 | Interface "/^docker.*/" 197 | IgnoreSelected true 198 | 199 | 200 | 201 | ProcessMatch "sqlservr" "sqlservr" 202 | ProcessMatch "sqlcmd" "sqlcmd" 203 | 204 | 205 | 206 | Filter "*.conf" 207 | 208 | -------------------------------------------------------------------------------- /collectd/run-collectd.sh: -------------------------------------------------------------------------------- 1 | #!//bin/bash 2 | 3 | #unmount the local docker proc filesystem and mount the hosts proc filesystem 4 | #allows collectd to collect metrics from the host 5 | umount /proc 6 | mount -o bind /host/proc /proc 7 | 8 | cp /etc/collectd/collectd-template.conf /etc/collectd/collectd.conf 9 | sed -i'' -e "s/##SQL_POLL_INTERVAL##/${SQL_POLL_INTERVAL}/" /etc/collectd/collectd.conf 10 | sed -i'' -e "s/##SQL_HOSTNAME##/${SQL_HOSTNAME}/" /etc/collectd/collectd.conf 11 | sed -i'' -e "s/##SQL_USERNAME##/${SQL_USERNAME}/" /etc/collectd/collectd.conf 12 | sed -i'' -e "s/##SQL_PASSWORD##/${SQL_PASSWORD}/" /etc/collectd/collectd.conf 13 | sed -i'' -e "s/##INFLUX_DB_SERVER##/${INFLUX_DB_SERVER}/" /etc/collectd/collectd.conf 14 | sed -i'' -e "s/##INFLUX_DB_PORT##/${INFLUX_DB_PORT}/" /etc/collectd/collectd.conf 15 | 16 | # Run collectd in foreground mode 17 | /usr/sbin/collectd -C /etc/collectd/collectd.conf -f 18 | -------------------------------------------------------------------------------- /collectd/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #The ip address of the InfluxDB server collecting collectd metrics 4 | INFLUX_DB_SERVER="localhost" 5 | 6 | #The port that your InfluxDB is listening for collectd traffic 7 | INFLUX_DB_PORT="25826" 8 | 9 | #The host name of the server you are monitoring. This is the value that shows up under hosts on the Grafana dashboard 10 | SQL_HOSTNAME="MyHostName" 11 | 12 | #The username used to connect to SQL Server. 13 | SQL_USERNAME="sqluser" 14 | 15 | #The password of the account used to connect to SQL Server 16 | SQL_PASSWORD="strongsqlpassword" 17 | 18 | #The interval that you would like metrics to be pulld from your SQL Server 19 | SQL_POLL_INTERVAL="5" 20 | 21 | sudo docker create --privileged --net=host -v /:/host:ro \ 22 | -e "INFLUX_DB_SERVER=$INFLUX_DB_SERVER" -e "INFLUX_DB_PORT=$INFLUX_DB_PORT" \ 23 | -e "SQL_HOSTNAME=$SQL_HOSTNAME" -e "SQL_USERNAME=$SQL_USERNAME" -e "SQL_PASSWORD=$SQL_PASSWORD" -e "SQL_POLL_INTERVAL= $SQL_POLL_INTERVAL" \ 24 | --name collectd microsoft/mssql-monitoring-collectd:latest 25 | 26 | #This section will setup and enable the container to startup automatically on reboot. 27 | #First we copy the template and then we enable the service to come online during reboot. 28 | sudo cp ./service-template /etc/systemd/system/docker-container@collectd.service 29 | sudo systemctl enable docker-container@collectd 30 | sudo systemctl start docker-container@collectd 31 | -------------------------------------------------------------------------------- /collectd/service-template: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Docker Container %I 3 | Requires=docker.service 4 | After=docker.service 5 | 6 | [Service] 7 | Restart=always 8 | ExecStart=/usr/bin/docker start -a %i 9 | ExecStop=/usr/bin/docker stop -t 2 %i 10 | 11 | [Install] 12 | WantedBy=default.target -------------------------------------------------------------------------------- /collectd/types.db.mssql: -------------------------------------------------------------------------------- 1 | sql_server_perf_stats perf_stats_value:GAUGE:0:U 2 | sql_server_wait_stats wait_time_ms:DERIVE:0:U, waiting_tasks_count:DERIVE:0:U, max_wait_time_ms:GAUGE:0:U 3 | -------------------------------------------------------------------------------- /grafana/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 scschneider 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 | -------------------------------------------------------------------------------- /grafana/run.sh: -------------------------------------------------------------------------------- 1 | #We use the grafana image that Grafana Labs provides http://docs.grafana.org/installation/docker/ 2 | # If you wish to modify the port that Grafana runs on, you can do that here. 3 | sudo docker run -d -p 3000:3000 --name grafana grafana/grafana 4 | -------------------------------------------------------------------------------- /grafana_dashboard_templates/core_server_metrics.json: -------------------------------------------------------------------------------- 1 | { 2 | "__inputs": [ 3 | { 4 | "name": "DS_INFLUXDB", 5 | "label": "influxdb", 6 | "description": "", 7 | "type": "datasource", 8 | "pluginId": "influxdb", 9 | "pluginName": "InfluxDB" 10 | } 11 | ], 12 | "__requires": [ 13 | { 14 | "type": "grafana", 15 | "id": "grafana", 16 | "name": "Grafana", 17 | "version": "4.6.2" 18 | }, 19 | { 20 | "type": "panel", 21 | "id": "graph", 22 | "name": "Graph", 23 | "version": "" 24 | }, 25 | { 26 | "type": "datasource", 27 | "id": "influxdb", 28 | "name": "InfluxDB", 29 | "version": "1.0.0" 30 | } 31 | ], 32 | "annotations": { 33 | "list": [ 34 | { 35 | "builtIn": 1, 36 | "datasource": "-- Grafana --", 37 | "enable": true, 38 | "hide": true, 39 | "iconColor": "rgba(0, 211, 255, 1)", 40 | "name": "Annotations & Alerts", 41 | "type": "dashboard" 42 | } 43 | ] 44 | }, 45 | "editable": true, 46 | "gnetId": null, 47 | "graphTooltip": 1, 48 | "hideControls": false, 49 | "id": null, 50 | "links": [], 51 | "refresh": "5s", 52 | "rows": [ 53 | { 54 | "collapse": false, 55 | "height": "250px", 56 | "panels": [ 57 | { 58 | "aliasColors": {}, 59 | "bars": false, 60 | "dashLength": 10, 61 | "dashes": false, 62 | "datasource": "${DS_INFLUXDB}", 63 | "fill": 1, 64 | "id": 1, 65 | "legend": { 66 | "alignAsTable": true, 67 | "avg": false, 68 | "current": true, 69 | "max": false, 70 | "min": false, 71 | "rightSide": true, 72 | "show": true, 73 | "sort": "current", 74 | "sortDesc": true, 75 | "total": false, 76 | "values": true 77 | }, 78 | "lines": true, 79 | "linewidth": 1, 80 | "links": [], 81 | "nullPointMode": "connected", 82 | "percentage": false, 83 | "pointradius": 5, 84 | "points": false, 85 | "renderer": "flot", 86 | "seriesOverrides": [], 87 | "spaceLength": 10, 88 | "span": 4, 89 | "stack": false, 90 | "steppedLine": false, 91 | "targets": [ 92 | { 93 | "alias": "total", 94 | "dsType": "influxdb", 95 | "groupBy": [ 96 | { 97 | "params": [ 98 | "auto" 99 | ], 100 | "type": "time" 101 | }, 102 | { 103 | "params": [ 104 | "type_instance" 105 | ], 106 | "type": "tag" 107 | } 108 | ], 109 | "measurement": "cpu_value", 110 | "policy": "default", 111 | "query": "SELECT 100 - mean(\"value\") FROM \"cpu_value\" WHERE \"host\" =~ /^$hostname$/ AND \"type_instance\" = 'idle' AND $timeFilter GROUP BY time($interval), \"type_instance\"", 112 | "rawQuery": true, 113 | "refId": "B", 114 | "resultFormat": "time_series", 115 | "select": [ 116 | [ 117 | { 118 | "params": [ 119 | "value" 120 | ], 121 | "type": "field" 122 | }, 123 | { 124 | "params": [], 125 | "type": "mean" 126 | } 127 | ] 128 | ], 129 | "tags": [ 130 | { 131 | "key": "host", 132 | "operator": "=~", 133 | "value": "/^$hostname$/" 134 | }, 135 | { 136 | "condition": "AND", 137 | "key": "type_instance", 138 | "operator": "=", 139 | "value": "idle" 140 | } 141 | ] 142 | }, 143 | { 144 | "alias": "$tag_type_instance", 145 | "dsType": "influxdb", 146 | "groupBy": [ 147 | { 148 | "params": [ 149 | "auto" 150 | ], 151 | "type": "time" 152 | }, 153 | { 154 | "params": [ 155 | "type_instance" 156 | ], 157 | "type": "tag" 158 | } 159 | ], 160 | "hide": false, 161 | "measurement": "cpu_value", 162 | "policy": "default", 163 | "query": "SELECT mean(\"value\") FROM \"cpu_value\" WHERE \"type_instance\" =~ /user|system|nice|irq/ AND \"type\" = 'percent' AND $timeFilter GROUP BY time($interval), \"host\"", 164 | "rawQuery": false, 165 | "refId": "A", 166 | "resultFormat": "time_series", 167 | "select": [ 168 | [ 169 | { 170 | "params": [ 171 | "value" 172 | ], 173 | "type": "field" 174 | }, 175 | { 176 | "params": [], 177 | "type": "mean" 178 | } 179 | ] 180 | ], 181 | "tags": [ 182 | { 183 | "key": "host", 184 | "operator": "=~", 185 | "value": "/^$hostname$/" 186 | }, 187 | { 188 | "condition": "AND", 189 | "key": "type", 190 | "operator": "=", 191 | "value": "percent" 192 | }, 193 | { 194 | "condition": "AND", 195 | "key": "type_instance", 196 | "operator": "!=", 197 | "value": "idle" 198 | } 199 | ] 200 | } 201 | ], 202 | "thresholds": [], 203 | "timeFrom": null, 204 | "timeShift": null, 205 | "title": "CPU Average (User/System)", 206 | "tooltip": { 207 | "shared": true, 208 | "sort": 0, 209 | "value_type": "individual" 210 | }, 211 | "type": "graph", 212 | "xaxis": { 213 | "buckets": null, 214 | "mode": "time", 215 | "name": null, 216 | "show": true, 217 | "values": [] 218 | }, 219 | "yaxes": [ 220 | { 221 | "format": "percent", 222 | "label": null, 223 | "logBase": 1, 224 | "max": "100", 225 | "min": "0", 226 | "show": true 227 | }, 228 | { 229 | "format": "short", 230 | "label": null, 231 | "logBase": 1, 232 | "max": null, 233 | "min": null, 234 | "show": true 235 | } 236 | ] 237 | }, 238 | { 239 | "aliasColors": {}, 240 | "bars": false, 241 | "dashLength": 10, 242 | "dashes": false, 243 | "datasource": "${DS_INFLUXDB}", 244 | "decimals": 2, 245 | "fill": 1, 246 | "id": 2, 247 | "legend": { 248 | "alignAsTable": true, 249 | "avg": false, 250 | "current": true, 251 | "max": false, 252 | "min": false, 253 | "rightSide": true, 254 | "show": true, 255 | "sort": "current", 256 | "sortDesc": true, 257 | "total": false, 258 | "values": true 259 | }, 260 | "lines": true, 261 | "linewidth": 1, 262 | "links": [], 263 | "nullPointMode": "connected", 264 | "percentage": false, 265 | "pointradius": 5, 266 | "points": false, 267 | "renderer": "flot", 268 | "seriesOverrides": [], 269 | "spaceLength": 10, 270 | "span": 3, 271 | "stack": false, 272 | "steppedLine": false, 273 | "targets": [ 274 | { 275 | "alias": "$tag_type_instance", 276 | "dsType": "influxdb", 277 | "groupBy": [ 278 | { 279 | "params": [ 280 | "1s" 281 | ], 282 | "type": "time" 283 | }, 284 | { 285 | "params": [ 286 | "type_instance" 287 | ], 288 | "type": "tag" 289 | } 290 | ], 291 | "hide": false, 292 | "measurement": "memory_value", 293 | "policy": "default", 294 | "refId": "A", 295 | "resultFormat": "time_series", 296 | "select": [ 297 | [ 298 | { 299 | "params": [ 300 | "value" 301 | ], 302 | "type": "field" 303 | }, 304 | { 305 | "params": [], 306 | "type": "mean" 307 | } 308 | ] 309 | ], 310 | "tags": [ 311 | { 312 | "key": "host", 313 | "operator": "=~", 314 | "value": "/^$hostname$/" 315 | }, 316 | { 317 | "condition": "AND", 318 | "key": "type_instance", 319 | "operator": "=", 320 | "value": "free" 321 | } 322 | ] 323 | }, 324 | { 325 | "alias": "$tag_type_instance", 326 | "dsType": "influxdb", 327 | "groupBy": [ 328 | { 329 | "params": [ 330 | "1s" 331 | ], 332 | "type": "time" 333 | }, 334 | { 335 | "params": [ 336 | "type_instance" 337 | ], 338 | "type": "tag" 339 | } 340 | ], 341 | "hide": false, 342 | "measurement": "memory_value", 343 | "policy": "default", 344 | "refId": "B", 345 | "resultFormat": "time_series", 346 | "select": [ 347 | [ 348 | { 349 | "params": [ 350 | "value" 351 | ], 352 | "type": "field" 353 | }, 354 | { 355 | "params": [], 356 | "type": "mean" 357 | } 358 | ] 359 | ], 360 | "tags": [ 361 | { 362 | "key": "host", 363 | "operator": "=~", 364 | "value": "/^$hostname$/" 365 | }, 366 | { 367 | "condition": "AND", 368 | "key": "type_instance", 369 | "operator": "=", 370 | "value": "cached" 371 | } 372 | ] 373 | }, 374 | { 375 | "alias": "$tag_type_instance", 376 | "dsType": "influxdb", 377 | "groupBy": [ 378 | { 379 | "params": [ 380 | "1s" 381 | ], 382 | "type": "time" 383 | }, 384 | { 385 | "params": [ 386 | "type_instance" 387 | ], 388 | "type": "tag" 389 | } 390 | ], 391 | "hide": false, 392 | "measurement": "memory_value", 393 | "policy": "default", 394 | "refId": "C", 395 | "resultFormat": "time_series", 396 | "select": [ 397 | [ 398 | { 399 | "params": [ 400 | "value" 401 | ], 402 | "type": "field" 403 | }, 404 | { 405 | "params": [], 406 | "type": "mean" 407 | } 408 | ] 409 | ], 410 | "tags": [ 411 | { 412 | "key": "host", 413 | "operator": "=~", 414 | "value": "/^$hostname$/" 415 | }, 416 | { 417 | "condition": "AND", 418 | "key": "type_instance", 419 | "operator": "=", 420 | "value": "used" 421 | } 422 | ] 423 | } 424 | ], 425 | "thresholds": [], 426 | "timeFrom": null, 427 | "timeShift": null, 428 | "title": "Memory Usage", 429 | "tooltip": { 430 | "shared": true, 431 | "sort": 0, 432 | "value_type": "individual" 433 | }, 434 | "type": "graph", 435 | "xaxis": { 436 | "buckets": null, 437 | "mode": "time", 438 | "name": null, 439 | "show": true, 440 | "values": [] 441 | }, 442 | "yaxes": [ 443 | { 444 | "format": "bytes", 445 | "label": null, 446 | "logBase": 1, 447 | "max": null, 448 | "min": "0", 449 | "show": true 450 | }, 451 | { 452 | "format": "short", 453 | "label": null, 454 | "logBase": 1, 455 | "max": null, 456 | "min": null, 457 | "show": true 458 | } 459 | ] 460 | }, 461 | { 462 | "aliasColors": {}, 463 | "bars": false, 464 | "dashLength": 10, 465 | "dashes": false, 466 | "datasource": "${DS_INFLUXDB}", 467 | "fill": 1, 468 | "id": 3, 469 | "legend": { 470 | "avg": false, 471 | "current": true, 472 | "max": false, 473 | "min": false, 474 | "show": true, 475 | "total": false, 476 | "values": true 477 | }, 478 | "lines": true, 479 | "linewidth": 1, 480 | "links": [], 481 | "nullPointMode": "null", 482 | "percentage": false, 483 | "pointradius": 5, 484 | "points": false, 485 | "renderer": "flot", 486 | "seriesOverrides": [], 487 | "spaceLength": 10, 488 | "span": 2, 489 | "stack": false, 490 | "steppedLine": false, 491 | "targets": [ 492 | { 493 | "alias": "$tag_type", 494 | "dsType": "influxdb", 495 | "groupBy": [ 496 | { 497 | "params": [ 498 | "type" 499 | ], 500 | "type": "tag" 501 | } 502 | ], 503 | "measurement": "load_shortterm", 504 | "policy": "default", 505 | "refId": "A", 506 | "resultFormat": "time_series", 507 | "select": [ 508 | [ 509 | { 510 | "params": [ 511 | "value" 512 | ], 513 | "type": "field" 514 | } 515 | ] 516 | ], 517 | "tags": [ 518 | { 519 | "key": "host", 520 | "operator": "=~", 521 | "value": "/^$hostname$/" 522 | } 523 | ] 524 | } 525 | ], 526 | "thresholds": [], 527 | "timeFrom": null, 528 | "timeShift": null, 529 | "title": "Load Short Term", 530 | "tooltip": { 531 | "shared": true, 532 | "sort": 0, 533 | "value_type": "individual" 534 | }, 535 | "type": "graph", 536 | "xaxis": { 537 | "buckets": null, 538 | "mode": "time", 539 | "name": null, 540 | "show": true, 541 | "values": [] 542 | }, 543 | "yaxes": [ 544 | { 545 | "format": "short", 546 | "label": null, 547 | "logBase": 1, 548 | "max": null, 549 | "min": "0", 550 | "show": true 551 | }, 552 | { 553 | "format": "short", 554 | "label": null, 555 | "logBase": 1, 556 | "max": null, 557 | "min": null, 558 | "show": true 559 | } 560 | ] 561 | }, 562 | { 563 | "aliasColors": {}, 564 | "bars": false, 565 | "dashLength": 10, 566 | "dashes": false, 567 | "datasource": "${DS_INFLUXDB}", 568 | "fill": 1, 569 | "id": 4, 570 | "legend": { 571 | "alignAsTable": true, 572 | "avg": false, 573 | "current": true, 574 | "max": false, 575 | "min": false, 576 | "rightSide": true, 577 | "show": true, 578 | "sort": "current", 579 | "sortDesc": true, 580 | "total": false, 581 | "values": true 582 | }, 583 | "lines": true, 584 | "linewidth": 1, 585 | "links": [], 586 | "nullPointMode": "null", 587 | "percentage": false, 588 | "pointradius": 1, 589 | "points": false, 590 | "renderer": "flot", 591 | "seriesOverrides": [], 592 | "spaceLength": 10, 593 | "span": 3, 594 | "stack": false, 595 | "steppedLine": false, 596 | "targets": [ 597 | { 598 | "alias": "$tag_instance", 599 | "dsType": "influxdb", 600 | "groupBy": [ 601 | { 602 | "params": [ 603 | "instance" 604 | ], 605 | "type": "tag" 606 | } 607 | ], 608 | "measurement": "disk_value", 609 | "policy": "default", 610 | "refId": "A", 611 | "resultFormat": "time_series", 612 | "select": [ 613 | [ 614 | { 615 | "params": [ 616 | "value" 617 | ], 618 | "type": "field" 619 | } 620 | ] 621 | ], 622 | "tags": [ 623 | { 624 | "key": "type", 625 | "operator": "=", 626 | "value": "pending_operations" 627 | }, 628 | { 629 | "condition": "AND", 630 | "key": "host", 631 | "operator": "=~", 632 | "value": "/^$hostname$/" 633 | }, 634 | { 635 | "condition": "AND", 636 | "key": "instance", 637 | "operator": "=~", 638 | "value": "/^$disk$/" 639 | } 640 | ] 641 | } 642 | ], 643 | "thresholds": [], 644 | "timeFrom": null, 645 | "timeShift": null, 646 | "title": "Queue Length", 647 | "tooltip": { 648 | "shared": true, 649 | "sort": 0, 650 | "value_type": "individual" 651 | }, 652 | "type": "graph", 653 | "xaxis": { 654 | "buckets": null, 655 | "mode": "time", 656 | "name": null, 657 | "show": true, 658 | "values": [] 659 | }, 660 | "yaxes": [ 661 | { 662 | "format": "short", 663 | "label": null, 664 | "logBase": 1, 665 | "max": null, 666 | "min": "0", 667 | "show": true 668 | }, 669 | { 670 | "format": "short", 671 | "label": null, 672 | "logBase": 1, 673 | "max": null, 674 | "min": null, 675 | "show": true 676 | } 677 | ] 678 | } 679 | ], 680 | "repeat": null, 681 | "repeatIteration": null, 682 | "repeatRowId": null, 683 | "showTitle": false, 684 | "title": "Dashboard Row", 685 | "titleSize": "h6" 686 | }, 687 | { 688 | "collapse": false, 689 | "height": 250, 690 | "panels": [ 691 | { 692 | "aliasColors": {}, 693 | "bars": false, 694 | "dashLength": 10, 695 | "dashes": false, 696 | "datasource": "${DS_INFLUXDB}", 697 | "fill": 1, 698 | "id": 5, 699 | "legend": { 700 | "avg": false, 701 | "current": true, 702 | "max": false, 703 | "min": false, 704 | "show": true, 705 | "total": false, 706 | "values": true 707 | }, 708 | "lines": true, 709 | "linewidth": 1, 710 | "links": [], 711 | "nullPointMode": "null", 712 | "percentage": false, 713 | "pointradius": 5, 714 | "points": false, 715 | "renderer": "flot", 716 | "seriesOverrides": [], 717 | "spaceLength": 10, 718 | "span": 3, 719 | "stack": false, 720 | "steppedLine": false, 721 | "targets": [ 722 | { 723 | "alias": "$tag_type", 724 | "dsType": "influxdb", 725 | "groupBy": [ 726 | { 727 | "params": [ 728 | "instance" 729 | ], 730 | "type": "tag" 731 | }, 732 | { 733 | "params": [ 734 | "type" 735 | ], 736 | "type": "tag" 737 | } 738 | ], 739 | "measurement": "processes_value", 740 | "policy": "default", 741 | "refId": "A", 742 | "resultFormat": "time_series", 743 | "select": [ 744 | [ 745 | { 746 | "params": [ 747 | "value" 748 | ], 749 | "type": "field" 750 | } 751 | ] 752 | ], 753 | "tags": [ 754 | { 755 | "key": "type", 756 | "operator": "=", 757 | "value": "ps_rss" 758 | }, 759 | { 760 | "condition": "AND", 761 | "key": "instance", 762 | "operator": "=", 763 | "value": "sqlservr" 764 | }, 765 | { 766 | "condition": "AND", 767 | "key": "host", 768 | "operator": "=~", 769 | "value": "/^$hostname$/" 770 | } 771 | ] 772 | } 773 | ], 774 | "thresholds": [], 775 | "timeFrom": null, 776 | "timeShift": null, 777 | "title": "Processes ps_rss (sqlservr)", 778 | "tooltip": { 779 | "shared": true, 780 | "sort": 0, 781 | "value_type": "individual" 782 | }, 783 | "type": "graph", 784 | "xaxis": { 785 | "buckets": null, 786 | "mode": "time", 787 | "name": null, 788 | "show": true, 789 | "values": [] 790 | }, 791 | "yaxes": [ 792 | { 793 | "format": "decbytes", 794 | "label": null, 795 | "logBase": 1, 796 | "max": null, 797 | "min": "0", 798 | "show": true 799 | }, 800 | { 801 | "format": "short", 802 | "label": null, 803 | "logBase": 1, 804 | "max": null, 805 | "min": null, 806 | "show": true 807 | } 808 | ] 809 | }, 810 | { 811 | "aliasColors": {}, 812 | "bars": false, 813 | "dashLength": 10, 814 | "dashes": false, 815 | "datasource": "${DS_INFLUXDB}", 816 | "fill": 1, 817 | "id": 6, 818 | "legend": { 819 | "avg": false, 820 | "current": true, 821 | "max": false, 822 | "min": false, 823 | "show": true, 824 | "total": false, 825 | "values": true 826 | }, 827 | "lines": true, 828 | "linewidth": 1, 829 | "links": [], 830 | "nullPointMode": "null", 831 | "percentage": false, 832 | "pointradius": 5, 833 | "points": false, 834 | "renderer": "flot", 835 | "seriesOverrides": [], 836 | "spaceLength": 10, 837 | "span": 3, 838 | "stack": false, 839 | "steppedLine": false, 840 | "targets": [ 841 | { 842 | "alias": "$tag_type", 843 | "dsType": "influxdb", 844 | "groupBy": [ 845 | { 846 | "params": [ 847 | "instance" 848 | ], 849 | "type": "tag" 850 | }, 851 | { 852 | "params": [ 853 | "type" 854 | ], 855 | "type": "tag" 856 | } 857 | ], 858 | "measurement": "processes_threads", 859 | "policy": "default", 860 | "refId": "A", 861 | "resultFormat": "time_series", 862 | "select": [ 863 | [ 864 | { 865 | "params": [ 866 | "value" 867 | ], 868 | "type": "field" 869 | } 870 | ] 871 | ], 872 | "tags": [ 873 | { 874 | "key": "instance", 875 | "operator": "=", 876 | "value": "sqlservr" 877 | }, 878 | { 879 | "condition": "AND", 880 | "key": "type", 881 | "operator": "=", 882 | "value": "ps_count" 883 | }, 884 | { 885 | "condition": "AND", 886 | "key": "host", 887 | "operator": "=~", 888 | "value": "/^$hostname$/" 889 | } 890 | ] 891 | } 892 | ], 893 | "thresholds": [], 894 | "timeFrom": null, 895 | "timeShift": null, 896 | "title": "Processes ps_count (sqlservr)", 897 | "tooltip": { 898 | "shared": true, 899 | "sort": 0, 900 | "value_type": "individual" 901 | }, 902 | "type": "graph", 903 | "xaxis": { 904 | "buckets": null, 905 | "mode": "time", 906 | "name": null, 907 | "show": true, 908 | "values": [] 909 | }, 910 | "yaxes": [ 911 | { 912 | "format": "short", 913 | "label": null, 914 | "logBase": 1, 915 | "max": null, 916 | "min": "0", 917 | "show": true 918 | }, 919 | { 920 | "format": "short", 921 | "label": null, 922 | "logBase": 1, 923 | "max": null, 924 | "min": null, 925 | "show": true 926 | } 927 | ] 928 | }, 929 | { 930 | "aliasColors": {}, 931 | "bars": false, 932 | "dashLength": 10, 933 | "dashes": false, 934 | "datasource": "${DS_INFLUXDB}", 935 | "fill": 1, 936 | "id": 7, 937 | "legend": { 938 | "avg": false, 939 | "current": true, 940 | "max": false, 941 | "min": false, 942 | "show": true, 943 | "total": false, 944 | "values": true 945 | }, 946 | "lines": true, 947 | "linewidth": 1, 948 | "links": [], 949 | "nullPointMode": "null", 950 | "percentage": false, 951 | "pointradius": 5, 952 | "points": false, 953 | "renderer": "flot", 954 | "seriesOverrides": [], 955 | "spaceLength": 10, 956 | "span": 3, 957 | "stack": false, 958 | "steppedLine": false, 959 | "targets": [ 960 | { 961 | "alias": "system", 962 | "dsType": "influxdb", 963 | "groupBy": [ 964 | { 965 | "params": [ 966 | "instance" 967 | ], 968 | "type": "tag" 969 | } 970 | ], 971 | "measurement": "processes_syst", 972 | "policy": "default", 973 | "refId": "A", 974 | "resultFormat": "time_series", 975 | "select": [ 976 | [ 977 | { 978 | "params": [ 979 | "value" 980 | ], 981 | "type": "field" 982 | }, 983 | { 984 | "params": [ 985 | "1s" 986 | ], 987 | "type": "non_negative_derivative" 988 | }, 989 | { 990 | "params": [ 991 | "/10000" 992 | ], 993 | "type": "math" 994 | } 995 | ] 996 | ], 997 | "tags": [ 998 | { 999 | "key": "host", 1000 | "operator": "=~", 1001 | "value": "/^$hostname$/" 1002 | }, 1003 | { 1004 | "condition": "AND", 1005 | "key": "type", 1006 | "operator": "=", 1007 | "value": "ps_cputime" 1008 | }, 1009 | { 1010 | "condition": "AND", 1011 | "key": "instance", 1012 | "operator": "=", 1013 | "value": "sqlservr" 1014 | } 1015 | ] 1016 | }, 1017 | { 1018 | "alias": "user", 1019 | "dsType": "influxdb", 1020 | "groupBy": [ 1021 | { 1022 | "params": [ 1023 | "instance" 1024 | ], 1025 | "type": "tag" 1026 | } 1027 | ], 1028 | "measurement": "processes_user", 1029 | "policy": "default", 1030 | "refId": "B", 1031 | "resultFormat": "time_series", 1032 | "select": [ 1033 | [ 1034 | { 1035 | "params": [ 1036 | "value" 1037 | ], 1038 | "type": "field" 1039 | }, 1040 | { 1041 | "params": [ 1042 | "1s" 1043 | ], 1044 | "type": "non_negative_derivative" 1045 | }, 1046 | { 1047 | "params": [ 1048 | "/10000" 1049 | ], 1050 | "type": "math" 1051 | } 1052 | ] 1053 | ], 1054 | "tags": [ 1055 | { 1056 | "key": "host", 1057 | "operator": "=~", 1058 | "value": "/^$hostname$/" 1059 | }, 1060 | { 1061 | "condition": "AND", 1062 | "key": "type", 1063 | "operator": "=", 1064 | "value": "ps_cputime" 1065 | }, 1066 | { 1067 | "condition": "AND", 1068 | "key": "instance", 1069 | "operator": "=", 1070 | "value": "sqlservr" 1071 | } 1072 | ] 1073 | } 1074 | ], 1075 | "thresholds": [], 1076 | "timeFrom": null, 1077 | "timeShift": null, 1078 | "title": "Processes ps_cputime (sqlservr)", 1079 | "tooltip": { 1080 | "shared": true, 1081 | "sort": 0, 1082 | "value_type": "individual" 1083 | }, 1084 | "type": "graph", 1085 | "xaxis": { 1086 | "buckets": null, 1087 | "mode": "time", 1088 | "name": null, 1089 | "show": true, 1090 | "values": [] 1091 | }, 1092 | "yaxes": [ 1093 | { 1094 | "format": "percent", 1095 | "label": null, 1096 | "logBase": 1, 1097 | "max": null, 1098 | "min": "0", 1099 | "show": true 1100 | }, 1101 | { 1102 | "format": "short", 1103 | "label": null, 1104 | "logBase": 1, 1105 | "max": null, 1106 | "min": null, 1107 | "show": true 1108 | } 1109 | ] 1110 | }, 1111 | { 1112 | "aliasColors": {}, 1113 | "bars": false, 1114 | "dashLength": 10, 1115 | "dashes": false, 1116 | "datasource": "${DS_INFLUXDB}", 1117 | "fill": 1, 1118 | "id": 8, 1119 | "legend": { 1120 | "avg": false, 1121 | "current": true, 1122 | "max": false, 1123 | "min": false, 1124 | "show": true, 1125 | "total": false, 1126 | "values": true 1127 | }, 1128 | "lines": true, 1129 | "linewidth": 1, 1130 | "links": [], 1131 | "nullPointMode": "null", 1132 | "percentage": false, 1133 | "pointradius": 5, 1134 | "points": false, 1135 | "renderer": "flot", 1136 | "seriesOverrides": [], 1137 | "spaceLength": 10, 1138 | "span": 3, 1139 | "stack": false, 1140 | "steppedLine": false, 1141 | "targets": [ 1142 | { 1143 | "alias": "write", 1144 | "dsType": "influxdb", 1145 | "groupBy": [ 1146 | { 1147 | "params": [ 1148 | "type" 1149 | ], 1150 | "type": "tag" 1151 | } 1152 | ], 1153 | "measurement": "processes_write", 1154 | "policy": "default", 1155 | "refId": "A", 1156 | "resultFormat": "time_series", 1157 | "select": [ 1158 | [ 1159 | { 1160 | "params": [ 1161 | "value" 1162 | ], 1163 | "type": "field" 1164 | }, 1165 | { 1166 | "params": [ 1167 | "1s" 1168 | ], 1169 | "type": "non_negative_derivative" 1170 | } 1171 | ] 1172 | ], 1173 | "tags": [ 1174 | { 1175 | "key": "host", 1176 | "operator": "=~", 1177 | "value": "/^$hostname$/" 1178 | }, 1179 | { 1180 | "condition": "AND", 1181 | "key": "instance", 1182 | "operator": "=", 1183 | "value": "sqlservr" 1184 | }, 1185 | { 1186 | "condition": "AND", 1187 | "key": "type", 1188 | "operator": "=", 1189 | "value": "ps_disk_ops" 1190 | } 1191 | ] 1192 | }, 1193 | { 1194 | "alias": "read", 1195 | "dsType": "influxdb", 1196 | "groupBy": [ 1197 | { 1198 | "params": [ 1199 | "type" 1200 | ], 1201 | "type": "tag" 1202 | } 1203 | ], 1204 | "measurement": "processes_read", 1205 | "policy": "default", 1206 | "refId": "B", 1207 | "resultFormat": "time_series", 1208 | "select": [ 1209 | [ 1210 | { 1211 | "params": [ 1212 | "value" 1213 | ], 1214 | "type": "field" 1215 | }, 1216 | { 1217 | "params": [ 1218 | "1s" 1219 | ], 1220 | "type": "non_negative_derivative" 1221 | } 1222 | ] 1223 | ], 1224 | "tags": [ 1225 | { 1226 | "key": "host", 1227 | "operator": "=~", 1228 | "value": "/^$hostname$/" 1229 | }, 1230 | { 1231 | "condition": "AND", 1232 | "key": "instance", 1233 | "operator": "=", 1234 | "value": "sqlservr" 1235 | }, 1236 | { 1237 | "condition": "AND", 1238 | "key": "type", 1239 | "operator": "=", 1240 | "value": "ps_disk_ops" 1241 | } 1242 | ] 1243 | } 1244 | ], 1245 | "thresholds": [], 1246 | "timeFrom": null, 1247 | "timeShift": null, 1248 | "title": "Processes ps_disk_ops (sqlservr)", 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": "short", 1265 | "label": null, 1266 | "logBase": 1, 1267 | "max": null, 1268 | "min": "0", 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 | } 1281 | ], 1282 | "repeat": null, 1283 | "repeatIteration": null, 1284 | "repeatRowId": null, 1285 | "showTitle": false, 1286 | "title": "Dashboard Row", 1287 | "titleSize": "h6" 1288 | }, 1289 | { 1290 | "collapse": false, 1291 | "height": 250, 1292 | "panels": [ 1293 | { 1294 | "aliasColors": {}, 1295 | "bars": false, 1296 | "dashLength": 10, 1297 | "dashes": false, 1298 | "datasource": "${DS_INFLUXDB}", 1299 | "fill": 1, 1300 | "id": 13, 1301 | "legend": { 1302 | "alignAsTable": true, 1303 | "avg": false, 1304 | "current": true, 1305 | "max": false, 1306 | "min": false, 1307 | "rightSide": true, 1308 | "show": true, 1309 | "sort": "current", 1310 | "sortDesc": true, 1311 | "total": false, 1312 | "values": true 1313 | }, 1314 | "lines": true, 1315 | "linewidth": 1, 1316 | "links": [], 1317 | "nullPointMode": "connected", 1318 | "percentage": false, 1319 | "pointradius": 1, 1320 | "points": false, 1321 | "renderer": "flot", 1322 | "seriesOverrides": [], 1323 | "spaceLength": 10, 1324 | "span": 4, 1325 | "stack": false, 1326 | "steppedLine": false, 1327 | "targets": [ 1328 | { 1329 | "alias": "$tag_instance", 1330 | "dsType": "influxdb", 1331 | "groupBy": [ 1332 | { 1333 | "params": [ 1334 | "instance" 1335 | ], 1336 | "type": "tag" 1337 | } 1338 | ], 1339 | "measurement": "disk_write", 1340 | "policy": "default", 1341 | "query": "SELECT non_negative_derivative(\"value\", 1s) FROM \"disk_read\" WHERE \"type\" = 'disk_time' AND \"host\" =~ /^$hostname$/ AND $timeFilter GROUP BY \"instance\"", 1342 | "rawQuery": false, 1343 | "refId": "A", 1344 | "resultFormat": "time_series", 1345 | "select": [ 1346 | [ 1347 | { 1348 | "params": [ 1349 | "value" 1350 | ], 1351 | "type": "field" 1352 | }, 1353 | { 1354 | "params": [ 1355 | "1s" 1356 | ], 1357 | "type": "non_negative_derivative" 1358 | } 1359 | ] 1360 | ], 1361 | "tags": [ 1362 | { 1363 | "key": "host", 1364 | "operator": "=~", 1365 | "value": "/^$hostname$/" 1366 | }, 1367 | { 1368 | "condition": "AND", 1369 | "key": "type", 1370 | "operator": "=", 1371 | "value": "disk_time" 1372 | }, 1373 | { 1374 | "condition": "AND", 1375 | "key": "instance", 1376 | "operator": "=~", 1377 | "value": "/^$disk$/" 1378 | } 1379 | ] 1380 | } 1381 | ], 1382 | "thresholds": [], 1383 | "timeFrom": null, 1384 | "timeShift": null, 1385 | "title": "Avg. Disk/sec Write", 1386 | "tooltip": { 1387 | "shared": true, 1388 | "sort": 0, 1389 | "value_type": "individual" 1390 | }, 1391 | "type": "graph", 1392 | "xaxis": { 1393 | "buckets": null, 1394 | "mode": "time", 1395 | "name": null, 1396 | "show": true, 1397 | "values": [] 1398 | }, 1399 | "yaxes": [ 1400 | { 1401 | "format": "ms", 1402 | "label": null, 1403 | "logBase": 1, 1404 | "max": null, 1405 | "min": null, 1406 | "show": true 1407 | }, 1408 | { 1409 | "format": "short", 1410 | "label": null, 1411 | "logBase": 1, 1412 | "max": null, 1413 | "min": null, 1414 | "show": true 1415 | } 1416 | ] 1417 | }, 1418 | { 1419 | "aliasColors": {}, 1420 | "bars": false, 1421 | "dashLength": 10, 1422 | "dashes": false, 1423 | "datasource": "${DS_INFLUXDB}", 1424 | "fill": 1, 1425 | "id": 14, 1426 | "legend": { 1427 | "alignAsTable": true, 1428 | "avg": false, 1429 | "current": true, 1430 | "max": false, 1431 | "min": false, 1432 | "rightSide": true, 1433 | "show": true, 1434 | "sort": "current", 1435 | "sortDesc": true, 1436 | "total": false, 1437 | "values": true 1438 | }, 1439 | "lines": true, 1440 | "linewidth": 1, 1441 | "links": [], 1442 | "nullPointMode": "connected", 1443 | "percentage": false, 1444 | "pointradius": 1, 1445 | "points": false, 1446 | "renderer": "flot", 1447 | "seriesOverrides": [], 1448 | "spaceLength": 10, 1449 | "span": 4, 1450 | "stack": false, 1451 | "steppedLine": false, 1452 | "targets": [ 1453 | { 1454 | "alias": "$tag_instance", 1455 | "dsType": "influxdb", 1456 | "groupBy": [ 1457 | { 1458 | "params": [ 1459 | "instance" 1460 | ], 1461 | "type": "tag" 1462 | } 1463 | ], 1464 | "measurement": "disk_write", 1465 | "policy": "default", 1466 | "query": "SELECT non_negative_derivative(\"value\", 1s) FROM \"disk_read\" WHERE \"type\" = 'disk_time' AND \"host\" =~ /^$hostname$/ AND $timeFilter GROUP BY \"instance\"", 1467 | "rawQuery": false, 1468 | "refId": "A", 1469 | "resultFormat": "time_series", 1470 | "select": [ 1471 | [ 1472 | { 1473 | "params": [ 1474 | "value" 1475 | ], 1476 | "type": "field" 1477 | }, 1478 | { 1479 | "params": [ 1480 | "1s" 1481 | ], 1482 | "type": "non_negative_derivative" 1483 | } 1484 | ] 1485 | ], 1486 | "tags": [ 1487 | { 1488 | "key": "host", 1489 | "operator": "=~", 1490 | "value": "/^$hostname$/" 1491 | }, 1492 | { 1493 | "condition": "AND", 1494 | "key": "type", 1495 | "operator": "=", 1496 | "value": "disk_octets" 1497 | }, 1498 | { 1499 | "condition": "AND", 1500 | "key": "instance", 1501 | "operator": "=~", 1502 | "value": "/^$disk$/" 1503 | } 1504 | ] 1505 | } 1506 | ], 1507 | "thresholds": [], 1508 | "timeFrom": null, 1509 | "timeShift": null, 1510 | "title": "Disk Write Bytes/sec", 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": "Bps", 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 | }, 1543 | { 1544 | "aliasColors": {}, 1545 | "bars": false, 1546 | "dashLength": 10, 1547 | "dashes": false, 1548 | "datasource": "${DS_INFLUXDB}", 1549 | "fill": 1, 1550 | "id": 15, 1551 | "legend": { 1552 | "alignAsTable": true, 1553 | "avg": false, 1554 | "current": true, 1555 | "max": false, 1556 | "min": false, 1557 | "rightSide": true, 1558 | "show": true, 1559 | "sort": "current", 1560 | "sortDesc": true, 1561 | "total": false, 1562 | "values": true 1563 | }, 1564 | "lines": true, 1565 | "linewidth": 1, 1566 | "links": [], 1567 | "nullPointMode": "connected", 1568 | "percentage": false, 1569 | "pointradius": 1, 1570 | "points": false, 1571 | "renderer": "flot", 1572 | "seriesOverrides": [], 1573 | "spaceLength": 10, 1574 | "span": 4, 1575 | "stack": false, 1576 | "steppedLine": false, 1577 | "targets": [ 1578 | { 1579 | "alias": "$tag_instance", 1580 | "dsType": "influxdb", 1581 | "groupBy": [ 1582 | { 1583 | "params": [ 1584 | "instance" 1585 | ], 1586 | "type": "tag" 1587 | } 1588 | ], 1589 | "measurement": "disk_write", 1590 | "policy": "default", 1591 | "query": "SELECT non_negative_derivative(\"value\", 1s) FROM \"disk_read\" WHERE \"type\" = 'disk_time' AND \"host\" =~ /^$hostname$/ AND $timeFilter GROUP BY \"instance\"", 1592 | "rawQuery": false, 1593 | "refId": "A", 1594 | "resultFormat": "time_series", 1595 | "select": [ 1596 | [ 1597 | { 1598 | "params": [ 1599 | "value" 1600 | ], 1601 | "type": "field" 1602 | }, 1603 | { 1604 | "params": [ 1605 | "1s" 1606 | ], 1607 | "type": "non_negative_derivative" 1608 | } 1609 | ] 1610 | ], 1611 | "tags": [ 1612 | { 1613 | "key": "host", 1614 | "operator": "=~", 1615 | "value": "/^$hostname$/" 1616 | }, 1617 | { 1618 | "condition": "AND", 1619 | "key": "type", 1620 | "operator": "=", 1621 | "value": "disk_ops" 1622 | }, 1623 | { 1624 | "condition": "AND", 1625 | "key": "instance", 1626 | "operator": "=~", 1627 | "value": "/^$disk$/" 1628 | } 1629 | ] 1630 | } 1631 | ], 1632 | "thresholds": [], 1633 | "timeFrom": null, 1634 | "timeShift": null, 1635 | "title": "Disk Writes/sec", 1636 | "tooltip": { 1637 | "shared": true, 1638 | "sort": 0, 1639 | "value_type": "individual" 1640 | }, 1641 | "type": "graph", 1642 | "xaxis": { 1643 | "buckets": null, 1644 | "mode": "time", 1645 | "name": null, 1646 | "show": true, 1647 | "values": [] 1648 | }, 1649 | "yaxes": [ 1650 | { 1651 | "format": "wps", 1652 | "label": null, 1653 | "logBase": 1, 1654 | "max": null, 1655 | "min": null, 1656 | "show": true 1657 | }, 1658 | { 1659 | "format": "short", 1660 | "label": null, 1661 | "logBase": 1, 1662 | "max": null, 1663 | "min": null, 1664 | "show": true 1665 | } 1666 | ] 1667 | } 1668 | ], 1669 | "repeat": null, 1670 | "repeatIteration": null, 1671 | "repeatRowId": null, 1672 | "showTitle": false, 1673 | "title": "Dashboard Row", 1674 | "titleSize": "h6" 1675 | }, 1676 | { 1677 | "collapse": false, 1678 | "height": 250, 1679 | "panels": [ 1680 | { 1681 | "aliasColors": {}, 1682 | "bars": false, 1683 | "dashLength": 10, 1684 | "dashes": false, 1685 | "datasource": "${DS_INFLUXDB}", 1686 | "fill": 1, 1687 | "id": 9, 1688 | "legend": { 1689 | "alignAsTable": true, 1690 | "avg": false, 1691 | "current": true, 1692 | "max": false, 1693 | "min": false, 1694 | "rightSide": true, 1695 | "show": true, 1696 | "sort": "current", 1697 | "sortDesc": true, 1698 | "total": false, 1699 | "values": true 1700 | }, 1701 | "lines": true, 1702 | "linewidth": 1, 1703 | "links": [], 1704 | "nullPointMode": "null", 1705 | "percentage": false, 1706 | "pointradius": 1, 1707 | "points": false, 1708 | "renderer": "flot", 1709 | "seriesOverrides": [], 1710 | "spaceLength": 10, 1711 | "span": 4, 1712 | "stack": false, 1713 | "steppedLine": false, 1714 | "targets": [ 1715 | { 1716 | "alias": "$tag_instance", 1717 | "dsType": "influxdb", 1718 | "groupBy": [ 1719 | { 1720 | "params": [ 1721 | "instance" 1722 | ], 1723 | "type": "tag" 1724 | } 1725 | ], 1726 | "measurement": "disk_read", 1727 | "policy": "default", 1728 | "query": "SELECT non_negative_derivative(\"value\", 1s) FROM \"disk_read\" WHERE \"type\" = 'disk_time' AND \"host\" =~ /^$hostname$/ AND $timeFilter GROUP BY \"instance\"", 1729 | "rawQuery": false, 1730 | "refId": "A", 1731 | "resultFormat": "time_series", 1732 | "select": [ 1733 | [ 1734 | { 1735 | "params": [ 1736 | "value" 1737 | ], 1738 | "type": "field" 1739 | }, 1740 | { 1741 | "params": [ 1742 | "1s" 1743 | ], 1744 | "type": "non_negative_derivative" 1745 | } 1746 | ] 1747 | ], 1748 | "tags": [ 1749 | { 1750 | "key": "type", 1751 | "operator": "=", 1752 | "value": "disk_time" 1753 | }, 1754 | { 1755 | "condition": "AND", 1756 | "key": "host", 1757 | "operator": "=~", 1758 | "value": "/^$hostname$/" 1759 | }, 1760 | { 1761 | "condition": "AND", 1762 | "key": "instance", 1763 | "operator": "=~", 1764 | "value": "/^$disk$/" 1765 | } 1766 | ] 1767 | } 1768 | ], 1769 | "thresholds": [], 1770 | "timeFrom": null, 1771 | "timeShift": null, 1772 | "title": "Avg. Disk/sec Read", 1773 | "tooltip": { 1774 | "shared": true, 1775 | "sort": 0, 1776 | "value_type": "individual" 1777 | }, 1778 | "type": "graph", 1779 | "xaxis": { 1780 | "buckets": null, 1781 | "mode": "time", 1782 | "name": null, 1783 | "show": true, 1784 | "values": [] 1785 | }, 1786 | "yaxes": [ 1787 | { 1788 | "format": "ms", 1789 | "label": null, 1790 | "logBase": 1, 1791 | "max": null, 1792 | "min": "0", 1793 | "show": true 1794 | }, 1795 | { 1796 | "format": "short", 1797 | "label": null, 1798 | "logBase": 1, 1799 | "max": null, 1800 | "min": null, 1801 | "show": true 1802 | } 1803 | ] 1804 | }, 1805 | { 1806 | "aliasColors": {}, 1807 | "bars": false, 1808 | "dashLength": 10, 1809 | "dashes": false, 1810 | "datasource": "${DS_INFLUXDB}", 1811 | "fill": 1, 1812 | "id": 10, 1813 | "legend": { 1814 | "alignAsTable": true, 1815 | "avg": false, 1816 | "current": true, 1817 | "max": false, 1818 | "min": false, 1819 | "rightSide": true, 1820 | "show": true, 1821 | "sort": "current", 1822 | "sortDesc": true, 1823 | "total": false, 1824 | "values": true 1825 | }, 1826 | "lines": true, 1827 | "linewidth": 1, 1828 | "links": [], 1829 | "nullPointMode": "null", 1830 | "percentage": false, 1831 | "pointradius": 1, 1832 | "points": false, 1833 | "renderer": "flot", 1834 | "seriesOverrides": [], 1835 | "spaceLength": 10, 1836 | "span": 4, 1837 | "stack": false, 1838 | "steppedLine": false, 1839 | "targets": [ 1840 | { 1841 | "alias": "$tag_instance", 1842 | "dsType": "influxdb", 1843 | "groupBy": [ 1844 | { 1845 | "params": [ 1846 | "instance" 1847 | ], 1848 | "type": "tag" 1849 | } 1850 | ], 1851 | "measurement": "disk_read", 1852 | "policy": "default", 1853 | "refId": "A", 1854 | "resultFormat": "time_series", 1855 | "select": [ 1856 | [ 1857 | { 1858 | "params": [ 1859 | "value" 1860 | ], 1861 | "type": "field" 1862 | }, 1863 | { 1864 | "params": [ 1865 | "1s" 1866 | ], 1867 | "type": "non_negative_derivative" 1868 | } 1869 | ] 1870 | ], 1871 | "tags": [ 1872 | { 1873 | "key": "host", 1874 | "operator": "=~", 1875 | "value": "/^$hostname$/" 1876 | }, 1877 | { 1878 | "condition": "AND", 1879 | "key": "type", 1880 | "operator": "=", 1881 | "value": "disk_octets" 1882 | }, 1883 | { 1884 | "condition": "AND", 1885 | "key": "instance", 1886 | "operator": "=~", 1887 | "value": "/^$disk$/" 1888 | } 1889 | ] 1890 | } 1891 | ], 1892 | "thresholds": [], 1893 | "timeFrom": null, 1894 | "timeShift": null, 1895 | "title": "Disk Read Bytes/sec", 1896 | "tooltip": { 1897 | "shared": true, 1898 | "sort": 0, 1899 | "value_type": "individual" 1900 | }, 1901 | "type": "graph", 1902 | "xaxis": { 1903 | "buckets": null, 1904 | "mode": "time", 1905 | "name": null, 1906 | "show": true, 1907 | "values": [] 1908 | }, 1909 | "yaxes": [ 1910 | { 1911 | "format": "Bps", 1912 | "label": null, 1913 | "logBase": 1, 1914 | "max": null, 1915 | "min": "0", 1916 | "show": true 1917 | }, 1918 | { 1919 | "format": "short", 1920 | "label": null, 1921 | "logBase": 1, 1922 | "max": null, 1923 | "min": null, 1924 | "show": true 1925 | } 1926 | ] 1927 | }, 1928 | { 1929 | "aliasColors": {}, 1930 | "bars": false, 1931 | "dashLength": 10, 1932 | "dashes": false, 1933 | "datasource": "${DS_INFLUXDB}", 1934 | "fill": 1, 1935 | "id": 11, 1936 | "legend": { 1937 | "alignAsTable": true, 1938 | "avg": false, 1939 | "current": true, 1940 | "max": false, 1941 | "min": false, 1942 | "rightSide": true, 1943 | "show": true, 1944 | "sort": "current", 1945 | "sortDesc": true, 1946 | "total": false, 1947 | "values": true 1948 | }, 1949 | "lines": true, 1950 | "linewidth": 1, 1951 | "links": [], 1952 | "nullPointMode": "null", 1953 | "percentage": false, 1954 | "pointradius": 1, 1955 | "points": false, 1956 | "renderer": "flot", 1957 | "seriesOverrides": [], 1958 | "spaceLength": 10, 1959 | "span": 4, 1960 | "stack": false, 1961 | "steppedLine": false, 1962 | "targets": [ 1963 | { 1964 | "alias": "$tag_instance", 1965 | "dsType": "influxdb", 1966 | "groupBy": [ 1967 | { 1968 | "params": [ 1969 | "instance" 1970 | ], 1971 | "type": "tag" 1972 | } 1973 | ], 1974 | "measurement": "disk_read", 1975 | "policy": "default", 1976 | "refId": "A", 1977 | "resultFormat": "time_series", 1978 | "select": [ 1979 | [ 1980 | { 1981 | "params": [ 1982 | "value" 1983 | ], 1984 | "type": "field" 1985 | }, 1986 | { 1987 | "params": [ 1988 | "1s" 1989 | ], 1990 | "type": "non_negative_derivative" 1991 | } 1992 | ] 1993 | ], 1994 | "tags": [ 1995 | { 1996 | "key": "host", 1997 | "operator": "=~", 1998 | "value": "/^$hostname$/" 1999 | }, 2000 | { 2001 | "condition": "AND", 2002 | "key": "type", 2003 | "operator": "=", 2004 | "value": "disk_ops" 2005 | }, 2006 | { 2007 | "condition": "AND", 2008 | "key": "instance", 2009 | "operator": "=~", 2010 | "value": "/^$disk$/" 2011 | } 2012 | ] 2013 | } 2014 | ], 2015 | "thresholds": [], 2016 | "timeFrom": null, 2017 | "timeShift": null, 2018 | "title": "Disk Reads/sec", 2019 | "tooltip": { 2020 | "shared": true, 2021 | "sort": 0, 2022 | "value_type": "individual" 2023 | }, 2024 | "type": "graph", 2025 | "xaxis": { 2026 | "buckets": null, 2027 | "mode": "time", 2028 | "name": null, 2029 | "show": true, 2030 | "values": [] 2031 | }, 2032 | "yaxes": [ 2033 | { 2034 | "format": "rps", 2035 | "label": null, 2036 | "logBase": 1, 2037 | "max": null, 2038 | "min": "0", 2039 | "show": true 2040 | }, 2041 | { 2042 | "format": "short", 2043 | "label": null, 2044 | "logBase": 1, 2045 | "max": null, 2046 | "min": null, 2047 | "show": true 2048 | } 2049 | ] 2050 | } 2051 | ], 2052 | "repeat": null, 2053 | "repeatIteration": null, 2054 | "repeatRowId": null, 2055 | "showTitle": false, 2056 | "title": "Dashboard Row", 2057 | "titleSize": "h6" 2058 | }, 2059 | { 2060 | "collapse": false, 2061 | "height": 250, 2062 | "panels": [ 2063 | { 2064 | "aliasColors": {}, 2065 | "bars": false, 2066 | "dashLength": 10, 2067 | "dashes": false, 2068 | "datasource": "${DS_INFLUXDB}", 2069 | "decimals": 2, 2070 | "fill": 1, 2071 | "id": 16, 2072 | "legend": { 2073 | "avg": false, 2074 | "current": true, 2075 | "max": false, 2076 | "min": false, 2077 | "show": true, 2078 | "total": false, 2079 | "values": true 2080 | }, 2081 | "lines": true, 2082 | "linewidth": 1, 2083 | "links": [], 2084 | "nullPointMode": "null", 2085 | "percentage": false, 2086 | "pointradius": 5, 2087 | "points": false, 2088 | "renderer": "flot", 2089 | "seriesOverrides": [], 2090 | "spaceLength": 10, 2091 | "span": 4, 2092 | "stack": false, 2093 | "steppedLine": false, 2094 | "targets": [ 2095 | { 2096 | "alias": "$tag_instance (rx)", 2097 | "dsType": "influxdb", 2098 | "groupBy": [ 2099 | { 2100 | "params": [ 2101 | "instance" 2102 | ], 2103 | "type": "tag" 2104 | } 2105 | ], 2106 | "measurement": "interface_rx", 2107 | "policy": "default", 2108 | "refId": "A", 2109 | "resultFormat": "time_series", 2110 | "select": [ 2111 | [ 2112 | { 2113 | "params": [ 2114 | "value" 2115 | ], 2116 | "type": "field" 2117 | }, 2118 | { 2119 | "params": [ 2120 | "1s" 2121 | ], 2122 | "type": "non_negative_derivative" 2123 | } 2124 | ] 2125 | ], 2126 | "tags": [ 2127 | { 2128 | "key": "host", 2129 | "operator": "=~", 2130 | "value": "/^$hostname$/" 2131 | }, 2132 | { 2133 | "condition": "AND", 2134 | "key": "type", 2135 | "operator": "=", 2136 | "value": "if_octets" 2137 | } 2138 | ] 2139 | }, 2140 | { 2141 | "alias": "$tag_instance (tx)", 2142 | "dsType": "influxdb", 2143 | "groupBy": [ 2144 | { 2145 | "params": [ 2146 | "instance" 2147 | ], 2148 | "type": "tag" 2149 | } 2150 | ], 2151 | "measurement": "interface_tx", 2152 | "policy": "default", 2153 | "refId": "B", 2154 | "resultFormat": "time_series", 2155 | "select": [ 2156 | [ 2157 | { 2158 | "params": [ 2159 | "value" 2160 | ], 2161 | "type": "field" 2162 | }, 2163 | { 2164 | "params": [ 2165 | "1s" 2166 | ], 2167 | "type": "non_negative_derivative" 2168 | } 2169 | ] 2170 | ], 2171 | "tags": [ 2172 | { 2173 | "key": "host", 2174 | "operator": "=~", 2175 | "value": "/^$hostname$/" 2176 | }, 2177 | { 2178 | "condition": "AND", 2179 | "key": "type", 2180 | "operator": "=", 2181 | "value": "if_octets" 2182 | } 2183 | ] 2184 | } 2185 | ], 2186 | "thresholds": [], 2187 | "timeFrom": null, 2188 | "timeShift": null, 2189 | "title": "Network Traffic/sec", 2190 | "tooltip": { 2191 | "shared": true, 2192 | "sort": 0, 2193 | "value_type": "individual" 2194 | }, 2195 | "type": "graph", 2196 | "xaxis": { 2197 | "buckets": null, 2198 | "mode": "time", 2199 | "name": null, 2200 | "show": true, 2201 | "values": [] 2202 | }, 2203 | "yaxes": [ 2204 | { 2205 | "format": "Bps", 2206 | "label": null, 2207 | "logBase": 1, 2208 | "max": null, 2209 | "min": "0", 2210 | "show": true 2211 | }, 2212 | { 2213 | "format": "short", 2214 | "label": null, 2215 | "logBase": 1, 2216 | "max": null, 2217 | "min": null, 2218 | "show": true 2219 | } 2220 | ] 2221 | }, 2222 | { 2223 | "aliasColors": {}, 2224 | "bars": false, 2225 | "dashLength": 10, 2226 | "dashes": false, 2227 | "datasource": "${DS_INFLUXDB}", 2228 | "fill": 1, 2229 | "id": 17, 2230 | "legend": { 2231 | "avg": false, 2232 | "current": true, 2233 | "max": false, 2234 | "min": false, 2235 | "show": true, 2236 | "total": false, 2237 | "values": true 2238 | }, 2239 | "lines": true, 2240 | "linewidth": 1, 2241 | "links": [], 2242 | "nullPointMode": "null", 2243 | "percentage": false, 2244 | "pointradius": 5, 2245 | "points": false, 2246 | "renderer": "flot", 2247 | "seriesOverrides": [], 2248 | "spaceLength": 10, 2249 | "span": 4, 2250 | "stack": false, 2251 | "steppedLine": false, 2252 | "targets": [ 2253 | { 2254 | "alias": "$tag_instance (rx)", 2255 | "dsType": "influxdb", 2256 | "groupBy": [ 2257 | { 2258 | "params": [ 2259 | "instance" 2260 | ], 2261 | "type": "tag" 2262 | } 2263 | ], 2264 | "measurement": "interface_rx", 2265 | "policy": "default", 2266 | "refId": "A", 2267 | "resultFormat": "time_series", 2268 | "select": [ 2269 | [ 2270 | { 2271 | "params": [ 2272 | "value" 2273 | ], 2274 | "type": "field" 2275 | }, 2276 | { 2277 | "params": [ 2278 | "1s" 2279 | ], 2280 | "type": "non_negative_derivative" 2281 | } 2282 | ] 2283 | ], 2284 | "tags": [ 2285 | { 2286 | "key": "host", 2287 | "operator": "=~", 2288 | "value": "/^$hostname$/" 2289 | }, 2290 | { 2291 | "condition": "AND", 2292 | "key": "type", 2293 | "operator": "=", 2294 | "value": "if_errors" 2295 | } 2296 | ] 2297 | }, 2298 | { 2299 | "alias": "$tag_instance (tx)", 2300 | "dsType": "influxdb", 2301 | "groupBy": [ 2302 | { 2303 | "params": [ 2304 | "instance" 2305 | ], 2306 | "type": "tag" 2307 | } 2308 | ], 2309 | "measurement": "interface_tx", 2310 | "policy": "default", 2311 | "refId": "B", 2312 | "resultFormat": "time_series", 2313 | "select": [ 2314 | [ 2315 | { 2316 | "params": [ 2317 | "value" 2318 | ], 2319 | "type": "field" 2320 | }, 2321 | { 2322 | "params": [ 2323 | "1s" 2324 | ], 2325 | "type": "non_negative_derivative" 2326 | } 2327 | ] 2328 | ], 2329 | "tags": [ 2330 | { 2331 | "key": "host", 2332 | "operator": "=~", 2333 | "value": "/^$hostname$/" 2334 | }, 2335 | { 2336 | "condition": "AND", 2337 | "key": "type", 2338 | "operator": "=", 2339 | "value": "if_errors" 2340 | } 2341 | ] 2342 | } 2343 | ], 2344 | "thresholds": [], 2345 | "timeFrom": null, 2346 | "timeShift": null, 2347 | "title": "Network Errors/sec", 2348 | "tooltip": { 2349 | "shared": true, 2350 | "sort": 0, 2351 | "value_type": "individual" 2352 | }, 2353 | "type": "graph", 2354 | "xaxis": { 2355 | "buckets": null, 2356 | "mode": "time", 2357 | "name": null, 2358 | "show": true, 2359 | "values": [] 2360 | }, 2361 | "yaxes": [ 2362 | { 2363 | "format": "pps", 2364 | "label": "", 2365 | "logBase": 1, 2366 | "max": null, 2367 | "min": "0", 2368 | "show": true 2369 | }, 2370 | { 2371 | "format": "short", 2372 | "label": null, 2373 | "logBase": 1, 2374 | "max": null, 2375 | "min": null, 2376 | "show": true 2377 | } 2378 | ] 2379 | }, 2380 | { 2381 | "aliasColors": {}, 2382 | "bars": false, 2383 | "dashLength": 10, 2384 | "dashes": false, 2385 | "datasource": "${DS_INFLUXDB}", 2386 | "fill": 1, 2387 | "id": 18, 2388 | "legend": { 2389 | "avg": false, 2390 | "current": true, 2391 | "max": false, 2392 | "min": false, 2393 | "show": true, 2394 | "total": false, 2395 | "values": true 2396 | }, 2397 | "lines": true, 2398 | "linewidth": 1, 2399 | "links": [], 2400 | "nullPointMode": "null", 2401 | "percentage": false, 2402 | "pointradius": 5, 2403 | "points": false, 2404 | "renderer": "flot", 2405 | "seriesOverrides": [], 2406 | "spaceLength": 10, 2407 | "span": 4, 2408 | "stack": false, 2409 | "steppedLine": false, 2410 | "targets": [ 2411 | { 2412 | "alias": "$tag_instance (rx)", 2413 | "dsType": "influxdb", 2414 | "groupBy": [ 2415 | { 2416 | "params": [ 2417 | "instance" 2418 | ], 2419 | "type": "tag" 2420 | } 2421 | ], 2422 | "measurement": "interface_rx", 2423 | "policy": "default", 2424 | "refId": "A", 2425 | "resultFormat": "time_series", 2426 | "select": [ 2427 | [ 2428 | { 2429 | "params": [ 2430 | "value" 2431 | ], 2432 | "type": "field" 2433 | }, 2434 | { 2435 | "params": [ 2436 | "1s" 2437 | ], 2438 | "type": "non_negative_derivative" 2439 | } 2440 | ] 2441 | ], 2442 | "tags": [ 2443 | { 2444 | "key": "host", 2445 | "operator": "=~", 2446 | "value": "/^$hostname$/" 2447 | }, 2448 | { 2449 | "condition": "AND", 2450 | "key": "type", 2451 | "operator": "=", 2452 | "value": "if_packets" 2453 | } 2454 | ] 2455 | }, 2456 | { 2457 | "alias": "$tag_instance (tx)", 2458 | "dsType": "influxdb", 2459 | "groupBy": [ 2460 | { 2461 | "params": [ 2462 | "instance" 2463 | ], 2464 | "type": "tag" 2465 | } 2466 | ], 2467 | "measurement": "interface_tx", 2468 | "policy": "default", 2469 | "refId": "B", 2470 | "resultFormat": "time_series", 2471 | "select": [ 2472 | [ 2473 | { 2474 | "params": [ 2475 | "value" 2476 | ], 2477 | "type": "field" 2478 | }, 2479 | { 2480 | "params": [ 2481 | "1s" 2482 | ], 2483 | "type": "non_negative_derivative" 2484 | } 2485 | ] 2486 | ], 2487 | "tags": [ 2488 | { 2489 | "key": "host", 2490 | "operator": "=~", 2491 | "value": "/^$hostname$/" 2492 | }, 2493 | { 2494 | "condition": "AND", 2495 | "key": "type", 2496 | "operator": "=", 2497 | "value": "if_packets" 2498 | } 2499 | ] 2500 | } 2501 | ], 2502 | "thresholds": [], 2503 | "timeFrom": null, 2504 | "timeShift": null, 2505 | "title": "Network Packets/sec", 2506 | "tooltip": { 2507 | "shared": true, 2508 | "sort": 0, 2509 | "value_type": "individual" 2510 | }, 2511 | "type": "graph", 2512 | "xaxis": { 2513 | "buckets": null, 2514 | "mode": "time", 2515 | "name": null, 2516 | "show": true, 2517 | "values": [] 2518 | }, 2519 | "yaxes": [ 2520 | { 2521 | "format": "pps", 2522 | "label": "", 2523 | "logBase": 1, 2524 | "max": null, 2525 | "min": "0", 2526 | "show": true 2527 | }, 2528 | { 2529 | "format": "short", 2530 | "label": null, 2531 | "logBase": 1, 2532 | "max": null, 2533 | "min": null, 2534 | "show": true 2535 | } 2536 | ] 2537 | } 2538 | ], 2539 | "repeat": null, 2540 | "repeatIteration": null, 2541 | "repeatRowId": null, 2542 | "showTitle": false, 2543 | "title": "Dashboard Row", 2544 | "titleSize": "h6" 2545 | }, 2546 | { 2547 | "collapse": false, 2548 | "height": 250, 2549 | "panels": [ 2550 | { 2551 | "aliasColors": {}, 2552 | "bars": false, 2553 | "dashLength": 10, 2554 | "dashes": false, 2555 | "datasource": "${DS_INFLUXDB}", 2556 | "fill": 1, 2557 | "id": 12, 2558 | "legend": { 2559 | "alignAsTable": true, 2560 | "avg": false, 2561 | "current": true, 2562 | "max": false, 2563 | "min": false, 2564 | "rightSide": true, 2565 | "show": true, 2566 | "sort": "current", 2567 | "sortDesc": true, 2568 | "total": false, 2569 | "values": true 2570 | }, 2571 | "lines": true, 2572 | "linewidth": 1, 2573 | "links": [], 2574 | "nullPointMode": "connected", 2575 | "percentage": false, 2576 | "pointradius": 5, 2577 | "points": false, 2578 | "renderer": "flot", 2579 | "seriesOverrides": [], 2580 | "spaceLength": 10, 2581 | "span": 12, 2582 | "stack": false, 2583 | "steppedLine": false, 2584 | "targets": [ 2585 | { 2586 | "alias": "$tag_instance", 2587 | "dsType": "influxdb", 2588 | "groupBy": [ 2589 | { 2590 | "params": [ 2591 | "1s" 2592 | ], 2593 | "type": "time" 2594 | }, 2595 | { 2596 | "params": [ 2597 | "instance" 2598 | ], 2599 | "type": "tag" 2600 | } 2601 | ], 2602 | "measurement": "df_value", 2603 | "policy": "default", 2604 | "refId": "A", 2605 | "resultFormat": "time_series", 2606 | "select": [ 2607 | [ 2608 | { 2609 | "params": [ 2610 | "value" 2611 | ], 2612 | "type": "field" 2613 | }, 2614 | { 2615 | "params": [], 2616 | "type": "mean" 2617 | } 2618 | ] 2619 | ], 2620 | "tags": [ 2621 | { 2622 | "key": "host", 2623 | "operator": "=~", 2624 | "value": "/^$hostname$/" 2625 | }, 2626 | { 2627 | "condition": "AND", 2628 | "key": "type", 2629 | "operator": "=", 2630 | "value": "percent_bytes" 2631 | }, 2632 | { 2633 | "condition": "AND", 2634 | "key": "type_instance", 2635 | "operator": "=", 2636 | "value": "free" 2637 | } 2638 | ] 2639 | } 2640 | ], 2641 | "thresholds": [], 2642 | "timeFrom": null, 2643 | "timeShift": null, 2644 | "title": "Free Space (%)", 2645 | "tooltip": { 2646 | "shared": true, 2647 | "sort": 0, 2648 | "value_type": "individual" 2649 | }, 2650 | "type": "graph", 2651 | "xaxis": { 2652 | "buckets": null, 2653 | "mode": "time", 2654 | "name": null, 2655 | "show": true, 2656 | "values": [ 2657 | "current" 2658 | ] 2659 | }, 2660 | "yaxes": [ 2661 | { 2662 | "format": "percent", 2663 | "label": null, 2664 | "logBase": 1, 2665 | "max": null, 2666 | "min": "0", 2667 | "show": true 2668 | }, 2669 | { 2670 | "format": "short", 2671 | "label": null, 2672 | "logBase": 1, 2673 | "max": null, 2674 | "min": null, 2675 | "show": true 2676 | } 2677 | ] 2678 | } 2679 | ], 2680 | "repeat": null, 2681 | "repeatIteration": null, 2682 | "repeatRowId": null, 2683 | "showTitle": false, 2684 | "title": "Dashboard Row", 2685 | "titleSize": "h6" 2686 | } 2687 | ], 2688 | "schemaVersion": 14, 2689 | "style": "dark", 2690 | "tags": [], 2691 | "templating": { 2692 | "list": [ 2693 | { 2694 | "allValue": null, 2695 | "current": {}, 2696 | "datasource": "${DS_INFLUXDB}", 2697 | "hide": 0, 2698 | "includeAll": false, 2699 | "label": "Host", 2700 | "multi": false, 2701 | "name": "hostname", 2702 | "options": [], 2703 | "query": "SHOW TAG VALUES WITH KEY = \"host\"", 2704 | "refresh": 1, 2705 | "regex": "", 2706 | "sort": 1, 2707 | "tagValuesQuery": "", 2708 | "tags": [], 2709 | "tagsQuery": "", 2710 | "type": "query", 2711 | "useTags": false 2712 | }, 2713 | { 2714 | "allValue": null, 2715 | "current": {}, 2716 | "datasource": "${DS_INFLUXDB}", 2717 | "hide": 0, 2718 | "includeAll": true, 2719 | "label": "Disk", 2720 | "multi": true, 2721 | "name": "disk", 2722 | "options": [], 2723 | "query": "SHOW TAG VALUES FROM \"disk_write\" WITH KEY = \"instance\" WHERE host = '$hostname'", 2724 | "refresh": 1, 2725 | "regex": "", 2726 | "sort": 0, 2727 | "tagValuesQuery": "", 2728 | "tags": [], 2729 | "tagsQuery": "", 2730 | "type": "query", 2731 | "useTags": false 2732 | } 2733 | ] 2734 | }, 2735 | "time": { 2736 | "from": "now-15m", 2737 | "to": "now" 2738 | }, 2739 | "timepicker": { 2740 | "refresh_intervals": [ 2741 | "5s", 2742 | "10s", 2743 | "30s", 2744 | "1m", 2745 | "5m", 2746 | "15m", 2747 | "30m", 2748 | "1h", 2749 | "2h", 2750 | "1d" 2751 | ], 2752 | "time_options": [ 2753 | "5m", 2754 | "15m", 2755 | "1h", 2756 | "6h", 2757 | "12h", 2758 | "24h", 2759 | "2d", 2760 | "7d", 2761 | "30d" 2762 | ] 2763 | }, 2764 | "timezone": "browser", 2765 | "title": "Core Server Metrics", 2766 | "version": 1 2767 | } -------------------------------------------------------------------------------- /grafana_dashboard_templates/core_server_metrics_by_core.json: -------------------------------------------------------------------------------- 1 | { 2 | "__inputs": [ 3 | { 4 | "name": "DS_INFLUXDB", 5 | "label": "influxdb", 6 | "description": "", 7 | "type": "datasource", 8 | "pluginId": "influxdb", 9 | "pluginName": "InfluxDB" 10 | } 11 | ], 12 | "__requires": [ 13 | { 14 | "type": "grafana", 15 | "id": "grafana", 16 | "name": "Grafana", 17 | "version": "4.1.2" 18 | }, 19 | { 20 | "type": "panel", 21 | "id": "graph", 22 | "name": "Graph", 23 | "version": "" 24 | }, 25 | { 26 | "type": "datasource", 27 | "id": "influxdb", 28 | "name": "InfluxDB", 29 | "version": "1.0.0" 30 | } 31 | ], 32 | "annotations": { 33 | "list": [] 34 | }, 35 | "editable": true, 36 | "gnetId": null, 37 | "graphTooltip": 1, 38 | "hideControls": false, 39 | "id": null, 40 | "links": [], 41 | "refresh": "5s", 42 | "rows": [ 43 | { 44 | "collapse": false, 45 | "height": "250px", 46 | "panels": [ 47 | { 48 | "aliasColors": {}, 49 | "bars": false, 50 | "datasource": "${DS_INFLUXDB}", 51 | "fill": 0, 52 | "id": 1, 53 | "legend": { 54 | "alignAsTable": true, 55 | "avg": false, 56 | "current": true, 57 | "max": false, 58 | "min": false, 59 | "rightSide": true, 60 | "show": true, 61 | "sort": "current", 62 | "sortDesc": true, 63 | "total": false, 64 | "values": true 65 | }, 66 | "lines": false, 67 | "linewidth": 1, 68 | "links": [], 69 | "nullPointMode": "connected", 70 | "percentage": false, 71 | "pointradius": 1, 72 | "points": true, 73 | "renderer": "flot", 74 | "seriesOverrides": [], 75 | "span": 12, 76 | "stack": false, 77 | "steppedLine": false, 78 | "targets": [ 79 | { 80 | "alias": "$tag_instance($tag_type_instance)", 81 | "dsType": "influxdb", 82 | "groupBy": [ 83 | { 84 | "params": [ 85 | "5s" 86 | ], 87 | "type": "time" 88 | }, 89 | { 90 | "params": [ 91 | "instance" 92 | ], 93 | "type": "tag" 94 | }, 95 | { 96 | "params": [ 97 | "type_instance" 98 | ], 99 | "type": "tag" 100 | } 101 | ], 102 | "measurement": "cpu_value", 103 | "policy": "default", 104 | "query": "SELECT mean(\"value\") FROM \"cpu_value\" WHERE \"host\" =~ /^$hsotname$/ AND \"type_instance\" = 'system' OR \"type_instance\" = 'user' AND \"type\" = 'percent' AND $timeFilter GROUP BY time(5s), \"instance\"", 105 | "rawQuery": false, 106 | "refId": "A", 107 | "resultFormat": "time_series", 108 | "select": [ 109 | [ 110 | { 111 | "params": [ 112 | "value" 113 | ], 114 | "type": "field" 115 | }, 116 | { 117 | "params": [], 118 | "type": "mean" 119 | } 120 | ] 121 | ], 122 | "tags": [ 123 | { 124 | "key": "host", 125 | "operator": "=~", 126 | "value": "/^$hsotname$/" 127 | }, 128 | { 129 | "condition": "AND", 130 | "key": "type", 131 | "operator": "=", 132 | "value": "percent" 133 | }, 134 | { 135 | "condition": "AND", 136 | "key": "type_instance", 137 | "operator": "=", 138 | "value": "user" 139 | } 140 | ] 141 | } 142 | ], 143 | "thresholds": [], 144 | "timeFrom": null, 145 | "timeShift": null, 146 | "title": "CPU Utilization % (User)", 147 | "tooltip": { 148 | "shared": true, 149 | "sort": 2, 150 | "value_type": "individual" 151 | }, 152 | "type": "graph", 153 | "xaxis": { 154 | "mode": "time", 155 | "name": null, 156 | "show": true, 157 | "values": [] 158 | }, 159 | "yaxes": [ 160 | { 161 | "format": "short", 162 | "label": null, 163 | "logBase": 1, 164 | "max": "100", 165 | "min": "0", 166 | "show": true 167 | }, 168 | { 169 | "format": "short", 170 | "label": null, 171 | "logBase": 1, 172 | "max": null, 173 | "min": null, 174 | "show": true 175 | } 176 | ] 177 | } 178 | ], 179 | "repeat": null, 180 | "repeatIteration": null, 181 | "repeatRowId": null, 182 | "showTitle": false, 183 | "title": "Dashboard Row", 184 | "titleSize": "h6" 185 | }, 186 | { 187 | "collapse": false, 188 | "height": 250, 189 | "panels": [ 190 | { 191 | "aliasColors": {}, 192 | "bars": false, 193 | "datasource": "${DS_INFLUXDB}", 194 | "fill": 0, 195 | "id": 2, 196 | "legend": { 197 | "alignAsTable": true, 198 | "avg": false, 199 | "current": true, 200 | "max": false, 201 | "min": false, 202 | "rightSide": true, 203 | "show": true, 204 | "sort": "current", 205 | "sortDesc": true, 206 | "total": false, 207 | "values": true 208 | }, 209 | "lines": false, 210 | "linewidth": 1, 211 | "links": [], 212 | "nullPointMode": "connected", 213 | "percentage": false, 214 | "pointradius": 1, 215 | "points": true, 216 | "renderer": "flot", 217 | "seriesOverrides": [], 218 | "span": 12, 219 | "stack": false, 220 | "steppedLine": false, 221 | "targets": [ 222 | { 223 | "alias": "$tag_instance($tag_type_instance)", 224 | "dsType": "influxdb", 225 | "groupBy": [ 226 | { 227 | "params": [ 228 | "5s" 229 | ], 230 | "type": "time" 231 | }, 232 | { 233 | "params": [ 234 | "instance" 235 | ], 236 | "type": "tag" 237 | }, 238 | { 239 | "params": [ 240 | "type_instance" 241 | ], 242 | "type": "tag" 243 | } 244 | ], 245 | "measurement": "cpu_value", 246 | "policy": "default", 247 | "query": "SELECT mean(\"value\") FROM \"cpu_value\" WHERE \"host\" =~ /^$hsotname$/ AND \"type_instance\" = 'user' AND \"type\" = 'percent' AND $timeFilter GROUP BY time(5s), \"instance\"", 248 | "rawQuery": false, 249 | "refId": "A", 250 | "resultFormat": "time_series", 251 | "select": [ 252 | [ 253 | { 254 | "params": [ 255 | "value" 256 | ], 257 | "type": "field" 258 | }, 259 | { 260 | "params": [], 261 | "type": "mean" 262 | } 263 | ] 264 | ], 265 | "tags": [ 266 | { 267 | "key": "host", 268 | "operator": "=~", 269 | "value": "/^$hsotname$/" 270 | }, 271 | { 272 | "condition": "AND", 273 | "key": "type", 274 | "operator": "=", 275 | "value": "percent" 276 | }, 277 | { 278 | "condition": "AND", 279 | "key": "type_instance", 280 | "operator": "=", 281 | "value": "system" 282 | } 283 | ] 284 | } 285 | ], 286 | "thresholds": [], 287 | "timeFrom": null, 288 | "timeShift": null, 289 | "title": "CPU Utilization % (System)", 290 | "tooltip": { 291 | "shared": true, 292 | "sort": 2, 293 | "value_type": "individual" 294 | }, 295 | "type": "graph", 296 | "xaxis": { 297 | "mode": "time", 298 | "name": null, 299 | "show": true, 300 | "values": [] 301 | }, 302 | "yaxes": [ 303 | { 304 | "format": "short", 305 | "label": null, 306 | "logBase": 1, 307 | "max": "100", 308 | "min": "0", 309 | "show": true 310 | }, 311 | { 312 | "format": "short", 313 | "label": null, 314 | "logBase": 1, 315 | "max": null, 316 | "min": null, 317 | "show": true 318 | } 319 | ] 320 | } 321 | ], 322 | "repeat": null, 323 | "repeatIteration": null, 324 | "repeatRowId": null, 325 | "showTitle": false, 326 | "title": "Dashboard Row", 327 | "titleSize": "h6" 328 | }, 329 | { 330 | "collapse": false, 331 | "height": 250, 332 | "panels": [ 333 | { 334 | "aliasColors": {}, 335 | "bars": false, 336 | "datasource": "${DS_INFLUXDB}", 337 | "fill": 1, 338 | "id": 3, 339 | "legend": { 340 | "alignAsTable": true, 341 | "avg": false, 342 | "current": true, 343 | "max": false, 344 | "min": false, 345 | "rightSide": true, 346 | "show": true, 347 | "sort": "current", 348 | "sortDesc": true, 349 | "total": false, 350 | "values": true 351 | }, 352 | "lines": false, 353 | "linewidth": 1, 354 | "links": [], 355 | "nullPointMode": "connected", 356 | "percentage": false, 357 | "pointradius": 1, 358 | "points": true, 359 | "renderer": "flot", 360 | "seriesOverrides": [], 361 | "span": 12, 362 | "stack": false, 363 | "steppedLine": false, 364 | "targets": [ 365 | { 366 | "alias": "$tag_instance($tag_type_instance)", 367 | "dsType": "influxdb", 368 | "groupBy": [ 369 | { 370 | "params": [ 371 | "5s" 372 | ], 373 | "type": "time" 374 | }, 375 | { 376 | "params": [ 377 | "type_instance" 378 | ], 379 | "type": "tag" 380 | }, 381 | { 382 | "params": [ 383 | "instance" 384 | ], 385 | "type": "tag" 386 | } 387 | ], 388 | "measurement": "cpu_value", 389 | "policy": "default", 390 | "refId": "A", 391 | "resultFormat": "time_series", 392 | "select": [ 393 | [ 394 | { 395 | "params": [ 396 | "value" 397 | ], 398 | "type": "field" 399 | }, 400 | { 401 | "params": [], 402 | "type": "mean" 403 | } 404 | ] 405 | ], 406 | "tags": [ 407 | { 408 | "key": "type", 409 | "operator": "=", 410 | "value": "percent" 411 | }, 412 | { 413 | "condition": "AND", 414 | "key": "type_instance", 415 | "operator": "=", 416 | "value": "softirq" 417 | }, 418 | { 419 | "condition": "AND", 420 | "key": "host", 421 | "operator": "=~", 422 | "value": "/^$hsotname$/" 423 | } 424 | ] 425 | } 426 | ], 427 | "thresholds": [], 428 | "timeFrom": null, 429 | "timeShift": null, 430 | "title": "CPU Utilization % (Softirq)", 431 | "tooltip": { 432 | "shared": true, 433 | "sort": 2, 434 | "value_type": "individual" 435 | }, 436 | "type": "graph", 437 | "xaxis": { 438 | "mode": "time", 439 | "name": null, 440 | "show": true, 441 | "values": [] 442 | }, 443 | "yaxes": [ 444 | { 445 | "format": "short", 446 | "label": null, 447 | "logBase": 1, 448 | "max": "100", 449 | "min": "0", 450 | "show": true 451 | }, 452 | { 453 | "format": "short", 454 | "label": null, 455 | "logBase": 1, 456 | "max": null, 457 | "min": null, 458 | "show": true 459 | } 460 | ] 461 | } 462 | ], 463 | "repeat": null, 464 | "repeatIteration": null, 465 | "repeatRowId": null, 466 | "showTitle": false, 467 | "title": "Dashboard Row", 468 | "titleSize": "h6" 469 | } 470 | ], 471 | "schemaVersion": 14, 472 | "style": "dark", 473 | "tags": [], 474 | "templating": { 475 | "list": [ 476 | { 477 | "allValue": null, 478 | "current": {}, 479 | "datasource": "${DS_INFLUXDB}", 480 | "hide": 0, 481 | "includeAll": false, 482 | "label": "Host", 483 | "multi": false, 484 | "name": "hsotname", 485 | "options": [], 486 | "query": "SHOW TAG VALUES WITH KEY = \"host\"", 487 | "refresh": 1, 488 | "regex": "", 489 | "sort": 0, 490 | "tagValuesQuery": "", 491 | "tags": [], 492 | "tagsQuery": "", 493 | "type": "query", 494 | "useTags": false 495 | } 496 | ] 497 | }, 498 | "time": { 499 | "from": "now-15m", 500 | "to": "now" 501 | }, 502 | "timepicker": { 503 | "refresh_intervals": [ 504 | "5s", 505 | "10s", 506 | "30s", 507 | "1m", 508 | "5m", 509 | "15m", 510 | "30m", 511 | "1h", 512 | "2h", 513 | "1d" 514 | ], 515 | "time_options": [ 516 | "5m", 517 | "15m", 518 | "1h", 519 | "6h", 520 | "12h", 521 | "24h", 522 | "2d", 523 | "7d", 524 | "30d" 525 | ] 526 | }, 527 | "timezone": "browser", 528 | "title": "Core Server Metrics by Core", 529 | "version": 26 530 | } -------------------------------------------------------------------------------- /influxdb/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM phusion/baseimage:0.9.19 2 | MAINTAINER Steven Schneider 3 | 4 | RUN apt-get update &&\ 5 | apt-get -y upgrade 6 | 7 | RUN https://dl.influxdata.com/influxdb/releases/influxdb_1.3.6_amd64.deb 8 | RUN dpkg -i influxdb_1.3.6_amd64.deb 9 | 10 | RUN mkdir -p /opt/collectd/share/collectd 11 | RUN curl -o /opt/collectd/share/collectd/types.db https://raw.githubusercontent.com/collectd/collectd/master/src/types.db 12 | 13 | RUN apt-get update &&\ 14 | apt-get install -y influxdb 15 | 16 | ADD influxdb.conf /etc/influxdb/influxdb-template.conf 17 | ADD types.db.mssql /opt/collectd/share/collectd/types.db.mssql 18 | 19 | ENV INFLUXDB_DATA_DIRECTORY /host/influxdb 20 | ENV INFLUXDB_META_DATA_DIRECTORY /host/influxdb 21 | ENV INFLUXDB_WAL_DATA_DIRECTORY /host/influxdb 22 | ENV INFLUXDB_HH_DATA_DIRECTORY /host/influxdb 23 | 24 | ENV INFLUXDB_COLLECTD_LISTEN_PORT 25826 25 | 26 | RUN mkdir -p /etc/service/influxdb 27 | ADD run-influxdb.sh /etc/service/influxdb/run 28 | RUN chmod +x /etc/service/influxdb/run 29 | 30 | ENV HOME /root 31 | CMD ["/sbin/my_init"] 32 | -------------------------------------------------------------------------------- /influxdb/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 scschneider 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 | -------------------------------------------------------------------------------- /influxdb/influxdb.conf: -------------------------------------------------------------------------------- 1 | ### Welcome to the InfluxDB configuration file. 2 | 3 | # The values in this file override the default values used by the system if 4 | # a config option is not specified. The commented out lines are the the configuration 5 | # field and the default value used. Uncommentting a line and changing the value 6 | # will change the value used at runtime when the process is restarted. 7 | 8 | # Once every 24 hours InfluxDB will report usage data to usage.influxdata.com 9 | # The data includes a random ID, os, arch, version, the number of series and other 10 | # usage data. No data from user databases is ever transmitted. 11 | # Change this option to true to disable reporting. 12 | # reporting-disabled = false 13 | 14 | # we'll try to get the hostname automatically, but if it the os returns something 15 | # that isn't resolvable by other servers in the cluster, use this option to 16 | # manually set the hostname 17 | # hostname = "localhost" 18 | 19 | ### 20 | ### [meta] 21 | ### 22 | ### Controls the parameters for the Raft consensus group that stores metadata 23 | ### about the InfluxDB cluster. 24 | ### 25 | 26 | [meta] 27 | # Where the metadata/raft database is stored 28 | dir = "##INFLUXDB_META_DATA_DIRECTORY##" 29 | 30 | # Automatically create a default retention policy when creating a database. 31 | # retention-autocreate = true 32 | 33 | # If log messages are printed for the meta service 34 | # logging-enabled = true 35 | 36 | ### 37 | ### [data] 38 | ### 39 | ### Controls where the actual shard data for InfluxDB lives and how it is 40 | ### flushed from the WAL. "dir" may need to be changed to a suitable place 41 | ### for your system, but the WAL settings are an advanced configuration. The 42 | ### defaults should work for most systems. 43 | ### 44 | 45 | [data] 46 | # The directory where the TSM storage engine stores TSM files. 47 | dir = "##INFLUXDB_DATA_DIRECTORY##" 48 | 49 | # The directory where the TSM storage engine stores WAL files. 50 | wal-dir = "##INFLUXDB_WAL_DATA_DIRECTORY##" 51 | 52 | # Trace logging provides more verbose output around the tsm engine. Turning 53 | # this on can provide more useful output for debugging tsm engine issues. 54 | # trace-logging-enabled = false 55 | 56 | # Whether queries should be logged before execution. Very useful for troubleshooting, but will 57 | # log any sensitive data contained within a query. 58 | # query-log-enabled = true 59 | 60 | # Settings for the TSM engine 61 | 62 | # CacheMaxMemorySize is the maximum size a shard's cache can 63 | # reach before it starts rejecting writes. 64 | # cache-max-memory-size = 1048576000 65 | 66 | # CacheSnapshotMemorySize is the size at which the engine will 67 | # snapshot the cache and write it to a TSM file, freeing up memory 68 | # cache-snapshot-memory-size = 26214400 69 | 70 | # CacheSnapshotWriteColdDuration is the length of time at 71 | # which the engine will snapshot the cache and write it to 72 | # a new TSM file if the shard hasn't received writes or deletes 73 | # cache-snapshot-write-cold-duration = "10m" 74 | 75 | # CompactFullWriteColdDuration is the duration at which the engine 76 | # will compact all TSM files in a shard if it hasn't received a 77 | # write or delete 78 | # compact-full-write-cold-duration = "4h" 79 | 80 | # The maximum series allowed per database before writes are dropped. This limit can prevent 81 | # high cardinality issues at the database level. This limit can be disabled by setting it to 82 | # 0. 83 | # max-series-per-database = 1000000 84 | 85 | # The maximum number of tag values per tag that are allowed before writes are dropped. This limit 86 | # can prevent high cardinality tag values from being written to a measurement. This limit can be 87 | # disabled by setting it to 0. 88 | # max-values-per-tag = 100000 89 | 90 | ### 91 | ### [coordinator] 92 | ### 93 | ### Controls the clustering service configuration. 94 | ### 95 | 96 | [coordinator] 97 | # The default time a write request will wait until a "timeout" error is returned to the caller. 98 | # write-timeout = "10s" 99 | 100 | # The maximum number of concurrent queries allowed to be executing at one time. If a query is 101 | # executed and exceeds this limit, an error is returned to the caller. This limit can be disabled 102 | # by setting it to 0. 103 | # max-concurrent-queries = 0 104 | 105 | # The maximum time a query will is allowed to execute before being killed by the system. This limit 106 | # can help prevent run away queries. Setting the value to 0 disables the limit. 107 | # query-timeout = "0s" 108 | 109 | # The the time threshold when a query will be logged as a slow query. This limit can be set to help 110 | # discover slow or resource intensive queries. Setting the value to 0 disables the slow query logging. 111 | # log-queries-after = "0s" 112 | 113 | # The maximum number of points a SELECT can process. A value of 0 will make the maximum 114 | # point count unlimited. 115 | # max-select-point = 0 116 | 117 | # The maximum number of series a SELECT can run. A value of 0 will make the maximum series 118 | # count unlimited. 119 | 120 | # The maximum number of series a SELECT can run. A value of zero will make the maximum series 121 | # count unlimited. 122 | # max-select-series = 0 123 | 124 | # The maxium number of group by time bucket a SELECt can create. A value of zero will max the maximum 125 | # number of buckets unlimited. 126 | # max-select-buckets = 0 127 | 128 | ### 129 | ### [retention] 130 | ### 131 | ### Controls the enforcement of retention policies for evicting old data. 132 | ### 133 | 134 | [retention] 135 | # Determines whether retention policy enforcment enabled. 136 | # enabled = true 137 | 138 | # The interval of time when retention policy enforcement checks run. 139 | # check-interval = "30m" 140 | 141 | ### 142 | ### [shard-precreation] 143 | ### 144 | ### Controls the precreation of shards, so they are available before data arrives. 145 | ### Only shards that, after creation, will have both a start- and end-time in the 146 | ### future, will ever be created. Shards are never precreated that would be wholly 147 | ### or partially in the past. 148 | 149 | [shard-precreation] 150 | # Determines whether shard pre-creation service is enabled. 151 | # enabled = true 152 | 153 | # The interval of time when the check to pre-create new shards runs. 154 | # check-interval = "10m" 155 | 156 | # The default period ahead of the endtime of a shard group that its successor 157 | # group is created. 158 | # advance-period = "30m" 159 | 160 | ### 161 | ### Controls the system self-monitoring, statistics and diagnostics. 162 | ### 163 | ### The internal database for monitoring data is created automatically if 164 | ### if it does not already exist. The target retention within this database 165 | ### is called 'monitor' and is also created with a retention period of 7 days 166 | ### and a replication factor of 1, if it does not exist. In all cases the 167 | ### this retention policy is configured as the default for the database. 168 | 169 | [monitor] 170 | # Whether to record statistics internally. 171 | # store-enabled = true 172 | 173 | # The destination database for recorded statistics 174 | # store-database = "_internal" 175 | 176 | # The interval at which to record statistics 177 | # store-interval = "10s" 178 | 179 | ### 180 | ### [admin] 181 | ### 182 | ### Controls the availability of the built-in, web-based admin interface. If HTTPS is 183 | ### enabled for the admin interface, HTTPS must also be enabled on the [http] service. 184 | ### 185 | ### NOTE: This interface is deprecated as of 1.1.0 and will be removed in a future release. 186 | 187 | [admin] 188 | # Determines whether the admin service is enabled. 189 | # enabled = false 190 | 191 | # The default bind address used by the admin service. 192 | # bind-address = ":8083" 193 | 194 | # Whether the admin service should use HTTPS. 195 | # https-enabled = false 196 | 197 | # The SSL certificate used when HTTPS is enabled. 198 | # https-certificate = "/etc/ssl/influxdb.pem" 199 | 200 | ### 201 | ### [http] 202 | ### 203 | ### Controls how the HTTP endpoints are configured. These are the primary 204 | ### mechanism for getting data into and out of InfluxDB. 205 | ### 206 | 207 | [http] 208 | # Determines whether HTTP endpoint is enabled. 209 | enabled = true 210 | 211 | # The bind address used by the HTTP service. 212 | bind-address = ":8086" 213 | 214 | # Determines whether HTTP authentication is enabled. 215 | auth-enabled = false 216 | 217 | # The default realm sent back when issuing a basic auth challenge. 218 | # realm = "InfluxDB" 219 | 220 | # Determines whether HTTP request logging is enable.d 221 | log-enabled = true 222 | 223 | # Determines whether detailed write logging is enabled. 224 | # write-tracing = false 225 | 226 | # Determines whether the pprof endpoint is enabled. This endpoint is used for 227 | # troubleshooting and monitoring. 228 | # pprof-enabled = true 229 | 230 | # Determines whether HTTPS is enabled. 231 | # https-enabled = false 232 | 233 | # The SSL certificate to use when HTTPS is enabled. 234 | # https-certificate = "/etc/ssl/influxdb.pem" 235 | 236 | # Use a separate private key location. 237 | # https-private-key = "" 238 | 239 | # The JWT auth shared secret to validate requests using JSON web tokens. 240 | # shared-sercret = "" 241 | 242 | # The default chunk size for result sets that should be chunked. 243 | # max-row-limit = 0 244 | 245 | # The maximum number of HTTP connections that may be open at once. New connections that 246 | # would exceed this limit are dropped. Setting this value to 0 disables the limit. 247 | # max-connection-limit = 0 248 | 249 | # Enable http service over unix domain socket 250 | # unix-socket-enabled = false 251 | 252 | # The path of the unix domain socket. 253 | # bind-socket = "/var/run/influxdb.sock" 254 | 255 | ### 256 | ### [subscriber] 257 | ### 258 | ### Controls the subscriptions, which can be used to fork a copy of all data 259 | ### received by the InfluxDB host. 260 | ### 261 | 262 | [subscriber] 263 | # Determines whether the subscriber service is enabled. 264 | # enabled = true 265 | 266 | # The default timeout for HTTP writes to subscribers. 267 | # http-timeout = "30s" 268 | 269 | # Allows insecure HTTPS connections to subscribers. This is useful when testing with self- 270 | # signed certificates. 271 | # insecure-skip-verify = false 272 | 273 | # The path to the PEM encoded CA certs file. If the empty string, the default system certs will be used 274 | # ca-certs = "" 275 | 276 | # The number of writer goroutines processing the write channel. 277 | # write-concurrency = 40 278 | 279 | # The number of in-flight writes buffered in the write channel. 280 | # write-buffer-size = 1000 281 | 282 | 283 | ### 284 | ### [[graphite]] 285 | ### 286 | ### Controls one or many listeners for Graphite data. 287 | ### 288 | 289 | [[graphite]] 290 | # Determines whether the graphite endpoint is enabled. 291 | # enabled = false 292 | # database = "graphite" 293 | # retention-policy = "" 294 | # bind-address = ":2003" 295 | # protocol = "tcp" 296 | # consistency-level = "one" 297 | 298 | # These next lines control how batching works. You should have this enabled 299 | # otherwise you could get dropped metrics or poor performance. Batching 300 | # will buffer points in memory if you have many coming in. 301 | 302 | # Flush if this many points get buffered 303 | # batch-size = 5000 304 | 305 | # number of batches that may be pending in memory 306 | # batch-pending = 10 307 | 308 | # Flush at least this often even if we haven't hit buffer limit 309 | # batch-timeout = "1s" 310 | 311 | # UDP Read buffer size, 0 means OS default. UDP listener will fail if set above OS max. 312 | # udp-read-buffer = 0 313 | 314 | ### This string joins multiple matching 'measurement' values providing more control over the final measurement name. 315 | # separator = "." 316 | 317 | ### Default tags that will be added to all metrics. These can be overridden at the template level 318 | ### or by tags extracted from metric 319 | # tags = ["region=us-east", "zone=1c"] 320 | 321 | ### Each template line requires a template pattern. It can have an optional 322 | ### filter before the template and separated by spaces. It can also have optional extra 323 | ### tags following the template. Multiple tags should be separated by commas and no spaces 324 | ### similar to the line protocol format. There can be only one default template. 325 | # templates = [ 326 | # "*.app env.service.resource.measurement", 327 | # # Default template 328 | # "server.*", 329 | # ] 330 | 331 | ### 332 | ### [collectd] 333 | ### 334 | ### Controls one or many listeners for collectd data. 335 | ### 336 | 337 | [[collectd]] 338 | enabled = true 339 | bind-address = ":##INFLUXDB_COLLECTD_LISTEN_PORT##" 340 | database = "collectd_db" 341 | # retention-policy = "" 342 | # 343 | # The collectd service supports either scanning a directory for multiple types 344 | # db files, or specifying a single db file. 345 | typesdb = "/opt/collectd/share/collectd/" 346 | # 347 | # security-level = "none" 348 | # auth-file = "/etc/collectd/auth_file" 349 | 350 | # These next lines control how batching works. You should have this enabled 351 | # otherwise you could get dropped metrics or poor performance. Batching 352 | # will buffer points in memory if you have many coming in. 353 | 354 | # Flush if this many points get buffered 355 | # batch-size = 5000 356 | 357 | # Number of batches that may be pending in memory 358 | # batch-pending = 10 359 | 360 | # Flush at least this often even if we haven't hit buffer limit 361 | # batch-timeout = "10s" 362 | 363 | # UDP Read buffer size, 0 means OS default. UDP listener will fail if set above OS max. 364 | # read-buffer = 0 365 | 366 | ### 367 | ### [opentsdb] 368 | ### 369 | ### Controls one or many listeners for OpenTSDB data. 370 | ### 371 | 372 | [[opentsdb]] 373 | # enabled = false 374 | # bind-address = ":4242" 375 | # database = "opentsdb" 376 | # retention-policy = "" 377 | # consistency-level = "one" 378 | # tls-enabled = false 379 | # certificate= "/etc/ssl/influxdb.pem" 380 | 381 | # Log an error for every malformed point. 382 | # log-point-errors = true 383 | 384 | # These next lines control how batching works. You should have this enabled 385 | # otherwise you could get dropped metrics or poor performance. Only points 386 | # metrics received over the telnet protocol undergo batching. 387 | 388 | # Flush if this many points get buffered 389 | # batch-size = 1000 390 | 391 | # Number of batches that may be pending in memory 392 | # batch-pending = 5 393 | 394 | # Flush at least this often even if we haven't hit buffer limit 395 | # batch-timeout = "1s" 396 | 397 | ### 398 | ### [[udp]] 399 | ### 400 | ### Controls the listeners for InfluxDB line protocol data via UDP. 401 | ### 402 | 403 | [[udp]] 404 | # enabled = false 405 | # bind-address = ":8089" 406 | # database = "udp" 407 | # retention-policy = "" 408 | 409 | # These next lines control how batching works. You should have this enabled 410 | # otherwise you could get dropped metrics or poor performance. Batching 411 | # will buffer points in memory if you have many coming in. 412 | 413 | # Flush if this many points get buffered 414 | # batch-size = 5000 415 | 416 | # Number of batches that may be pending in memory 417 | # batch-pending = 10 418 | 419 | # Will flush at least this often even if we haven't hit buffer limit 420 | # batch-timeout = "1s" 421 | 422 | # UDP Read buffer size, 0 means OS default. UDP listener will fail if set above OS max. 423 | # read-buffer = 0 424 | 425 | ### 426 | ### [continuous_queries] 427 | ### 428 | ### Controls how continuous queries are run within InfluxDB. 429 | ### 430 | 431 | [continuous_queries] 432 | # Determiens whether the continuous query service is enabled. 433 | # enabled = true 434 | 435 | # Controls whether queries are logged when executed by the CQ service. 436 | # log-enabled = true 437 | 438 | # interval for how often continuous queries will be checked if they need to run 439 | # run-interval = "1s" 440 | -------------------------------------------------------------------------------- /influxdb/run-influxdb.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cp /etc/influxdb/influxdb-template.conf /etc/influxdb/influxdb.conf 4 | sed -i'' -e "s@##INFLUXDB_DATA_DIRECTORY##@${INFLUXDB_DATA_DIRECTORY}@" /etc/influxdb/influxdb.conf 5 | sed -i'' -e "s@##INFLUXDB_META_DATA_DIRECTORY##@${INFLUXDB_META_DATA_DIRECTORY}@" /etc/influxdb/influxdb.conf 6 | sed -i'' -e "s@##INFLUXDB_WAL_DATA_DIRECTORY##@${INFLUXDB_WAL_DATA_DIRECTORY}@" /etc/influxdb/influxdb.conf 7 | sed -i'' -e "s@##INFLUXDB_HH_DATA_DIRECTORY##@${INFLUXDB_HH_DATA_DIRECTORY}@" /etc/influxdb/influxdb.conf 8 | sed -i'' -e "s@##INFLUXDB_COLLECTD_LISTEN_PORT##@${INFLUXDB_COLLECTD_LISTEN_PORT}@" /etc/influxdb/influxdb.conf 9 | 10 | influxd -config /etc/influxdb/influxdb.conf -------------------------------------------------------------------------------- /influxdb/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # By default, this will run without modification, but if you want to change where the data directory gets mapped, you can do that here 4 | # Make sure this folder exists on the host. 5 | # This directory from the host gets passed through to the docker container. 6 | INFLUXDB_HOST_DIRECTORY="/mnt/influxdb" 7 | 8 | # This is where the mapped host directory get mapped to in the docker container. 9 | INFLUXDB_GUEST_DIRECTORY="/host/influxdb" 10 | 11 | # This is where the InfluxDB directories gets mapped in the container. 12 | INFLUXDB_DATA_DIRECTORY="/host/influxdb/data/db" 13 | INFLUXDB_META_DATA_DIRECTORY="/host/influxdb/data/meta" 14 | INFLUXDB_WAL_DATA_DIRECTORY="/host/influxdb/wal/wal" 15 | INFLUXDB_HH_DATA_DIRECTORY="/host/influxdb/data/hh" 16 | 17 | # The port that InfluxDB is listening for collectd metrics. 18 | INFLUXDB_COLLECTD_LISTEN_PORT="25826" 19 | 20 | sudo docker run -d --net=host -v $INFLUXDB_HOST_DIRECTORY:$INFLUXDB_GUEST_DIRECTORY:rw \ 21 | -e "INFLUXDB_DATA_DIRECTORY=$INFLUXDB_DATA_DIRECTORY" \ 22 | -e "INFLUXDB_META_DATA_DIRECTORY=$INFLUXDB_META_DATA_DIRECTORY" \ 23 | -e "INFLUXDB_WAL_DATA_DIRECTORY=$INFLUXDB_WAL_DATA_DIRECTORY" \ 24 | -e "INFLUXDB_HH_DATA_DIRECTORY=$INFLUXDB_HH_DATA_DIRECTORY" \ 25 | -e "INFLUXDB_COLLECTD_LISTEN_PORT=$INFLUXDB_COLLECTD_LISTEN_PORT" \ 26 | --name influxdb microsoft/mssql-monitoring-influxdb:latest 27 | -------------------------------------------------------------------------------- /influxdb/types.db.mssql: -------------------------------------------------------------------------------- 1 | sql_server_perf_stats perf_stats_value:GAUGE:0:U 2 | sql_server_wait_stats wait_time_ms:DERIVE:0:U, waiting_tasks_count:DERIVE:0:U, max_wait_time_ms:GAUGE:0:U 3 | -------------------------------------------------------------------------------- /media/core_cpu_metrics.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/mssql-monitoring/0c600ef2bc771d275d0b2aa9cb4e22ef5b0a0351/media/core_cpu_metrics.PNG -------------------------------------------------------------------------------- /media/core_server_metrics.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/mssql-monitoring/0c600ef2bc771d275d0b2aa9cb4e22ef5b0a0351/media/core_server_metrics.png -------------------------------------------------------------------------------- /media/core_sql_metrics.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/mssql-monitoring/0c600ef2bc771d275d0b2aa9cb4e22ef5b0a0351/media/core_sql_metrics.png -------------------------------------------------------------------------------- /media/solution_diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/mssql-monitoring/0c600ef2bc771d275d0b2aa9cb4e22ef5b0a0351/media/solution_diagram.png --------------------------------------------------------------------------------