SOLVED

SQL cluster performance counters

%3CLINGO-SUB%20id%3D%22lingo-sub-882432%22%20slang%3D%22en-US%22%3ESQL%20cluster%20performance%20counters%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-882432%22%20slang%3D%22en-US%22%3E%3CP%3EGood%20morning%20everyone%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOur%20organization%20is%20nearly%20done%20with%20our%20migration%20from%20SCOM%20to%20Azure%20Monitor--it's%20been%20quite%20a%20ride.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI've%20run%20into%20a%20challenge%20that%20I%20can't%20seem%20to%20find%20an%20answer%20for.%20We%20have%20some%20on-premise%20SQL%20clusters%20that%20we've%20added%20the%20MMA%20to%20and%20moved%20to%20Azure%20Monitor.%20However%2C%20they%20do%20not%20appear%20to%20be%20pulling%20SQL%20performance%20counters.%20I%20suspect%20this%20is%20due%20to%20the%20virtual%20nature%20of%20the%20SQL%20cluster%3A%3CBR%20%2F%3E%3CBR%20%2F%3ESQL%20Server%20name%20%3D%20SERVERV001%3CBR%20%2F%3EPhysical%20nodes%20%3D%20SERVERP001a%20and%20SERVERP002a%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESince%20the%20virtual%20name--SERVERV001--is%20not%20added%20to%20Log%20Analytics%2C%20I%20have%20to%20rely%20on%20the%20physical%20nodes--SERVERP001a%20and%20SERVERP002a--to%20view%20performance%20counters--except%20SQL%20counters.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHow%20does%20one%20circumvent%20this%20issue%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20in%20advance!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-882432%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%20Log%20Analytics%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMicrosoft%20Monitoring%20Agent%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Eperformance%20counters%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-882623%22%20slang%3D%22en-US%22%3ERe%3A%20SQL%20cluster%20performance%20counters%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-882623%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F151992%22%20target%3D%22_blank%22%3E%40Scott%20Allison%3C%2FA%3E%26nbsp%3B%26nbsp%3BNot%20Sure%20if%20this%20is%20feasible%20yet%20since%20I%20have%20read%20somewhere%20this%20is%20not%20supported%20yet.%3C%2FP%3E%3CP%3EHowever%20I%20am%20book%20marking%20this%20thread%20for%20further%20information.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-882682%22%20slang%3D%22en-US%22%3ERe%3A%20SQL%20cluster%20performance%20counters%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-882682%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F151992%22%20target%3D%22_blank%22%3E%40Scott%20Allison%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%20and%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F184511%22%20target%3D%22_blank%22%3E%40Gourav%20Kumar%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EDid%20you%20try%20adding%20any%20of%20the%20SQL%20Perf%20counters%20into%20Log%20Analytics%20%3F%3C%2FP%3E%0A%3CDIV%20id%3D%22tinyMceEditorclipboard_image_0%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F134130i5719C5EE47741D4B%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22Annotation%202019-09-30%20154728.jpg%22%20title%3D%22Annotation%202019-09-30%20154728.jpg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-882712%22%20slang%3D%22en-US%22%3ERe%3A%20SQL%20cluster%20performance%20counters%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-882712%22%20slang%3D%22en-US%22%3ENaturally%20%3A)%3C%2Fimg%3E%3CBR%20%2F%3E%3CBR%20%2F%3EI'm%20getting%20the%20configured%20SQL%20counters%20for%20all%20SQL%20servers%20except%20for%20the%20clusters%20(though%20I'm%20not%20yet%20entirely%20sure%20if%20that%20includes%20ALL%20clusters).%20The%20SQL%20counters%20include%3A%3CBR%20%2F%3E%3CBR%20%2F%3ESQLAgent%3AAlerts%20Activated%20alerts%3CBR%20%2F%3ESQLAgent%3AJobs%20Failed%20jobs%3CBR%20%2F%3ESQLAgent%3AStatistics%20SQL%20Server%20restarted%3CBR%20%2F%3ESQLSERVER%3AAccess%20Methods%20Forwarded%20Records%2Fsec%3CBR%20%2F%3ESQLSERVER%3AAccess%20Methods%20Full%20Scans%2Fsec%3CBR%20%2F%3ESQLSERVER%3AAccess%20Methods%20Index%20Searches%2Fsec%3CBR%20%2F%3ESQLSERVER%3ABuffer%20Manager%20Lazy%20writes%2Fsec%3CBR%20%2F%3ESQLSERVER%3ABuffer%20Manager%20Page%20Writes%2Fsec%3CBR%20%2F%3ESQLSERVER%3ABuffer%20Manager%20Page%20life%20expectancy%3CBR%20%2F%3ESQLSERVER%3ABuffer%20Manager%20Page%20lookups%2Fsec%3CBR%20%2F%3ESQLSERVER%3ABuffer%20Manager%20Page%20reads%2Fsec%3CBR%20%2F%3ESQLSERVER%3ABuffer%20Manager%20Total%20pages%3CBR%20%2F%3ESQLSERVER%3ADatabases%20Active%20Transactions%3CBR%20%2F%3ESQLSERVER%3ADatabases%20Backup%2FRestore%20Throughput%2Fsec%3CBR%20%2F%3ESQLSERVER%3ADatabases%20Data%20File(s)%20Size%20(KB)%3CBR%20%2F%3ESQLSERVER%3ADatabases%20Log%20File(s)%20Size%20(KB)%3CBR%20%2F%3ESQLSERVER%3ADatabases%20Log%20Flush%20Wait%20Time%3CBR%20%2F%3ESQLSERVER%3ADatabases%20Log%20Flush%20Waits%2Fsec%3CBR%20%2F%3ESQLSERVER%3ADatabases%20Log%20Flushes%2Fsec%3CBR%20%2F%3ESQLSERVER%3ADatabases%20Log%20Growths%3CBR%20%2F%3ESQLSERVER%3ADatabases%20Percent%20Log%20Used%3CBR%20%2F%3ESQLSERVER%3ADatabases%20Transactions%2Fsec%3CBR%20%2F%3ESQLSERVER%3AGeneral%20Statistics%20User%20Connections%3CBR%20%2F%3ESQLSERVER%3ALatches%20Average%20Latch%20Wait%20Time%20(ms)%3CBR%20%2F%3ESQLSERVER%3ALatches%20Latch%20Waits%2Fsec%3CBR%20%2F%3ESQLSERVER%3ALatches%20Total%20Latch%20Wait%20Time%20(ms)%3CBR%20%2F%3ESQLSERVER%3ALocks%20Lock%20Timeouts%2Fsec%3CBR%20%2F%3ESQLSERVER%3ALocks%20Lock%20Waits%2Fsec%3CBR%20%2F%3ESQLSERVER%3ALocks%20Number%20of%20Deadlocks%2Fsec%3CBR%20%2F%3ESQLSERVER%3AMemory%20Manager%20Memory%20Grants%20Pending%3CBR%20%2F%3ESQLSERVER%3AMemory%20Manager%20Target%20Server%20Memory%20(KB)%3CBR%20%2F%3ESQLSERVER%3AMemory%20Manager%20Total%20Server%20Memory%20(KB)%3CBR%20%2F%3ESQLSERVER%3ASQL%20Statistics%20Batch%20Requests%2Fsec%3CBR%20%2F%3ESQLSERVER%3ASQL%20Statistics%20SQL%20Compilations%2Fsec%3CBR%20%2F%3ESQLSERVER%3ASQL%20Statistics%20SQL%20Re-Compilations%2Fsec%3CBR%20%2F%3ESQLServer%3AAccess%20Methods%20Table%20Lock%20Escalations%2Fsec%3CBR%20%2F%3ESQLServer%3AExec%20Statistics%20Distributed%20Query%3CBR%20%2F%3ESQLServer%3ALocks%20Number%20of%20Deadlocks%2Fsec%3CBR%20%2F%3ESQLServer%3ASSIS%20Pipeline%2013.0%20Buffers%20spooled%3CBR%20%2F%3ESQLServer%3ASSIS%20Pipeline%2013.0%20Rows%20read%3CBR%20%2F%3ESQLServer%3ASSIS%20Pipeline%2013.0%20Rows%20written%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-891480%22%20slang%3D%22en-US%22%3ERe%3A%20SQL%20cluster%20performance%20counters%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-891480%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F151992%22%20target%3D%22_blank%22%3E%40Scott%20Allison%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESql%20is%20poorly%20designed%20when%20it%20comes%20to%20performance%20counters.%20Basically%20when%20you%20have%20SQL%20cluster%20you%20have%20to%20use%20named%20instance%20if%20I%20remember.%20Every%20named%20instance%20creates%20its%20own%20set%20of%20counters%20on%20the%20servers.%3C%2FP%3E%0A%3CP%3EFor%20example%20SQLSERVER%3AAccess%20Methods%20becomes%20MSSQL%24%3CINSTANCE%20name%3D%22%22%3E%3AAccess%20Methods%3C%2FINSTANCE%3E%3C%2FP%3E%0A%3CP%3Ewhat%20you%20can%20do%20is%20to%20add%20the%20object%20name%20as%20MSSQL%24*%3AAccess%20Methods%20that%20way%20it%20will%20get%20the%20counter%20no%20matter%20what%20the%20name%20is%20of%20instance.%20so%20your%20end%20entry%20will%20be%20something%20like%20MSSQL%24*%3AAccess%20Methods(*)%5CForwarded%20Records%2Fsec%3C%2FP%3E%0A%3CP%3Eyou%20get%20the%20idea%20for%20the%20rest%20of%20the%20counters.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-893601%22%20slang%3D%22en-US%22%3ERe%3A%20SQL%20cluster%20performance%20counters%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-893601%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F9172%22%20target%3D%22_blank%22%3E%40Stanislav%20Zhelyazkov%3C%2FA%3E%26nbsp%3BThat's%20no%20fun%20from%20a%20Log%20Analytics%20standpoint%2C%20but%20I%20get%20it.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOK%20thanks!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-893615%22%20slang%3D%22en-US%22%3ERe%3A%20SQL%20cluster%20performance%20counters%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-893615%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F151992%22%20target%3D%22_blank%22%3E%40Scott%20Allison%3C%2FA%3E%20Yeah.%20It%20is%20more%20of%20SQL%20problem%20because%20there%20are%20similar%20problems%20when%20you%20deploy%20other%20services%20like%20reporting%20or%20integration%20services.%20Just%20bad%20architecture%20of%20their%20part.%20Thankfully%20LA%20data%20sources%20allows%20using%20wildcard%20as%20*%20to%20avoid%20adding%20counters%20per%20instance%20name.%20Not%20many%20people%20know%20that%20and%20I%20haven't%20blogged%20about%20it.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Frequent Contributor

