Managing alarms
To manage the different aspects of an alarm, we can use the following cmdlets:
Get-AlarmAction
New-AlarmAction
Remove-AlarmAction
Get-AlarmDefinition
Set-AlarmDefinition
Get-AlarmActionTrigger
New-AlarmActionTrigger
Remove-AlarmActionTrigger
There is no direct cmdlet available to create an alarm. We can create an alarm using the vSphere APIs, which we will cover in a later chapter. So, in this section, we will cover how to define and manage the different aspects of an existing alarm.
An alarm has main three parts: an alarm definition, alarm action, and alarm action trigger.
In the following screenshot, the definition is where you will define the name, description, type, and whether it is enabled or not:
We can use the Get-AlarmDefinition
Get Mastering PowerCLI now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.