VMware ESXi and vSphere Cluster Management

VMware vSphere Alarm Actions Explained

Learn how vSphere alarm actions work, which objects support them, how state transitions and repeat settings control execution, and how to design safe automation.

A vSphere alarm is a vCenter-managed rule that monitors an inventory object or condition and changes state when configured criteria are met. An alarm action is the notification or operation performed when that alarm reaches or changes to a configured state.

Detection and response are separate decisions. The alarm definition detects a condition, such as datastore capacity crossing a threshold. Its action configuration determines what happens next, such as sending an email, sending an SNMP trap, or running a script. Actions are associated with state transitions—changes from one alarm state to another—not simply with a static state that remains unchanged.

What an Alarm Definition Contains

An alarm definition normally combines the monitored object, trigger or condition, thresholds where applicable, alarm states, and actions. In the vSphere Client, create or edit the definition for the intended inventory object, configure its condition, and then configure responses for each supported transition.

  1. Create or edit an alarm definition for the intended inventory object type.
  2. Define the trigger, condition, and associated thresholds where applicable.
  3. Open the action configuration area.
  4. For each supported transition, select an action or leave it with no action.
  5. Choose whether each action runs once or repeats.
  6. Configure email recipients, SNMP destinations, or command and script details.
  7. Test the behavior safely before applying it to production workloads.

Review alarms in vSphere and alarm trigger types for the condition side of alarm configuration.

Objects That Can Be Monitored

Alarm definitions can monitor these vCenter inventory object types:

Monitored object typePurpose or example conditionCommon action supportAdditional object-specific actions
Virtual machinesGuest availability, power, or resource conditionEmail, SNMP trap, command or script where supportedPower on, power off, suspend, reset, migrate
HostsHardware health, connectivity, capacity, or host stateEmail, SNMP trap, command or script where supportedMaintenance mode, standby, reboot, shutdown
ClustersCluster capacity, health, or configurationEmail, SNMP trap, command or script where supportedNone listed here
DatacentersAggregated inventory or availability conditionEmail, SNMP trap, command or script where supportedNone listed here
DatastoresCapacity, accessibility, or performance conditionEmail, SNMP trap, command or script where supportedNone listed here
Distributed switchesNetworking health or configuration conditionEmail, SNMP trap, command or script where supportedNone listed here
Distributed port groupsPort-group networking or configuration conditionEmail, SNMP trap, command or script where supportedNone listed here
Datastore clustersStorage-cluster capacity or placement conditionEmail, SNMP trap, command or script where supportedNone listed here
vCenter ServervCenter health or service conditionEmail, SNMP trap, command or script where supportedNone listed here

Exact action availability depends on the object type, alarm definition, and vSphere version. Select only actions presented as supported for the definition being edited.

Actions Available Across Alarm Types

Where supported by the alarm configuration, the following general-purpose actions can be selected for all listed alarm object types:

  • Email notification: sends a message to configured recipients.
  • SNMP trap notification: sends a Simple Network Management Protocol notification to a monitoring or management platform.
  • Run a command or script: starts an approved external operation for diagnostics or controlled remediation.
ActionAvailable for all listed alarm typesHost-specificVM-specificOperational impact
Email notificationYes, where supported by the definitionNoNoProvides visibility without changing workload state
SNMP trap notificationYes, where supported by the definitionNoNoForwards an event to external monitoring
Run commandYes, where supported by the definitionNoNoImpact depends on the script and its permissions
Enter or exit maintenance modeNoYesNoCan evacuate or stop workloads on a host
Enter or exit standby modeNoYesNoChanges host power availability
Reboot or shut down hostNoYesNoPotentially disruptive to multiple workloads
Power on, power off, suspend, reset, or migrate VMNoNoYesChanges VM availability, execution, or placement

Host-Specific Actions

Host alarms can support actions that change the operating state of an ESXi host:

  • Enter maintenance mode: places the host into a state used for maintenance, normally requiring workloads to be evacuated or stopped according to the environment's capabilities and policies.
  • Exit maintenance mode: returns the host to normal service eligibility.
  • Enter standby mode: places the host into a reduced-power state.
  • Exit standby mode: returns the host from standby to service.
  • Reboot the host: restarts ESXi.
  • Shut down the host: powers off the host.

These are potentially disruptive remediation actions. Before automating them, validate workload evacuation, cluster capacity, admission-control behavior, maintenance procedures, dependencies, and change-control requirements. See admission control and host inventory management for related administration concepts.

Virtual-Machine-Specific Actions

VM alarms can support the following VM operations:

  • Power on: starts a VM that is powered off. Recovery automation must account for the cause of the shutdown, application startup order, and dependent services.
  • Power off: stops a VM. Treat this as a disruptive operation because guest applications may not shut down cleanly.
  • Suspend: pauses VM execution and preserves its suspended state. It can affect time-sensitive applications and resource availability.
  • Reset: restarts the guest abruptly, similar to pressing a physical reset button. Use only when the expected benefit outweighs possible data loss.
  • Migrate: changes the VM's host or placement. Validate destination capacity, network and storage access, licensing, affinity rules, and application constraints. See admission-control policy for related placement planning.

Alarm States and Visual Indicators