Good morning everyone,

 

Our organization is nearly done with our migration from SCOM to Azure Monitor--it's been quite a ride. 

 

I've run into a challenge that I can't seem to find an answer for. We have some on-premise SQL clusters that we've added the MMA to and moved to Azure Monitor. However, they do not appear to be pulling SQL performance counters. I suspect this is due to the virtual nature of the SQL cluster:

SQL Server name = SERVERV001
Physical nodes = SERVERP001a and SERVERP002a

 

Since the virtual name--SERVERV001--is not added to Log Analytics, I have to rely on the physical nodes--SERVERP001a and SERVERP002a--to view performance counters--except SQL counters.

 

How does one circumvent this issue?

 

Thanks in advance!

6 Replies

@Scott Allison  Not Sure if this is feasible yet since I have read somewhere this is not supported yet.

However I am book marking this thread for further information.

@Scott Allison  and @GouravIN 

 

Did you try adding any of the SQL Perf counters into Log Analytics ?

 

Annotation 2019-09-30 154728.jpg

Naturally :)

I'm getting the configured SQL counters for all SQL servers except for the clusters (though I'm not yet entirely sure if that includes ALL clusters). The SQL counters include:

SQLAgent:Alerts Activated alerts
SQLAgent:Jobs Failed jobs
SQLAgent:Statistics SQL Server restarted
SQLSERVER:Access Methods Forwarded Records/sec
SQLSERVER:Access Methods Full Scans/sec
SQLSERVER:Access Methods Index Searches/sec
SQLSERVER:Buffer Manager Lazy writes/sec
SQLSERVER:Buffer Manager Page Writes/sec
SQLSERVER:Buffer Manager Page life expectancy
SQLSERVER:Buffer Manager Page lookups/sec
SQLSERVER:Buffer Manager Page reads/sec
SQLSERVER:Buffer Manager Total pages
SQLSERVER:Databases Active Transactions
SQLSERVER:Databases Backup/Restore Throughput/sec
SQLSERVER:Databases Data File(s) Size (KB)
SQLSERVER:Databases Log File(s) Size (KB)
SQLSERVER:Databases Log Flush Wait Time
SQLSERVER:Databases Log Flush Waits/sec
SQLSERVER:Databases Log Flushes/sec
SQLSERVER:Databases Log Growths
SQLSERVER:Databases Percent Log Used
SQLSERVER:Databases Transactions/sec
SQLSERVER:General Statistics User Connections
SQLSERVER:Latches Average Latch Wait Time (ms)
SQLSERVER:Latches Latch Waits/sec
SQLSERVER:Latches Total Latch Wait Time (ms)
SQLSERVER:Locks Lock Timeouts/sec
SQLSERVER:Locks Lock Waits/sec
SQLSERVER:Locks Number of Deadlocks/sec
SQLSERVER:Memory Manager Memory Grants Pending
SQLSERVER:Memory Manager Target Server Memory (KB)
SQLSERVER:Memory Manager Total Server Memory (KB)
SQLSERVER:SQL Statistics Batch Requests/sec
SQLSERVER:SQL Statistics SQL Compilations/sec
SQLSERVER:SQL Statistics SQL Re-Compilations/sec
SQLServer:Access Methods Table Lock Escalations/sec
SQLServer:Exec Statistics Distributed Query
SQLServer:Locks Number of Deadlocks/sec
SQLServer:SSIS Pipeline 13.0 Buffers spooled
SQLServer:SSIS Pipeline 13.0 Rows read
SQLServer:SSIS Pipeline 13.0 Rows written

best response confirmed by Scott Allison (Frequent Contributor)
Solution

@Scott Allison 

Sql is poorly designed when it comes to performance counters. Basically when you have SQL cluster you have to use named instance if I remember. Every named instance creates its own set of counters on the servers.

For example SQLSERVER:Access Methods becomes MSSQL$<instance name>:Access Methods

what you can do is to add the object name as MSSQL$*:Access Methods that way it will get the counter no matter what the name is of instance. so your end entry will be something like MSSQL$*:Access Methods(*)\Forwarded Records/sec

you get the idea for the rest of the counters.

@Stanislav Zhelyazkov That's no fun from a Log Analytics standpoint, but I get it. 

 

OK thanks!

@Scott Allison Yeah. It is more of SQL problem because there are similar problems when you deploy other services like reporting or integration services. Just bad architecture of their part. Thankfully LA data sources allows using wildcard as * to avoid adding counters per instance name. Not many people know that and I haven't blogged about it.