1. Introduction
2. Purpose/Use Cases
Monitoring Azure Resources
Application Performance Monitoring (APM)
Log Analytics
Alerting and Notifications
Autoscaling and Capacity Planning
Security Monitoring
Insights and Analytics
3. What you can do with Azure Monitor
4. Try Azure Monitor
Navigate to the Azure portal and go to the "Monitor" section.
Click on "Service Health" or a similar option available.
In the Service Health dashboard, you can view the overall health status of Azure services, regions, and resource providers.
Check the service health advisories, incidents, and planned maintenance notifications to identify any ongoing or recent issues affecting Azure services.
Azure Service Health provides real-time updates, historical information, and recommended actions in case of service disruptions or outages.
By regularly monitoring the Azure Service Health dashboard, you can stay informed about the status of Azure services and quickly respond to any issues that may impact your applications or resources. (2) Accessing the Activity Log: To access the Activity Log and review the history of API calls in Azure, follow these steps:Go to the Azure portal and navigate to the "Monitor" section.
Click on "Activity Log" or a similar option available.
The Activity Log provides a comprehensive view of the operations performed within your Azure subscription.
You can filter and search for specific events based on the subscription, resource group, resource type, or time range.
Each event in the Activity Log includes information such as the operation type, resource, timestamp, and the identity responsible for the action.
Use the Activity Log to track changes, investigate issues, and audit activity within your Azure environment.
By reviewing the Activity Log, you can gain visibility into the activities performed on your Azure resources, track changes made by users or automation processes, and troubleshoot any unexpected behavior or errors.5. An example case for Azure monitor
az vm diagnostics set \
--resource-group RESOURCE_GROUP_NAME \
--vm-name VM_NAME \
--settings \
--protected-settings "{\"storageAccountName\":\"STORAGE_ACCOUNT_NAME\", \"storageAccountSasToken\":\"STORAGE_ACCOUNT_SAS_TOKEN\"}" \
--enabled true
Go to the Azure portal and navigate to your Virtual Machine. Under the "Monitoring" section, click on "Metrics." Here, you can select different performance metrics like CPU percentage, memory percentage, network in/out, etc. to visualize the VM's performance over time.
(3) Set up Alerts: We can set up alerts to be notified when specific performance thresholds are breached.
(4) Use Azure Application Insights for Application Monitoring (Optional): If your web application is running on the VM, you can integrate Azure Application Insights for application-specific monitoring. Follow the documentation to set up Application Insights in your application code.
Azure Monitor, along with Application Insights, provides a powerful end-to-end monitoring solution for your Azure Virtual Machine and the hosted application.
az monitor metrics alert create \
--resource-group RESOURCE_GROUP_NAME \
--name HighCPUAlert \
--condition "avg Percentage CPU > 80" \
--description "High CPU Usage Alert" \
--severity 3 \
--window-size 5m \
--evaluation-frequency 1m \
--action webhooks \
--webhook-properties "uri=https://your-webhook-url"