vSphere alarm actions use three primary states:

  • Normal: the healthy or cleared state, shown as a green circle.
  • Warning: an intermediate state requiring attention, shown as a yellow triangle.
  • Critical: a serious state requiring prompt attention, shown as a red diamond.

These indicators appear in the alarm action configuration interface and help identify the source and destination of each transition.

State Transitions That Invoke Actions

A transition is a change between states. Common configurable paths include Normal to Warning, Warning to Critical, Critical to Warning, and Warning to Normal. An action assigned to one path does not automatically run for every other path.

TransitionTypical operational meaningPossible action choiceExecution modes
Normal to WarningA condition crossed an attention thresholdSend one capacity or health emailNo action, Once, or Repeat
Warning to CriticalThe condition worsened significantlySend an SNMP trap and run an approved diagnostic scriptNo action, Once, or Repeat
Critical to WarningThe condition improved but is not clearSend an update or continue controlled remindersNo action, Once, or Repeat
Warning to NormalThe condition clearedSend one recovery notificationNo action, Once, or Repeat

Action Execution Frequency

SettingBehaviorWhen it stopsRecommended use
No actionNo response is executed for that transitionThere is no action to stopUse when the transition is informational or intentionally ignored
OnceExecutes the selected action one time when the transition occursAfter that executionUse for a single notification or controlled one-time operation
RepeatExecutes repeatedly at the configured interval while the alarm remains in the resulting stateWhen another state transition occursUse for reminders or safe, idempotent diagnostics

The historical default repeat interval was five minutes. Verify the configured interval in the vSphere version and alarm interface you operate rather than assuming that value applies unchanged.

Practical Configuration Examples

Datastore Capacity Warning

For a datastore alarm, assign an email action to the Normal-to-Warning transition and set it to Once. This gives the storage or virtualization team an early notification while leaving time to investigate before service is affected.

Escalating Host Hardware Condition

For a host alarm, assign an SNMP trap and an approved diagnostic script to the Warning-to-Critical transition. This combines monitoring visibility with controlled data collection instead of immediately rebooting the host.

VM Availability Response

For an applicable VM alarm, a policy may permit a power-on action after a configured transition. Validate application dependencies, startup order, and the reason the VM became powered off before enabling this automation.

Critical Condition Reminders

A repeated email or SNMP action can remind operators about an unresolved Critical condition. Tune the interval carefully so reminders improve visibility without creating an alert storm.

Condition Recovery

Assign a single email action to Warning-to-Normal to announce recovery. A recovery message closes the operational loop and distinguishes a cleared condition from an ongoing incident.

Host Maintenance Automation

A host-specific maintenance-mode action should be considered only after confirming workload evacuation behavior, cluster capacity, and approved maintenance procedures. A single host action can affect many VMs.

Safe Alarm-Action Design

  • Start with notification-only actions. Add automated remediation after the condition, script, and recovery path have been validated.
  • Do not automatically reboot or shut down hosts, or power off, reset, or migrate workloads, without checking dependencies and business impact.
  • Use appropriate repeat behavior to prevent alert storms and duplicate script execution.
  • Test alarm definitions and command actions in a non-production environment.
  • Use externally maintained, approved scripts rather than embedding unreviewed logic in an alarm workflow.
  • Make scripts idempotent when Repeat is enabled, meaning repeated execution produces no harmful additional effect.
  • Log script activity, return meaningful exit status information, protect credentials, and limit automation permissions.

Troubleshooting Alarm Actions

No Email or SNMP Message

  • Confirm that an action is assigned to the exact transition that occurred.
  • Verify email or SNMP infrastructure, destinations, reachability, recipient addresses, and monitoring-platform trap handling.
  • Check whether the action was set to Once and already executed.

Too Many Repeated Notifications or Scripts

  • Check whether Repeat was selected instead of Once.
  • Review the configured repeat interval; five minutes was a historical default, but the current value must be verified.
  • Confirm that the alarm has remained in the same Warning or Critical state.
  • Use deduplication, escalation policies, or a less frequent interval where supported.

Command Action Does Not Correct the Condition

  • Verify the script path, permissions, execution context, dependencies, and logs.
  • Test the script independently with safe inputs.
  • Confirm that it is attached to the intended transition.
  • Ensure that repeated execution cannot produce harmful side effects.

Unexpected Host or VM Impact

  • Review whether the selected action is disruptive, such as host reboot, host shutdown, VM power-off, VM reset, or migration.
  • Validate cluster capacity, workload dependencies, admission control, and evacuation requirements.
  • Restrict automation to conditions with a well-understood remediation path.
  • Return to notification-only behavior until the workflow is tested.

No Recovery Notification

  • Confirm that an action is configured for Warning-to-Normal.
  • Verify that the alarm actually returned to Normal instead of remaining in Warning or Critical.
  • Check action frequency and notification delivery settings.

Exam-Relevant Notes

  • An alarm condition detects a problem; an alarm action defines the response.
  • Actions are attached to state transitions, not merely to a persistent state.
  • Email, SNMP traps, and command or script actions are the general response categories where supported.
  • Maintenance, standby, reboot, and shutdown are host-specific operations.
  • Power, suspend, reset, and migration operations are VM-specific.
  • Once runs once for a transition; Repeat continues until another transition occurs.
  • Always verify the repeat interval in the installed vSphere version.