Monitor Azure VM Linux Mount Point Availablity

Copper Contributor

Hi Team,

 

Sorry if it's a very basic question.

Could you please suggest how can we monitor mounted disks on Azure VM for its availability?

 

In past especially in case of On-Prem setup, we've faced and issue where due to some changes or patches etc. the mounted disks go missing.

 

And hence want to monitor and setup alert for the same in case those are missing.

 

Could you please suggest if there's a way to do so, may be via some KQL using VM Insights or any other simpler solution?

 

Thanks.

2 Replies

@parekhravik 

 

This will need some work, but its a place to start from, its from a much larger query I did ages ago (so I hope its ok), it checks what drives you had mounted last week compared to this week  

InsightsMetrics
| where TimeGenerated between (startofweek(now(),-1) .. endofweek(now(),-1) )
| where Tags has "mountid" 
| parse Tags with * '":' diskLetter ':' *
| where strlen( diskLetter) == 2
| summarize setLastWeek=make_set(diskLetter) by Computer
|join 
(
    InsightsMetrics
    | where TimeGenerated between (startofweek(now()) .. endofweek(now()) )
    //| summarize min(TimeGenerated), max(TimeGenerated)
    | where Tags has "mountid" 
    | parse Tags with * '":' diskLetter ':' *
    | where strlen( diskLetter) == 2
    | summarize setThisWeek=make_set(diskLetter) by Computer
) on Computer
// now check is the two sets are the same, if not show 
| where tostring(setLastWeek) != tostring(setThisWeek)

 

@Clive_Watson 

Apologies for late response, I've been out.

 

Thank you for the suggestion. I'll try this out and update.