New-LMAlertRule
Syntax
New-LMAlertRule [-Name] <String> [-Priority] <Int32> [-EscalatingChainId] <Int32> [[-EscalationInterval] <Int32>] [[-ResourceProperties] <Hashtable>] [[-Devices] <String[]>] [[-DeviceGroups] <String[]>] [[-DataSource] <String>] [[-DataSourceInstanceName] <String>] [[-DataPoint] <String>] [[-SuppressAlertClear] <Boolean>] [[-SuppressAlertAckSdt] <Boolean>] [[-LevelStr] <String>] [[-Description] <String>] [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]
Description
The New-LMAlertRule function creates a new alert rule in LogicMonitor.
Examples
Example 1
New-LMAlertRule -Name "New Rule" -Priority 100 -EscalatingChainId 456Creates a new alert rule with specified name, priority and escalation chain.
Parameters
-Name
Specifies the name for the alert rule.
Type: StringParameter Sets: (All)Aliases:
Required: TruePosition: 1Default value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-Priority
Specifies the priority level for the alert rule. Valid values: “High”, “Medium”, “Low”.
Type: Int32Parameter Sets: (All)Aliases:
Required: TruePosition: 2Default value: 0Accept pipeline input: FalseAccept wildcard characters: False
-EscalatingChainId
Specifies the ID of the escalation chain to use.
Type: Int32Parameter Sets: (All)Aliases:
Required: TruePosition: 3Default value: 0Accept pipeline input: FalseAccept wildcard characters: False
-EscalationInterval
Specifies the escalation interval in minutes.
Type: Int32Parameter Sets: (All)Aliases:
Required: FalsePosition: 4Default value: 0Accept pipeline input: FalseAccept wildcard characters: False
-ResourceProperties
Specifies resource properties to filter on.
Type: HashtableParameter Sets: (All)Aliases:
Required: FalsePosition: 5Default value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-Devices
Specifies an array of device display names to apply the rule to.
Type: String[]Parameter Sets: (All)Aliases:
Required: FalsePosition: 6Default value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-DeviceGroups
Specifies an array of device group full paths to apply the rule to.
Type: String[]Parameter Sets: (All)Aliases:
Required: FalsePosition: 7Default value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-DataSource
Specifies the datasource name to apply the rule to.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: 8Default value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-DataSourceInstanceName
Specifies the instance name to apply the rule to.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: 9Default value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-DataPoint
Specifies the datapoint name to apply the rule to.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: 10Default value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-SuppressAlertClear
Indicates whether to suppress alert clear notifications.
Type: BooleanParameter Sets: (All)Aliases:
Required: FalsePosition: 11Default value: FalseAccept pipeline input: FalseAccept wildcard characters: False
-SuppressAlertAckSdt
Indicates whether to suppress alert acknowledgement and SDT notifications.
Type: BooleanParameter Sets: (All)Aliases:
Required: FalsePosition: 12Default value: FalseAccept pipeline input: FalseAccept wildcard characters: False
-LevelStr
Specifies the level string for the alert rule. Valid values: “All”, “Critical”, “Error”, “Warning”.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: 13Default value: AllAccept pipeline input: FalseAccept wildcard characters: False
-Description
Specifies the description for the alert rule.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: 14Default value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: SwitchParameterParameter Sets: (All)Aliases: wi
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: SwitchParameterParameter Sets: (All)Aliases: cf
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-ProgressAction
Fill ProgressAction Description
Type: ActionPreferenceParameter Sets: (All)Aliases: proga
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Inputs
None. You cannot pipe objects to this command.
Outputs
Returns the response from the API containing the new alert rule information.
Notes
This function requires a valid LogicMonitor API authentication.