Get-LMIntegrationLogs
Syntax
Range (Default)
Get-LMIntegrationLogs [-SearchString <String>] [-StartDate <DateTime>] [-EndDate <DateTime>] [-BatchSize <Int32>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
Id
Get-LMIntegrationLogs [-Id <String>] [-BatchSize <Int32>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
Filter
Get-LMIntegrationLogs [-Filter <Object>] [-BatchSize <Int32>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
Description
The Get-LMIntegrationLogs function retrieves integration audit logs from LogicMonitor. It supports retrieving logs by ID, date range, search string, or filter criteria.
Examples
Example 1
#Retrieve logs for the last 30 daysGet-LMIntegrationLogs
Example 2
#Retrieve logs with a specific search string and date rangeGet-LMIntegrationLogs -SearchString "error" -StartDate (Get-Date).AddDays(-7)
Parameters
-Id
The specific integration log ID to retrieve.
Type: StringParameter Sets: IdAliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-SearchString
A string to search for within the integration logs.
Type: StringParameter Sets: RangeAliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-StartDate
The start date for retrieving logs. Defaults to 30 days ago if not specified.
Type: DateTimeParameter Sets: RangeAliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-EndDate
The end date for retrieving logs. Defaults to current time if not specified.
Type: DateTimeParameter Sets: RangeAliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-Filter
A filter object to apply when retrieving logs.
Type: ObjectParameter Sets: FilterAliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-BatchSize
The number of results to return per request. Must be between 1 and 1000. Defaults to 1000.
Type: Int32Parameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: 1000Accept 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 LogicMonitor.IntegrationLog objects.
Notes
You must run Connect-LMAccount before running this command. There is a 10,000 record query limitation for this endpoint.