| external help file | Logic.Monitor-help.xml |
|---|---|
| Module Name | Logic.Monitor |
| online version | |
| schema | 2.0.0 |
Retrieves alerts from LogicMonitor.
Get-LMAlert [-Severity <String>] [-Type <String>] [-ClearedAlerts <Boolean>] [-CustomColumns <String[]>]
[-BatchSize <Int32>] [-Sort <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
Get-LMAlert [-StartDate <DateTime>] [-EndDate <DateTime>] [-Severity <String>] [-Type <String>]
[-ClearedAlerts <Boolean>] [-CustomColumns <String[]>] [-BatchSize <Int32>] [-Sort <String>]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
Get-LMAlert -Id <String> [-Severity <String>] [-Type <String>] [-ClearedAlerts <Boolean>]
[-CustomColumns <String[]>] [-BatchSize <Int32>] [-Sort <String>] [-ProgressAction <ActionPreference>]
[<CommonParameters>]
Get-LMAlert [-Severity <String>] [-Type <String>] [-ClearedAlerts <Boolean>] [-Filter <Object>]
[-CustomColumns <String[]>] [-BatchSize <Int32>] [-Sort <String>] [-ProgressAction <ActionPreference>]
[<CommonParameters>]
Get-LMAlert [-Severity <String>] [-Type <String>] [-ClearedAlerts <Boolean>] [-FilterWizard]
[-CustomColumns <String[]>] [-BatchSize <Int32>] [-Sort <String>] [-ProgressAction <ActionPreference>]
[<CommonParameters>]
The Get-LMAlert function retrieves alerts from LogicMonitor based on specified criteria. It supports filtering by date range, severity, type, and cleared status.
#Retrieve alerts from the last 7 days
Get-LMAlert -StartDate (Get-Date).AddDays(-7) -Severity "Error"
#Retrieve a specific alert with custom columns
Get-LMAlert -Id 12345 -CustomColumns "Column1","Column2"
The start date for retrieving alerts. Defaults to 0 (beginning of time).
Type: DateTime
Parameter Sets: Range
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe end date for retrieving alerts. Defaults to current time.
Type: DateTime
Parameter Sets: Range
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe specific alert ID to retrieve. This parameter is part of a mutually exclusive parameter set.
Type: String
Parameter Sets: Id
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe severity level to filter alerts by. Valid values are "", "Warning", "Error", "Critical". Defaults to "".
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: *
Accept pipeline input: False
Accept wildcard characters: FalseThe type of alerts to retrieve. Valid values are "", "websiteAlert", "dataSourceAlert", "eventAlert", "logAlert". Defaults to "".
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: *
Accept pipeline input: False
Accept wildcard characters: FalseWhether to include cleared alerts. Defaults to $false.
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: FalseA filter object to apply when retrieving alerts. Part of a mutually exclusive parameter set.
Type: Object
Parameter Sets: Filter
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseSwitch to use the filter wizard interface. Part of a mutually exclusive parameter set.
Type: SwitchParameter
Parameter Sets: FilterWizard
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: FalseArray of custom column names to include in the results.
Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe number of results to return per request. Must be between 1 and 1000. Defaults to 1000.
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: 1000
Accept pipeline input: False
Accept wildcard characters: FalseThe field to sort results by. Defaults to "+resourceId".
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: +resourceId
Accept pipeline input: False
Accept wildcard characters: False{{ Fill ProgressAction Description }}
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
You must run Connect-LMAccount before running this command. Maximum of 10000 alerts can be retrieved in a single query.