Anyone know of a command or PowerShell script to get the current failoverCount and lastFailover datetime in a Windows Failover Cluster? I have a 2-node cluster that doesn't automatically failover sometimes. The group is configured with the default values of max 1 failure every 6 hours. After reviewing the log files from
Get-ClusterLog I've seen a pattern:
When it works and successfuly does a failover to the other node, the log file will have:
- time since last failure is greater than failover period; resetting failoverCount to 0.
- Failing over group ME-AG, failoverCount 1, last time 2020/09/17-00:00:23.017.
When it fails and the cluster resources go down, the log file will have:
- Not failing over group ME-AG, failoverCount 2, failoverThresholdSetting 4294967295, lastFailover 1601/01/01-00:00:00.000
The lastFailover date being 410 years ago is probably because it's currently a null value.
Get-ClusterGroup ME-AG shows the values for
FailoverThreshold but I can't seem to dig out where WSFC is getting the values for failoverCount and lastFailover.