Set-LMLogAlert
Syntax
Section titled “Syntax”Id (Default)
Section titled “Id (Default)”Set-LMLogAlert -Id <int> [-NewName <string>] [-PipelineId <int>] [-AlertQuery <string>] [-AlertType <string>] [-Severity <string>] [-Description <string>] [-LogNotes <string>] [-LogMetadataFields <string[]>] [-Disabled <bool>] [-Clear <psobject>] [-Grouping <psobject>] [-Window <psobject>] [-WhatIf] [-Confirm] [<CommonParameters>]Set-LMLogAlert -Name <string> [-NewName <string>] [-PipelineId <int>] [-AlertQuery <string>] [-AlertType <string>] [-Severity <string>] [-Description <string>] [-LogNotes <string>] [-LogMetadataFields <string[]>] [-Disabled <bool>] [-Clear <psobject>] [-Grouping <psobject>] [-Window <psobject>] [-WhatIf] [-Confirm] [<CommonParameters>]InputObject
Section titled “InputObject”Set-LMLogAlert -InputObject <psobject> [-NewName <string>] [-PipelineId <int>] [-AlertQuery <string>] [-AlertType <string>] [-Severity <string>] [-Description <string>] [-LogNotes <string>] [-LogMetadataFields <string[]>] [-Disabled <bool>] [-Clear <psobject>] [-Grouping <psobject>] [-Window <psobject>] [-WhatIf] [-Confirm] [<CommonParameters>]Description
Section titled “Description”The Set-LMLogAlert function modifies an existing log alert processor in LogicMonitor. You can specify individual parameters or provide a complete configuration object using InputObject. When -Disabled is specified, the enable/disable action endpoint is updated separately.
Examples
Section titled “Examples”EXAMPLE 1
Section titled “EXAMPLE 1”Set-LMLogAlert -Id 5 -Description "Updated alert rule"EXAMPLE 2
Section titled “EXAMPLE 2”Set-LMLogAlert -Name "High Error Rate" -Disabled $trueParameters
Section titled “Parameters”-AlertQuery
Section titled “-AlertQuery”Specifies the alert query for the processor.
Type: System.StringDefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: Named IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-AlertType
Section titled “-AlertType”Specifies the alert type for the processor.
Type: System.StringDefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: Named IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-Clear
Section titled “-Clear”Clear configuration object with properties: autoClearAfter, clearQuery, groupingEntities, autoClearOnAck.
Type: System.Management.Automation.PSObjectDefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: Named IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-Confirm
Section titled “-Confirm”Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameterDefaultValue: ''SupportsWildcards: falseAliases:- cfParameterSets:- Name: (All) Position: Named IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-Description
Section titled “-Description”Specifies the description for the processor.
Type: System.StringDefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: Named IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-Disabled
Section titled “-Disabled”Specifies whether the processor is disabled.
Type: System.BooleanDefaultValue: FalseSupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: Named IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-Grouping
Section titled “-Grouping”Grouping configuration object with property: alertEntities.
Type: System.Management.Automation.PSObjectDefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: Named IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''Specifies the ID of the log alert processor to modify.
Type: System.Int32DefaultValue: 0SupportsWildcards: falseAliases: []ParameterSets:- Name: Id Position: Named IsRequired: true ValueFromPipeline: false ValueFromPipelineByPropertyName: true ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-InputObject
Section titled “-InputObject”A PSCustomObject containing the complete log alert processor configuration. Must include id or name.
Type: System.Management.Automation.PSObjectDefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: InputObject Position: Named IsRequired: true ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-LogMetadataFields
Section titled “-LogMetadataFields”Specifies an array of log metadata field names.
Type: System.String[]DefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: Named IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-LogNotes
Section titled “-LogNotes”Specifies log notes for the processor.
Type: System.StringDefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: Named IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''Specifies the current name of the log alert processor.
Type: System.StringDefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: Name Position: Named IsRequired: true ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-NewName
Section titled “-NewName”Specifies the new name for the log alert processor.
Type: System.StringDefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: Named IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-PipelineId
Section titled “-PipelineId”Specifies the ID of the parent log alert group (pipeline).
Type: System.Int32DefaultValue: 0SupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: Named IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-Severity
Section titled “-Severity”Specifies the severity level. Valid values: critical, error, warning, null.
Type: System.StringDefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: Named IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-WhatIf
Section titled “-WhatIf”Runs the command in a mode that only reports what would happen without performing the actions.
Type: System.Management.Automation.SwitchParameterDefaultValue: ''SupportsWildcards: falseAliases:- wiParameterSets:- Name: (All) Position: Named IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-Window
Section titled “-Window”Window configuration object with properties: duration, count.
Type: System.Management.Automation.PSObjectDefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: Named IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''CommonParameters
Section titled “CommonParameters”This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.