Log Analysis in Azure
- Setup:
- Create a Windows Server (With Os diagnostics enabled)
- Create a Linux Server (With Os diagnostics enabled)
- Create a Database
Configuring diagnostic settings on resources
- Two kinds of diagnostic logs are available in Azure Monitor
- Tenant Logs:
- These logs consits of all the tenent-level services that exist outside Azure Subscription. Example: Azure Active Directory Logs
- Resource Logs: These logs consists of data from resources deployed in Azure Subscription Eg: Virtual Machine, SQL Server
- Tenant Logs:
- Enabling diagnostic settings
- VM: Navigate to Monitoring and Diagnostic Settings and enble guest-level monitoring
- Linux VM Guest Level Diagnostic Details

- Windows VM Guest Level Diagnostic Details

- Enable Diagnostic setting for other resources as well
- Now wait for atleast 20 mins before some logs appear and now we can analyze the logs by using queries Refer Here for docs on KQL (Kusto Query Language)
- Creating alert from log query Refer Here
