PowerCLI Reference

New-AlarmDefinition

Synopsis

This cmdlet creates a new alarm definition.

Syntax

New-AlarmDefinition [-ActionRepeatMinutes <Int32>] [-AlarmAction <AlarmAction[]>] -AlarmTrigger <AlarmTrigger[]> [-Description <String>] [-Disabled] -Entity <VIObject> -Name <String> [-ReportingFrequencyMinutes <Int32>] [-ReportingTolerancePercentage <Int32>] [-WhatIf] [<CommonParameters>]

Related Commands

Detailed Description

This cmdlet creates a new alarm definition.

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
ActionRepeatMinutesInt32Specifies the frequency in minutes. This indicates how often appropriate actions should be repeated when an alarm does not change its state.falseFalse
AlarmActionAlarmAction[]Specifies the alarm actions which you want to be executed when the alarm triggers.falseFalse
AlarmTriggerAlarmTrigger[]Specifies the alarm triggers which you can use to activate the alarm.trueFalse
DescriptionStringSpecifies the alarm description.falseFalse
DisabledSwitchParameterSpecifies if the alarm is disabled. By default, the alarm is enabled.falseFalse
EntityVIObjectSpecifies the entity to which you want to attach the alarm. If you want to specify the root, use the data centers.trueFalse
NameStringSpecifies the alarm name.trueFalse
ReportingFrequencyMinutesInt32Indicates how often you want to trigger the alarm. It is measured in minutes.falseFalse
ReportingTolerancePercentageInt32Indicates the tolerance range for the metric triggers. It is measured in percentage.falseFalse
WhatIfSwitchParameterIndicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified.falseFalse

Return Type

VMware.VimAutomation.ViCore.Types.V1.Alarm.AlarmDefinition

Notes

Examples

-------------------------- Example 1 --------------------------

New-AlarmDefinition -Name "AlarmName" -AlarmTrigger $alarmTriggers -Entity $entity

Creates an enabled alarm definition with the "AlarmName" name and a collection of $alarmTriggers triggers for the $entity.

-------------------------- Example 2 --------------------------

New-AlarmDefinition -Name "AlarmName" - AlarmTrigger $alarmTriggers -AlarmAction $alarmAction -Entity $entity -Description "alarm definition description" -ActionRepeatMinutes 20 -ReportingFrequencyMinutes 30 -ReportingTolerancePercentage 10 -Disabled

Creates a disabled alarm definition with the "AlarmName" name, an "alarm definition description" description, and a collection of $alarmTriggers triggers for the $entity. The newly created alarm definition has alarm actions: $alarm Action. The alarm action repeat minutes are 20, the reporting frequency minutes are 30, and the reporting tolerance range is 10.


Copyright © VMware, Inc. All rights reserved.