Get-LMDeviceInstanceData
Syntax
Section titled “Syntax”Get-LMDeviceInstanceData [[-StartDate] <DateTime>] [[-EndDate] <DateTime>] [-Ids] <String[]> [[-AggregationType] <String>] [[-Period] <Double>] [-ProgressAction <ActionPreference>] [<CommonParameters>]Description
Section titled “Description”The Get-LMDeviceInstanceData function retrieves monitoring data for specified device instances in LogicMonitor. It supports data aggregation and time range filtering, with a maximum timeframe of 24 hours.
Examples
Section titled “Examples”Example 1
Section titled “Example 1”#Retrieve data for multiple instances with aggregationGet-LMDeviceInstanceData -Ids "12345","67890" -AggregationType "average" -StartDate (Get-Date).AddHours(-12)Example 2
Section titled “Example 2”#Retrieve raw data for a single instanceGet-LMDeviceInstanceData -Id "12345" -AggregationType "none"Parameters
Section titled “Parameters”-StartDate
Section titled “-StartDate”The start date for the data retrieval. Defaults to 24 hours ago if not specified.
Type: DateTimeParameter Sets: (All)Aliases:
Required: FalsePosition: 1Default value: NoneAccept pipeline input: FalseAccept wildcard characters: False-EndDate
Section titled “-EndDate”The end date for the data retrieval. Defaults to current time if not specified.
Type: DateTimeParameter Sets: (All)Aliases:
Required: FalsePosition: 2Default value: NoneAccept pipeline input: FalseAccept wildcard characters: FalseAn array of device instance IDs for which to retrieve data. This parameter is mandatory and can be specified using the Id alias.
Type: String[]Parameter Sets: (All)Aliases: Id
Required: TruePosition: 3Default value: NoneAccept pipeline input: FalseAccept wildcard characters: False-AggregationType
Section titled “-AggregationType”The type of aggregation to apply to the data. Valid values are “first”, “last”, “min”, “max”, “sum”, “average”, “none”. Defaults to “none”.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: 4Default value: NoneAccept pipeline input: FalseAccept wildcard characters: False-Period
Section titled “-Period”The period for data aggregation. Defaults to 1 as this appears to be the only supported value.
Type: DoubleParameter Sets: (All)Aliases:
Required: FalsePosition: 5Default value: 1Accept pipeline input: FalseAccept wildcard characters: False-ProgressAction
Section titled “-ProgressAction”Fill ProgressAction Description
Type: ActionPreferenceParameter Sets: (All)Aliases: proga
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: FalseCommonParameters
Section titled “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
Section titled “Inputs”None. You cannot pipe objects to this command.
Section titled “None. You cannot pipe objects to this command.”Outputs
Section titled “Outputs”Returns an array of data points for the specified device instances.
Section titled “Returns an array of data points for the specified device instances.”You must run Connect-LMAccount before running this command. Maximum time range for data retrieval is 24 hours.