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
cmdlet to get the details regarding the definition of an existing alarm:
Next, we will make changes to the different points. We will use the Set-AlarmDefinition
cmdlet for this. In the following example, we changed the name of an existing...