Can't get my Azure resources to get metrics into Log Analytics

%3CLINGO-SUB%20id%3D%22lingo-sub-126969%22%20slang%3D%22en-US%22%3ECan't%20get%20my%20Azure%20resources%20to%20get%20metrics%20into%20Log%20Analytics%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-126969%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20everyone%2C%20I'm%20very%20excited%20to%20join%20this%20community!%20%3A)%3C%2Fimg%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20regularly%20using%20Azure%20Monitor%20and%20I%20was%20looking%20into%20moving%20to%20Log%20Analytics%2C%20but%20I'm%20having%20some%20troubles.%20Here's%20a%20summary%20of%20what%20I've%20done%20so%20far%3A%3C%2FP%3E%3CUL%3E%3CLI%3ECreated%20a%20Log%20Analytics%20resource%20from%20my%20Azure%20Dashboard%3C%2FLI%3E%3CLI%3EWent%20to%20%22Workspace%20Data%20Sources%22%20%26gt%3B%20%22Azure%20Resources%22%20and%20tried%20to%20enable%20metrics%20collection%20for%20the%20App%20Service%20and%20Web%20App%20I%20got%20there%2C%20but%20it%20failed%20(with%20hindsight%2C%20I%20guess%20that%20was%20because%20the%20%22Microsoft.Insights%22%20resource%20provider%20was%20not%20registered%20in%20that%20subscription)%3C%2FLI%3E%3CLI%3EAdded%20the%20AzureWebAppAnalytics%20to%20my%20Log%20Analytics%20instance's%20Solutions%20and%20saw%20that%20I%20had%20to%20onboard%20my%20resources%20manually%20with%20a%20Powershell%20script%3C%2FLI%3E%3CLI%3EDid%20the%20%3CA%20href%3D%22https%3A%2F%2Fblogs.technet.microsoft.com%2Fmsoms%2F2017%2F01%2F17%2Fenable-azure-resource-metrics-logging-using-powershell%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3EPowershell%20%3C%2FA%3Ething%20-%20that's%20where%20I%20understood%20that%20I%20had%20to%20register%20the%20%22Microsoft.Insights%22%20resource%20provider%20first%2C%20so%20that's%20what%20I%20did%20and%20the%20Powershell%20script%20eventually%20succeeded%3C%2FLI%3E%3CLI%3EAfter%20that%2C%20I%20also%20managed%20to%20enable%20metrics%20collections%20from%20the%20%3CSPAN%3E%22Workspace%20Data%20Sources%22%20%26gt%3B%20%3C%2FSPAN%3E%22Azure%20Resources%22%20section%3C%2FLI%3E%3C%2FUL%3E%3CP%3EDespite%20that%2C%20and%20after%20~12%20hours%2C%20there's%20no%20data%20coming%20in.%20Log%20Search%20shows%20that%20the%20workspace%20is%20empty%2C%20and%20the%26nbsp%3B%3CSPAN%3EAzureWebAppAnalytics%20%3C%2FSPAN%3Estill%20says%20%22Performing%20Assessment%22.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECouple%20of%20thing%20I've%20noticed%3A%3C%2FP%3E%3CUL%3E%3CLI%3EThe%20%22M%3CSPAN%3Eicrosoft.OperationalInsights%3C%2FSPAN%3E%22%20resource%20provider%20is%20stuck%20in%20%22Registering%22%20state%20in%20that%20subscription%3B%20I've%20tried%20to%20re-register%20it%2C%20but%20it%20didn't%20change%20anything%3C%2FLI%3E%3CLI%3EWhen%20I%20went%20back%20to%20the%26nbsp%3B%3CSPAN%3E%22Workspace%20Data%20Sources%22%20%26gt%3B%20%22Azure%20Resources%22%20section%2C%20the%20log%20collections%20I%20had%20enabled%20were%20disabled%20again!%3C%2FSPAN%3E%3C%2FLI%3E%3C%2FUL%3E%3CP%3E%3CSPAN%3EI%20don't%20really%20know%20what%20to%20try%20next%20so%20your%20help%20would%20be%20greatly%20appreciated%20here%2C%20thanks%20in%20advance!%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EThomas%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-126969%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%20Log%20Analytics%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESolutions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-127115%22%20slang%3D%22en-US%22%3ERe%3A%20Can't%20get%20my%20Azure%20resources%20to%20get%20metrics%20into%20Log%20Analytics%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-127115%22%20slang%3D%22en-US%22%3EHi%20Thomas%2C%20You%20are%20correct%20that%20is%20the%20resource%20provider%20for%20Log%20Analytics.%20I%20am%20not%20sure%20why%20it%20is%20in%20registering%20phase%20but%20even%20in%20that%20phase%20you%20were%20still%20able%20to%20create%20a%20workspace.%20I%20would%20try%20the%20test%20with%20the%20storage%20account%20to%20see%20if%20there%20is%20really%20a%20problem%20while%20waiting%20for%20the%20support%20team.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-127107%22%20slang%3D%22en-US%22%3ERe%3A%20Can't%20get%20my%20Azure%20resources%20to%20get%20metrics%20into%20Log%20Analytics%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-127107%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Stanislav%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20for%20your%20reply.%20I%20think%20there's%20definitely%20something%20fishy%20with%20my%20subscription%20and%20as%20the%20%22%3CSPAN%3EM%3C%2FSPAN%3E%3CSPAN%3Eicrosoft.OperationalInsights%3C%2FSPAN%3E%22%20resource%20provider%20is%20still%20stuck%20in%20%22Registering%22%20state%2C%20I've%20open%20a%20ticket%20(I%20believe%20that's%20the%20resource%20provider%20for%20Log%20Analytics).%20I'll%26nbsp%3Bfollow%20up%20here%20once%20that%20thing%20is%20solved.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThomas%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-127104%22%20slang%3D%22en-US%22%3ERe%3A%20Can't%20get%20my%20Azure%20resources%20to%20get%20metrics%20into%20Log%20Analytics%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-127104%22%20slang%3D%22en-US%22%3EHi%2C%20Are%20you%20sure%20that%20logs%20are%20generated%20for%20these%20resources%3F%20The%20easiest%20way%20for%20sending%20logs%20for%20azure%20resource%20to%20Log%20Analytics%20is%20trough%20Azure%20Monitor%20blade.%20You%20would%20go%20into%20Diagnostics%20logs%20section.%20From%20there%20you%20can%20configure%20to%20send%20the%20logs%20to%20azure%20storage%2C%20event%20hub%20and%20Log%20Analytics.%20If%20you%20have%20some%20doubt%20that%20your%20Log%20Analytics%20Workspace%20is%20not%20working%20you%20could%20send%20the%20logs%20to%20both%20azure%20storage%20and%20Log%20Analytics.%20If%20logs%20are%20not%20saved%20in%20the%20azure%20storage%20as%20well%20it%20is%20not%20Log%20Analytics'%20fault%20than.%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

