Get-LMDeviceInstanceData
Syntax
Section titled “Syntax”__AllParameterSets
Section titled “__AllParameterSets”Get-LMDeviceInstanceData [[-StartDate] <datetime>] [[-EndDate] <datetime>] [-Ids] <string[]> [[-AggregationType] <string>] [[-Period] <double>] [<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”-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: System.StringDefaultValue: noneSupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: 3 IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-EndDate
Section titled “-EndDate”The end date for the data retrieval. Defaults to current time if not specified.
Type: System.DateTimeDefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: 1 IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''An array of device instance IDs for which to retrieve data. This parameter is mandatory and can be specified using the Id alias.
Type: System.String[]DefaultValue: ''SupportsWildcards: falseAliases:- IdParameterSets:- Name: (All) Position: 2 IsRequired: true ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-Period
Section titled “-Period”The period for data aggregation. Defaults to 1 as this appears to be the only supported value.
Type: System.DoubleDefaultValue: 1SupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: 4 IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-StartDate
Section titled “-StartDate”The start date for the data retrieval. Defaults to 24 hours ago if not specified.
Type: System.DateTimeDefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: 0 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.