Forum Discussion
Getting SQL query performance into log analytics
Have you tried adding some SQL Perf counters?
https://techcommunity.microsoft.com/t5/azure-log-analytics/sql-cluster-performance-counters/m-p/882432#M2017
- PatrikHanssonApr 02, 2020Brass Contributor
Yea, but I'm not sure how perf counters are going to be able to give me a list of which queries are using most cpu.
I'm coming from the SCOM side of monitoring an there i would probably been able to write my own ManagementPack to run on the agent on the sql server and get the data from T-SQL but with azure monitor/Log analytics I'm at a loss on how to do it.
- CliveWatsonApr 02, 2020Silver Contributor
These may give you some ideas: https://docs.microsoft.com/en-us/azure/azure-monitor/insights/sql-assessment
and https://argonsys.com/microsoft-cloud/library/azure-log-analytics-oms-agent-now-collects-sql-server-audit-logs/- PatrikHanssonApr 02, 2020Brass Contributor
Hi, thanks for taking the time to answer.
I'v activated the SQL health check but it doesn't seem to collect what i'm looking for.
And the auditing is for security related if i remember correctly. And for that i would have to collect the whole Application event log.
So im still hunting for a solution 🙂