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

Copper 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
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.

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

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.