There may be a need for an automated notification mechanism to detect ESXi hosts or nodes that remain in maintenance mode for an extended duration (for example, longer than two weeks).
In VMware Aria Operations, there is no direct "days in maintenance" metric. Instead, the "Maintenance State" property must be monitored using Wait Cycles to track the duration of the state.
VCF Operations 9.x
Aria Operations 8.18.x
Aria Operations treats Maintenance Mode as a static property (System|Maintenance State). To alert on the duration of a static property, the system must count consecutive collection cycles where the condition remains true.
The symptom definition handles the logic for the 2-week timer.
Navigate to Configure > Alerts > Symptom Definitions.
Click Add and select Object Type: Host System.
Under Property, search for and select: System|Maintenance State.
Set the Condition to Is Equal to and choose In Maintenance (Value: 1).
Set the Wait Cycle to 4032.
Calculation: 14 days = 20,160 minutes. At a 5-minute collection interval, $20,160 \div 5 = 4,032$ cycles.
Assign a Severity (e.g., Warning) and name it: Host in Maintenance > 14 Days.
Go to Configure > Alerts > Alert Definitions.
Click Add and name the alert (e.g., Stale Maintenance Mode Alert).
Set Base Object Type to Host System.
Drag the symptom Host in Maintenance > 14 Days into the Symptoms workspace.
In the Policies step, ensure the alert is enabled for the active policy.
Go to Configure > Alerts > Notifications.
Click Add.
Select Method: Email (Requires pre-configured SMTP in Outbound Settings).
Under Alert Definition, select Stale Maintenance Mode Alert.
Add recipients and save.
Additionally, You may not be able to see created or available Notification Rules in Aria Ops UI. Corruption in existing Notification Rules can prevent the Notification list from loading in the UI, requiring manual cleanup.
If the Notification list fails to display in the UI due to a corrupt rule:
Identify the problematic rule (often the most recently modified or one with null values in the database).
Manually delete the corrupt Notification Rule to restore UI functionality.