Logging and Log Analytics, Pretty confusing.

Copper Contributor

I code out a lot of Infrastructure as Code in Terraform for our customers so they can have well documented, reliable ways to stand up or recreate any portion or all of there Azure environment.  I want to use Log Analytics Workspaces to trigger alerts for my Azure Automation Accounts and to monitor my Windows servers.  It seems like there are 100 different things in Azure related to logging and diagnostics.  And I am not sure if they are related, or separate.  

 

When I create a server I see Insights, Alerts, Diagnostic Settings and Logs all under monitoring.  These seem to be related in some way to the extensions.  

 

I see things like:

Microsoft.Azure.Diagnostics.IaaSDiagnostics
Microsoft.EnterpriseCloud.Monitoring.MicrosoftMonitoringAgent
Microsoft.VisualStudio.Services.TeamServicesAgent
Microsoft.Compute.VMAccessAgent

 

I think I want to focus on Microsoft.Azure.Diagnostics.IaaSDiagnostics.  

 

Do I have to make a storage account for my logs to go to?  How do I get those to work with Log Analytics Workspace?  I have been able to get the server to show up under virtual machines, but even when I do Perf query, I don't get anything. Can someone help me single out the pieces I need to get the logging from my servers and Automation Account 

1 Reply

@integraDan

 

Lets break this down a little.  A workspace is created in a Resource Group  / Azure Region (ideally the same region as your Windows Servers).  The workspace is the storage (essentially it's a cloud database) for logs and other data types.

 

You then install the Microsoft Monitoring Agent (MMA) in your Server (Azure market place images have the extension built-in).  For non IaaS resources you typically use the Diagnostic blade to send logs to Storage, EventHubs or Log Analytics (so if you select Storage you will need a storage account), if you just select Log Analytics you can use your workspace. 

 

The agent (MMA) when installed or activated will send Heartbeat data to Log Analytics.  For any other data like Perf you have to go to the [Advanced Settings] in Log Analytics and select the Perf counters (or Event logs, Syslogs etc...) you wish to collect from any server with the MMA on it (its managed centrally).

Please read:   

Official docs: https://docs.microsoft.com/en-us/azure/azure-monitor/platform/design-logs-deployment

 

How to run a POC and design: https://techcommunity.microsoft.com/t5/Azure-Sentinel/Best-practices-for-designing-an-Azure-Sentinel...

 

----------------------------

 

Azure Monitor (the product group in Microsoft that runs Logging, Metrics, Alerts...) also has a Metrics technology alongside the Logs (it collects a subset of perf counters) that are stored on your behalf.  See Azure Monitor Metrics (in the diagram) - these don't require an agent if your servers are in Azure.