Forum Discussion
azure portal logging - no results found
Hello, I am still trying to get log information from some of the sample queries in log analytics. Here is what I have done so far:
Server: server1.database.windows.net (NOT a vm)
database within server: db1
1. Within server1.db1: built a diagnostic settings instance
a. had my IT department define a storage account workspace and connected that workspace to diagnostic settings.
b had my IT department define a log analytics workspace and connected that workspace to diagnostic settings
c. Within diagnostic settings I clicked on the following to be logged:
(under 'log')
- SQLInsights
- AutomaticTuning
- QueryStoreRuntimeStatistics
- QueryStoreWaitStatistics
- Errors (the purpose of this effort)
- DatabaseWaitStatistics
- Timeouts
- Blocks
- Deadlocks
(under 'metric')
- basic
- InstanceAndAppAdvanced
- Workload Management
2. Then in the loganalytics workspace I downloaded and installed Windows Agent (64 bit). This automatically connected my machine to the workspace
3. Also within the loganalytics workspace I ensured that Under Azure Storage my storagte account was connected.
(I have NOT yet connected any Data sources (options include Windows Event Logs, Windows Performance Counters, IIS Logs among other options)
So when I go back to server1.db1.logs and click on any of the sample queries I get the message
NO RESULTS FOUND (0 records matched)
Also, my IT department gave me: monitoring contributor permission.
Any insights/comments welcomed. Thank you!
- JK_UKJun 18, 2020Brass Contributor
On the Log Analytics Workspace, what happens if you run the following:
AzureDiagnostics| where LogicalServerName_s contains 'server1'- MarkStebenJun 18, 2020Copper Contributor
JK_UK When I run this query I do get records - 2,763 to be exact.
Here is the first row. madevsql01 is the actual server name. adscheduler is the database name on this particular record. Many different categories, including DatabaseWaitStatistics, QueryStoreRuntimeStatistics to name two.
6/18/2020, 9:58:09.753 AM /SUBSCRIPTIONS/E1F843CE-5BAC-42BD-B3C2-A9EA02672DAB/RESOURCEGROUPS/OTTOBASE-CAMPAIGNS/PROVIDERS/MICROSOFT.SQL/SERVERS/MADEVSQL01/DATABASES/ADSCHEDULER DatabaseWaitStatistics OTTOBASE-CAMPAIGNS e1f843ce-5bac-42bd-b3c2-a9ea02672dab MICROSOFT.SQL ADSCHEDULER SERVERS/DATABASES DatabaseWaitStatistcsEvent madevsql01 AdScheduler - JK_UKJun 18, 2020Brass Contributor
MarkSteben ok, so your resource(s) are sending logs to the AzureDiagnostics table on Log analytics.
What else are you expecting to see ?