Azure monitor metrics & Logs
- Application Monitoring Data
- Guest OS monitoring Data
- Resource Monitoring Data
- Subscription Monitoring Data
- Tenant Monitoring Data
Metrics
-
Metrics are collected at regular intervals & are identified by
- name
- timestamp
- value
-
Scenarios
- Analyzing
- Visualizing
- Alerting
- Automating
- Exporting
- Retrieving
- Archiving
-
Four Sources of Metrics
- Platform:
- Which we get without any configuration
- By default they are collected at one-minute frequency
- Guest OS
- To enable guest OS metrics for Windows Machine the Windows Diagnostic extension should be installed, For Linux machines the agents like Influx Data, Linux Diagnostics agent etc..
- These metrics are collected from OS of the Azure VM.
- Application:
- These metrics are created by Application Insights
- Custom Metrics:
- These metrics are that we define manually use Custom Metrics API Refer Here and here for API
- Platform:
-
Lets create a metric
- Navigate to Azure Monitor
- Lets create a metric around CPU Average (Select Scope at VM and select linux vm)
- Now login into linux vm and execute the following
sudo apt-get update sudo apt-get install stress -y- This stress tool can generate artificial load on our vm. Lets start stressing our system for 10 min using the following command
stress --cpu 8 --io 4 --vm 2 --vm-bytes 128M --timeout 10m- Create graphs for Percentage CPU and one more for Disk Read Operation/sec and write Operations/sec
- Navigate to Azure Monitor
-
Percentage CPU is at 100%, Don’t we need to inform concerned team about it and take the necessary action
-
How can i raise alerts and take necessary corrective actions (Automatically) to prevent application failures
