azure portal logging - no results found

%3CLINGO-SUB%20id%3D%22lingo-sub-1463710%22%20slang%3D%22en-US%22%3Eazure%20portal%20logging%20-%20no%20results%20found%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1463710%22%20slang%3D%22en-US%22%3E%3CP%3EHello%20-%20I%20am%20trying%20to%20access%20the%20azure%20logging%20facility%20for%20my%20servers%20for%20the%20first%20time.%26nbsp%3B%20Within%20the%20database%20I%20wish%20to%20post%20logs%20to%20and%20read%20logs%20from%20I%20have%20set%20up%20'diagnostic%20settings'.%20Within%20diagnostic%20settings%20I%20have%20initialized%20storage%20accounts%20and%20log%20analytics.%26nbsp%3B%20But%20so%20far%20When%20I%20go%20into%20the%20'logs'%20facility%20within%20that%20database%20I%20see%20'No%20results%20found'%20for%20any%20of%20the%20sample%20queries%20set%20up%20in%20log%20analytics.%26nbsp%3B%20It%20seems%20that%20nothing%20is%20being%20written%20to%20the%20logs%20yet.%20Is%20there%20something%20else%20I%20missed%20that%20I%20need%20to%20do%3F%26nbsp%3B%20We%20have%20created%20errors%20and%20run%20queries%20so%20I%20know%20there%20is%20activity%20on%20that%20database.%26nbsp%3B%20Any%20help%20appreciated.%26nbsp%3B%20Thank%20you.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1463710%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%20Log%20Analytics%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1467039%22%20slang%3D%22en-US%22%3ERe%3A%20azure%20portal%20logging%20-%20no%20results%20found%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1467039%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F699803%22%20target%3D%22_blank%22%3E%40MarkSteben%3C%2FA%3E%26nbsp%3BI'm%20not%20exactly%20sure%20what%20you%20mean%20but%20there%20is%20no%20option%20to%20enable%20Log%20Analytics%20from%20the%20diagnostics%20settings%20for%20your%20VMs.%20Diagnostics%20are%20used%20to%20send%20metrics%20to%20storage%20accounts.%3C%2FP%3E%3CP%3EYou%20need%20to%20install%20the%20OMS%20agent%20extension%20on%20your%20VM%20to%20send%20your%20logs%20to%20Log%20Analytics%20or%20look%20under%20your%20LA%20Workspace%20Adv%20Settings%20%2F%20Connected%20Sources%20%2F%20Windows%20%2F%20Linux%20for%20more%20info%20on%20installing%20the%20agent%20and%20the%20settings%20you'll%20need%20to%20use.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1467351%22%20slang%3D%22en-US%22%3ERe%3A%20azure%20portal%20logging%20-%20no%20results%20found%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1467351%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F452208%22%20target%3D%22_blank%22%3E%40JK_UK%3C%2FA%3E%26nbsp%3Bthank%20you%20for%20responding.%20I%20am%20sorry%20to%20infer%20that%20'my%20servers'%20referred%20to%20a%20VM.%26nbsp%3B%20These%20are%20native%20azure%20servers%20running%20azure%20sql%20server.%26nbsp%3B%20Does%20that%20change%20your%20answer%20re%2F%20installing%20the%20OEM%20agent%3F%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3EI%20will%20look%20at%20the%20advanced%20settings%20as%20you%20suggest.%26nbsp%3B%20Thanks%20again.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1471796%22%20slang%3D%22en-US%22%3ERe%3A%20azure%20portal%20logging%20-%20no%20results%20found%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1471796%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F699803%22%20target%3D%22_blank%22%3E%40MarkSteben%3C%2FA%3E%3C%2FP%3E%3CP%3EHello%2C%26nbsp%3B%20I%20am%20still%20trying%20to%20get%20log%20information%20from%20some%20of%20the%20sample%20queries%20in%20log%20analytics.%26nbsp%3B%20Here%20is%20what%20I%20have%20done%20so%20far%3A%3C%2FP%3E%3CP%3E%26nbsp%3BServer%3A%20server1.database.windows.net%20(NOT%20a%20vm)%3C%2FP%3E%3CP%3E%26nbsp%3Bdatabase%20within%20server%3A%26nbsp%3B%20db1%3C%2FP%3E%3CP%3E1.%20Within%20server1.db1%3A%26nbsp%3B%20built%20a%20diagnostic%20settings%20instance%3C%2FP%3E%3CP%3E%26nbsp%3B%20%26nbsp%3Ba.%20had%20my%20IT%20department%20define%20a%20storage%20account%20workspace%20and%20connected%20that%20workspace%20to%20diagnostic%20settings.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%20%26nbsp%3Bb%20had%20my%20IT%20department%20define%20a%20log%20analytics%20workspace%20and%20connected%20that%20workspace%20to%20diagnostic%20settings%3C%2FP%3E%3CP%3E%26nbsp%3B%20c.%20Within%20diagnostic%20settings%20I%20clicked%20on%20the%20following%20to%20be%20logged%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%20(under%20'log')%3C%2FP%3E%3CP%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B-%20SQLInsights%3C%2FP%3E%3CP%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B-%20AutomaticTuning%3C%2FP%3E%3CP%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B-%20QueryStoreRuntimeStatistics%3C%2FP%3E%3CP%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B-%20QueryStoreWaitStatistics%3C%2FP%3E%3CP%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B-%20Errors%20(the%20purpose%20of%20this%20effort)%3C%2FP%3E%3CP%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B-%20DatabaseWaitStatistics%3C%2FP%3E%3CP%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B-%20Timeouts%3C%2FP%3E%3CP%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B-%20Blocks%3C%2FP%3E%3CP%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B-%20Deadlocks%3C%2FP%3E%3CP%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B(under%20'metric')%3C%2FP%3E%3CP%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B-%20basic%3C%2FP%3E%3CP%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B-%20InstanceAndAppAdvanced%3C%2FP%3E%3CP%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B-%20Workload%20Management%3C%2FP%3E%3CP%3E2.%26nbsp%3B%20Then%20in%20the%20loganalytics%20workspace%20I%20downloaded%20and%20installed%20Windows%20Agent%20(64%20bit).%26nbsp%3B%20This%20automatically%20connected%20my%20machine%20to%20the%20workspace%3C%2FP%3E%3CP%3E3.%20Also%20within%20the%20loganalytics%20workspace%20I%20ensured%20that%20Under%20Azure%20Storage%20my%20storagte%20account%20was%20connected.%3C%2FP%3E%3CP%3E(I%20have%20NOT%20yet%20connected%20any%20Data%20sources%20(options%20include%20Windows%20Event%20Logs%2C%20Windows%20Performance%20Counters%2C%20IIS%20Logs%20among%20other%20options)%3C%2FP%3E%3CP%3ESo%20when%20I%20go%20back%20to%20server1.db1.logs%20and%20click%20on%20any%20of%20the%20sample%20queries%20I%20get%20the%20message%3C%2FP%3E%3CP%3E%26nbsp%3BNO%20RESULTS%20FOUND%20(0%20records%20matched)%3C%2FP%3E%3CP%3EAlso%2C%20my%20IT%20department%20gave%20me%3A%20monitoring%20contributor%20permission.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20insights%2Fcomments%20welcomed.%26nbsp%3B%20Thank%20you!%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1473259%22%20slang%3D%22en-US%22%3ERe%3A%20azure%20portal%20logging%20-%20no%20results%20found%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1473259%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F699803%22%20target%3D%22_blank%22%3E%40MarkSteben%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOn%20the%20Log%20Analytics%20Workspace%2C%20what%20happens%20if%20you%20run%20the%20following%3A%3C%2FP%3E%3CDIV%20class%3D%22line%20number2%20index1%20alt1%22%3E%3CDIV%3E%3CDIV%3E%3CSPAN%3EAzureDiagnostics%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%7C%20%3C%2FSPAN%3E%3CSPAN%3Ewhere%3C%2FSPAN%3E%3CSPAN%3E%20LogicalServerName_s%20%3C%2FSPAN%3E%3CSPAN%3Econtains%3C%2FSPAN%3E%20%3CSPAN%3E'server1'%3C%2FSPAN%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1473865%22%20slang%3D%22en-US%22%3ERe%3A%20azure%20portal%20logging%20-%20no%20results%20found%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1473865%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F452208%22%20target%3D%22_blank%22%3E%40JK_UK%3C%2FA%3E%26nbsp%3BWhen%20I%20run%20this%20query%20I%20do%20get%20records%20-%202%2C763%20to%20be%20exact.%3C%2FP%3E%3CP%3EHere%20is%20the%20first%20row.%26nbsp%3B%20madevsql01%20is%20the%20actual%20server%20name.%20adscheduler%20is%20the%20database%20name%20on%20this%20particular%20record.%20Many%20different%20categories%2C%20including%20DatabaseWaitStatistics%2C%20QueryStoreRuntimeStatistics%20to%20name%20two.%3C%2FP%3E%3CTABLE%3E%3CTBODY%3E%3CTR%3E%3CTD%3E6%2F18%2F2020%2C%209%3A58%3A09.753%20AM%3C%2FTD%3E%3CTD%3E%2FSUBSCRIPTIONS%2FE1F843CE-5BAC-42BD-B3C2-A9EA02672DAB%2FRESOURCEGROUPS%2FOTTOBASE-CAMPAIGNS%2FPROVIDERS%2FMICROSOFT.SQL%2FSERVERS%2FMADEVSQL01%2FDATABASES%2FADSCHEDULER%3C%2FTD%3E%3CTD%3EDatabaseWaitStatistics%3C%2FTD%3E%3CTD%3EOTTOBASE-CAMPAIGNS%3C%2FTD%3E%3CTD%3Ee1f843ce-5bac-42bd-b3c2-a9ea02672dab%3C%2FTD%3E%3CTD%3EMICROSOFT.SQL%3C%2FTD%3E%3CTD%3EADSCHEDULER%3C%2FTD%3E%3CTD%3ESERVERS%2FDATABASES%3C%2FTD%3E%3CTD%3EDatabaseWaitStatistcsEvent%3C%2FTD%3E%3CTD%3Emadevsql01%3C%2FTD%3E%3CTD%3E%26nbsp%3B%3C%2FTD%3E%3CTD%3EAdScheduler%3C%2FTD%3E%3C%2FTR%3E%3C%2FTBODY%3E%3C%2FTABLE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1473891%22%20slang%3D%22en-US%22%3ERe%3A%20azure%20portal%20logging%20-%20no%20results%20found%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1473891%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F699803%22%20target%3D%22_blank%22%3E%40MarkSteben%3C%2FA%3E%26nbsp%3Bok%2C%20so%20your%20resource(s)%20are%20sending%20logs%20to%20the%20AzureDiagnostics%20table%20on%20Log%20analytics.%3C%2FP%3E%3CP%3EWhat%20else%20are%20you%20expecting%20to%20see%20%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1474132%22%20slang%3D%22en-US%22%3ERe%3A%20azure%20portal%20logging%20-%20no%20results%20found%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1474132%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F452208%22%20target%3D%22_blank%22%3E%40JK_UK%3C%2FA%3E%26nbsp%3BI%20was%20trying%20to%20access%20error%20data%20through%20the%20sample%20queries%20in%20the%20logs%20facility%20within%20the%20particular%20database%20I%20am%20querying.%20But%20with%20your%20help%20I%20now%20know%20I%20can%20get%20that%20error%20data%20directly%20by%20querying%20the%20log%20analytics%20workspace%20specifically%20the%20Errors%20Category.%26nbsp%3B%20Don't%20yet%20know%20why%20I%20can't%20get%20that%20through%20the%20database%2Flogs%20facility%20but%20now%20at%20least%20I%20can%20get%20the%20data%20I%20was%20looking%20for.%26nbsp%3B%20Thank%20you%20for%20your%20help.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional Contributor

Hello - I am trying to access the azure logging facility for my servers for the first time.  Within the database I wish to post logs to and read logs from I have set up 'diagnostic settings'. Within diagnostic settings I have initialized storage accounts and log analytics.  But so far When I go into the 'logs' facility within that database I see 'No results found' for any of the sample queries set up in log analytics.  It seems that nothing is being written to the logs yet. Is there something else I missed that I need to do?  We have created errors and run queries so I know there is activity on that database.  Any help appreciated.  Thank you.

7 Replies
Highlighted

@MarkSteben I'm not exactly sure what you mean but there is no option to enable Log Analytics from the diagnostics settings for your VMs. Diagnostics are used to send metrics to storage accounts.

You need to install the OMS agent extension on your VM to send your logs to Log Analytics or look under your LA Workspace Adv Settings / Connected Sources / Windows / Linux for more info on installing the agent and the settings you'll need to use.

 

Highlighted

@JK_UK thank you for responding. I am sorry to infer that 'my servers' referred to a VM.  These are native azure servers running azure sql server.  Does that change your answer re/ installing the OEM agent?  

I will look at the advanced settings as you suggest.  Thanks again.

Highlighted

@MarkSteben

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!

  

Highlighted

@MarkSteben 

On the Log Analytics Workspace, what happens if you run the following:

AzureDiagnostics
| where LogicalServerName_s contains 'server1'
Highlighted

@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/ADSCHEDULERDatabaseWaitStatisticsOTTOBASE-CAMPAIGNSe1f843ce-5bac-42bd-b3c2-a9ea02672dabMICROSOFT.SQLADSCHEDULERSERVERS/DATABASESDatabaseWaitStatistcsEventmadevsql01 AdScheduler
Highlighted

@MarkSteben ok, so your resource(s) are sending logs to the AzureDiagnostics table on Log analytics.

What else are you expecting to see ?

Highlighted

@JK_UK I was trying to access error data through the sample queries in the logs facility within the particular database I am querying. But with your help I now know I can get that error data directly by querying the log analytics workspace specifically the Errors Category.  Don't yet know why I can't get that through the database/logs facility but now at least I can get the data I was looking for.  Thank you for your help.