< Back

New-AlarmDefinition

Sun Jan 19, 2020 6:58 pm

NAME 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>]





DESCRIPTION

This cmdlet creates a new alarm definition.





PARAMETERS

-ActionRepeatMinutes <Int32>

Specifies the frequency in minutes. This indicates how often appropriate actions should be repeated when an

alarm does not change its state.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-AlarmAction <AlarmAction[]>

Specifies the alarm actions which you want to be executed when the alarm triggers.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-AlarmTrigger <AlarmTrigger[]>

Specifies the alarm triggers which you can use to activate the alarm.



Required? true

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Description <String>

Specifies the alarm description.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Disabled [<SwitchParameter>]

Specifies if the alarm is disabled. By default, the alarm is enabled.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-Entity <VIObject>

Specifies the entity to which you want to attach the alarm. If you want to specify the root, use the data

centers.



Required? true

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Name <String>

Specifies the alarm name.



Required? true

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-ReportingFrequencyMinutes <Int32>

Indicates how often you want to trigger the alarm. It is measured in minutes.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-ReportingTolerancePercentage <Int32>

Indicates the tolerance range for the metric triggers. It is measured in percentage.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]

Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are

modified.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

None







OUTPUTS

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







NOTES









-------------------------- 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.



RELATED LINKS

Get-AlarmAction

Get-AlarmActionTrigger

Get-AlarmDefinition

Get-AlarmTrigger

New-AlarmAction

New-AlarmActionTrigger

New-AlarmDefinition

New-AlarmTrigger

Remove-AlarmAction

Remove-AlarmActionTrigger

Remove-AlarmDefinition

Set-AlarmDefinition

Get-Metric

Get-EventType