This cmdlet adds an alarm trigger to the existing alarm or creates a new alarm trigger. The newly added or created triggers could be Event, Metric, and State. The cmdlet returns the added or created trigger. To specify a server that is different from the default one, use the Server parameter.
Specifies the existing alarm to which you want to add the trigger.
required
EntityType
String
named
Specifies the type of object on which the event occurs, its containing state or metric. ?he valid PowerCLI type names are Cluster, Datacenter, Datastore, DistributedSwitch, VMHost, VirtualPortGroup, ResourcePool, VirtualMachine, and so on.
Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is provided or $null value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of the Connect-VIServer cmdlet.
Specifies the existing alarm to which you want to add the trigger.
required
EntityType
String
named
Specifies the type of object on which the event occurs, its containing state or metric. ?he valid PowerCLI type names are Cluster, Datacenter, Datastore, DistributedSwitch, VMHost, VirtualPortGroup, ResourcePool, VirtualMachine, and so on.
Specifies the threshold value that triggers a red status.
optional
RedIntervalSeconds
Int32
named
Specifies the time interval for which the red condition must be true before the red status is triggered. If unset, the red status is triggered immediately when the red condition becomes true.
Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is provided or $null value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of the Connect-VIServer cmdlet.
optional
Yellow
Int32
named
Specifies the threshold value that triggers a yellow status.
optional
YellowIntervalSeconds
Int32
named
Specifies the time interval for which the yellow condition must be true before the yellow status is triggered. If unset, the yellow status is triggered immediately when the yellow condition becomes true.
Specifies the existing alarm to which you want to add the trigger.
required
EntityType
String
named
Specifies the type of object on which the event occurs, its containing state or metric. ?he valid PowerCLI type names are Cluster, Datacenter, Datastore, DistributedSwitch, VMHost, VirtualPortGroup, ResourcePool, VirtualMachine, and so on.
Specifies the path of the state property. Supported values for the VirtualMachine type: runtime.powerState, summary.quickStats.guestHeartbeatStatus. Supported values for the VMHost type: runtime.connectionState. And so on.
Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is provided or $null value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of the Connect-VIServer cmdlet.
Specifies the type of object on which the event occurs, its containing state or metric. ?he valid PowerCLI type names are Cluster, Datacenter, Datastore, DistributedSwitch, VMHost, VirtualPortGroup, ResourcePool, VirtualMachine, and so on.
Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is provided or $null value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of the Connect-VIServer cmdlet.
Specifies the type of object on which the event occurs, its containing state or metric. ?he valid PowerCLI type names are Cluster, Datacenter, Datastore, DistributedSwitch, VMHost, VirtualPortGroup, ResourcePool, VirtualMachine, and so on.
Specifies the threshold value that triggers a red status.
optional
RedIntervalSeconds
Int32
named
Specifies the time interval for which the red condition must be true before the red status is triggered. If unset, the red status is triggered immediately when the red condition becomes true.
Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is provided or $null value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of the Connect-VIServer cmdlet.
optional
Yellow
Int32
named
Specifies the threshold value that triggers a yellow status.
optional
YellowIntervalSeconds
Int32
named
Specifies the time interval for which the yellow condition must be true before the yellow status is triggered. If unset, the yellow status is triggered immediately when the yellow condition becomes true.
Specifies the type of object on which the event occurs, its containing state or metric. ?he valid PowerCLI type names are Cluster, Datacenter, Datastore, DistributedSwitch, VMHost, VirtualPortGroup, ResourcePool, VirtualMachine, and so on.
Specifies the path of the state property. Supported values for the VirtualMachine type: runtime.powerState, summary.quickStats.guestHeartbeatStatus. Supported values for the VMHost type: runtime.connectionState. And so on.
Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is provided or $null value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of the Connect-VIServer cmdlet.
Adds a new metric trigger with a $metric metric and an Above operator for the VirtualMachine entity to the $alarm alarm. The threshold value that triggers a red status is 3200. The time interval for which the red condition must be true before the red status is triggered is 900.
Creates a new metric trigger with a $metric metric and an Above operator for the VirtualMachine entity. The threshold value that triggers a red status is 3200. The time interval for which the red condition must be true before the red status is triggered is 900
Adds a new state trigger to VMHost with status Red to the $alarm alarm. You can activate the trigger when the "runtime.connectionState" state is equal to "connected".
Creates a new state trigger to VMHost with status Red. You can activate the trigger when the "runtime.connectionState" state is equal to "connected".
Example 7
$argument = New-AlarmTriggerArgumentcmdlet New-AlarmTriggerArgument at command pipeline position 1Supply values for the following parameters:AttributeName: Cluster NameOperator: equalsValue: vSAN-ESA-ClusterNew-AlarmTrigger -AlarmDefinition $alarm -EntityType "VMHost" -EventType $event -Argument $argument
Creates a new event trigger to a VMHost with the specified arguments and the $alarm alarm definition. The Cluster Name attribute must be equal to "vSAN-ESA-Cluster".
This cmdlet creates a new AlarmTriggerArgument local object that defines the condition comparison under which an alarm is triggered. The AlarmTriggerArgument object is used as the Arguments parameter in the New-AlarmTrigger cmdlet.
This cmdlet fetches a list of attribute names of the alarm trigger argument for the "vsan.health.ssd.endurance" event type. (The most of attribute names for alarm trigger argument can be fetched by Get-EventType)
To prevent this message from showing again, please enable pop-up blockers for support.broadcom.com
or click Continue to proceed.