Forum Discussion
Oleg__D
Jan 08, 2021Copper Contributor
Machines availability on specific period of time
Hello, I am working on query where it should show the monthly availability according to buckets. But it should skip the maintenance days (which is the 4th weekend of the month) and calculate the res...
- Jan 11, 2021
Maybe this?
Heartbeat // last month | where TimeGenerated between ( startofmonth(now(),-1).. endofmonth(now(),-1) ) | where Computer contains "JBOX00" // find 4th week which is week "3" | extend maintSaturday_ = endofweek(startofmonth(now(),-1),3) -1d, maintSunday_ = endofweek(startofmonth(now(),-1),3) + 1d // exclude 4th week from data set | where TimeGenerated !between ( maintSaturday_ .. maintSunday_ ) | summarize heartbeat_per_hour=count() by bin(TimeGenerated, 1h), Computer | extend available_per_hour=iff(heartbeat_per_hour>0, true, false) | serialize | summarize total_available_hours=countif(available_per_hour==true), total_number_of_buckets = max(row_number()) by Computer, bin(TimeGenerated, 1d) | extend availability_rate=(total_available_hours-48)*100/total_number_of_buckets | project TimeGenerated, availability_rate | order by availability_rate desc | render timechart
CliveWatson
Microsoft
The Heartbeat table should get Agent data from Windows Server 2008R2 as well
Overview of the Azure monitoring agents - Azure Monitor | Microsoft Docs
For a cluster I don't think we have an identifier, so you would probably have to use a list in the query to count these, together
i.e
let includeClusterNodes = dynamic(["nodeA","nodeB","nodeC"]);
Oleg__D
Feb 17, 2021Copper Contributor
Hello CliveWatson, do you know what could be a reason why 2008 machines do not appear in table?