'azure monitor to alert on low space on /root , /var and /etc
I have Azure Linux VMs for which i want to configure Azure-Monitor Alerts when my /root,/etc and /var volumes are more than 90% utilized. Please suggest way to achieve this.
Solution 1:[1]
- If you wanted to get the used or free space on a disc mounted on
rootbut not on the total instance
Perf
| where ( ObjectName == "Logical Disk" )`
| where ( CounterName == "% Used Space" )`
| where ( InstanceName == "/" )`
| summarize AggregatedValue= avg(CounterValue) by Computer, bin(TimeGenerated, 30s)`
Perf
| where ( ObjectName == "Logical Disk" )`
| where ( CounterName == "% Free Space" )`
| where ( InstanceName == "/" )`
| summarize AggregatedValue= avg(CounterValue) by Computer, bin(TimeGenerated, 30s)`
You can use the below method listed below to configure monitoring alerts and set queries:
Go to Azure Portal -> Your Log Analytics workspace ->
Logstile -> Test the query in query window -> Click on+New alert rule-> Click on your condition name -> Configurealert logicandEvaluated based onsections -> ClickDone-> ConfigureActionsandAlert rule detailssections -> Clickcreate alert rule.In Windows and Linux, performance counters offer information about the performance of hardware components, operating systems, and applications. In addition to aggregating performance data for longer-term analysis and reporting, Azure Monitor may gather performance counters from Log Analytics agents at frequent intervals for Near Real Time (NRT) analysis.
Please refer Configuring Performance counters for more information
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | HarshithaVeeramalla-MT |
