Fix forwarded records and offline state in sqlserver input (#4730)

This commit is contained in:
Tracy Boggiano 2018-09-21 15:18:27 -04:00 committed by Daniel Nelson
parent 3349b53905
commit adf2668c1d
1 changed files with 17 additions and 17 deletions

View File

@ -469,7 +469,7 @@ FROM (
SUM( CASE WHEN state = 2 THEN 1 ELSE 0 END ) AS db_recovering, SUM( CASE WHEN state = 2 THEN 1 ELSE 0 END ) AS db_recovering,
SUM( CASE WHEN state = 3 THEN 1 ELSE 0 END ) AS db_recoveryPending, SUM( CASE WHEN state = 3 THEN 1 ELSE 0 END ) AS db_recoveryPending,
SUM( CASE WHEN state = 4 THEN 1 ELSE 0 END ) AS db_suspect, SUM( CASE WHEN state = 4 THEN 1 ELSE 0 END ) AS db_suspect,
SUM( CASE WHEN state = 10 THEN 1 ELSE 0 END ) AS db_offline SUM( CASE WHEN state = 6 or state = 10 THEN 1 ELSE 0 END ) AS db_offline
FROM sys.databases FROM sys.databases
) AS dbs ) AS dbs
CROSS APPLY ( CROSS APPLY (
@ -571,7 +571,7 @@ WHERE (
'Disk Write IO Throttled/sec', 'Disk Write IO Throttled/sec',
'Disk Write IO/sec', 'Disk Write IO/sec',
'Used memory (KB)', 'Used memory (KB)',
'Forwarded Recs/sec', 'Forwarded Records/sec',
'Background Writer pages/sec', 'Background Writer pages/sec',
'Percent Log Used' 'Percent Log Used'
) )