Hi everyone, I'm very excited to join this community! :)

 

I'm regularly using Azure Monitor and I was looking into moving to Log Analytics, but I'm having some troubles. Here's a summary of what I've done so far:

  • Created a Log Analytics resource from my Azure Dashboard
  • Went to "Workspace Data Sources" > "Azure Resources" and tried to enable metrics collection for the App Service and Web App I got there, but it failed (with hindsight, I guess that was because the "Microsoft.Insights" resource provider was not registered in that subscription)
  • Added the AzureWebAppAnalytics to my Log Analytics instance's Solutions and saw that I had to onboard my resources manually with a Powershell script
  • Did the Powershell thing - that's where I understood that I had to register the "Microsoft.Insights" resource provider first, so that's what I did and the Powershell script eventually succeeded
  • After that, I also managed to enable metrics collections from the "Workspace Data Sources" > "Azure Resources" section

Despite that, and after ~12 hours, there's no data coming in. Log Search shows that the workspace is empty, and the AzureWebAppAnalytics still says "Performing Assessment".

 

Couple of thing I've noticed:

  • The "Microsoft.OperationalInsights" resource provider is stuck in "Registering" state in that subscription; I've tried to re-register it, but it didn't change anything
  • When I went back to the "Workspace Data Sources" > "Azure Resources" section, the log collections I had enabled were disabled again!

I don't really know what to try next so your help would be greatly appreciated here, thanks in advance!

 

Thomas

3 Replies
Highlighted
Hi, Are you sure that logs are generated for these resources? The easiest way for sending logs for azure resource to Log Analytics is trough Azure Monitor blade. You would go into Diagnostics logs section. From there you can configure to send the logs to azure storage, event hub and Log Analytics. If you have some doubt that your Log Analytics Workspace is not working you could send the logs to both azure storage and Log Analytics. If logs are not saved in the azure storage as well it is not Log Analytics' fault than.
Highlighted

Hi Stanislav,

 

Thanks for your reply. I think there's definitely something fishy with my subscription and as the "Microsoft.OperationalInsights" resource provider is still stuck in "Registering" state, I've open a ticket (I believe that's the resource provider for Log Analytics). I'll follow up here once that thing is solved.

 

Thomas

Highlighted
Hi Thomas, You are correct that is the resource provider for Log Analytics. I am not sure why it is in registering phase but even in that phase you were still able to create a workspace. I would try the test with the storage account to see if there is really a problem while waiting for the support team.