Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates to SQL Server Plugin, better Azure Managed Instance support + more #4642

Merged
merged 8 commits into from
Sep 12, 2018
Prev Previous commit
Removing some extra spaces, added a note about Azure Managed Instance…
…s to the README.
  • Loading branch information
m82labs committed Sep 11, 2018
commit 8baad37aa3873e274aef939fb7f87471e72ee40d
15 changes: 12 additions & 3 deletions plugins/inputs/sqlserver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,17 @@ The new (version 2) metrics provide:
- *TempDB*: Free space, Version store usage, Active temp tables, temp table creation rate, + more
- *Resource Governor*: CPU Usage, Requests/sec, Queued Requests, and Blocked tasks per workload group + more
- *Server properties*: Number of databases in all possible states (online, offline, suspect, etc.), cpu count, physical memory, SQL Server service uptime, and SQL Server version
- *Wait stats*: Wait time in ms, number of waiting tasks, resource wait time, signal wait time, max wait time in ms, wait type, and wait category. The waits are categorized using the sasme categories used in Query Store.
- *Wait stats*: Wait time in ms, number of waiting tasks, resource wait time, signal wait time, max wait time in ms, wait type, and wait category. The waits are categorized using the same categories used in Query Store.
- *Azure Managed Instances*
- Stats from `sys.server_resource_stats`:
- cpu_count
- server_memory
- sku
- engine_edition
- hardware_type
- total_storage_mb
- available_storage_mb
- uptime

The following metrics can be used directly, with no delta calculations:
- SQLServer:Buffer Manager\Buffer cache hit ratio
Expand Down Expand Up @@ -129,5 +139,4 @@ The following metrics can be used directly, with no delta calculations:
- SQLServer:Workload Group Stats\Requests completed/sec

Version 2 queries have the following tags:
- `sql_instance`: Physical host and instance name (hostname:instance)

- `sql_instance`: Physical host and instance name (hostname:instance)
4 changes: 2 additions & 2 deletions plugins/inputs/sqlserver/sqlserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ const sqlServerPropertiesV2 = `DECLARE @sys_info TABLE (
uptime INT
)

IF OBJECT_ID('master.sys.dm_os_sys_info') IS NOT NULL
IF OBJECT_ID('master.sys.dm_os_sys_info') IS NOT NULL
BEGIN

IF SERVERPROPERTY('EngineEdition') = 8 -- Managed Instance
Expand Down Expand Up @@ -575,7 +575,7 @@ WHERE (
'Background Writer pages/sec',
'Percent Log Used'
)
) OR (
) OR (
object_name LIKE '%User Settable%'
OR object_name LIKE '%SQL Errors%'
) OR (
Expand Down