Send-LMPushMetric
Syntax
Section titled “Syntax”Create-DatasourceName
Section titled “Create-DatasourceName”Send-LMPushMetric [-NewResourceHostName <String>] [-NewResourceDescription <String>] -ResourceIds <Hashtable> [-ResourceProperties <Hashtable>] -DatasourceName <String> [-DatasourceDisplayName <String>] [-DatasourceGroup <String>] -Instances <System.Collections.Generic.List`1[System.Object]> [-ProgressAction <ActionPreference>] [<CommonParameters>]Create-DatasourceId
Section titled “Create-DatasourceId”Send-LMPushMetric [-NewResourceHostName <String>] [-NewResourceDescription <String>] -ResourceIds <Hashtable> [-ResourceProperties <Hashtable>] -DatasourceId <String> [-DatasourceDisplayName <String>] [-DatasourceGroup <String>] -Instances <System.Collections.Generic.List`1[System.Object]> [-ProgressAction <ActionPreference>] [<CommonParameters>]Description
Section titled “Description”The Send-LMPushMetric function sends a push metric to LogicMonitor. It allows you to create a new resource or update an existing resource with the specified metric data.
Examples
Section titled “Examples”Example 1
Section titled “Example 1”Send-LMPushMetric -NewResourceHostName "NewResource" -NewResourceDescription "New Resource Description" -ResourceIds @{"system.deviceId"="12345"} -ResourceProperties @{"Property1"="Value1"} -DatasourceId "123" -Instances $InstancesCreates a new resource and sends metric data for the specified instances.Parameters
Section titled “Parameters”-NewResourceHostName
Section titled “-NewResourceHostName”Specifies the hostname of the new resource to be created. This parameter is required if you want to create a new resource.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-NewResourceDescription
Section titled “-NewResourceDescription”Specifies the description of the new resource to be created. This parameter is required if you want to create a new resource.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-ResourceIds
Section titled “-ResourceIds”Specifies the resource IDs to use for resource mapping. This parameter is mandatory.
Type: HashtableParameter Sets: (All)Aliases:
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-ResourceProperties
Section titled “-ResourceProperties”Specifies the properties of the resources to be updated. This parameter is optional.
Type: HashtableParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-DatasourceId
Section titled “-DatasourceId”Specifies the ID of the datasource. This parameter is required if the datasource name is not specified.
Type: StringParameter Sets: Create-DatasourceIdAliases:
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-DatasourceName
Section titled “-DatasourceName”Specifies the name of the datasource. This parameter is required if the datasource ID is not specified.
Type: StringParameter Sets: Create-DatasourceNameAliases:
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-DatasourceDisplayName
Section titled “-DatasourceDisplayName”Specifies the display name of the datasource. This parameter is optional and defaults to the datasource name if not specified.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-DatasourceGroup
Section titled “-DatasourceGroup”Specifies the group of the datasource. This parameter is optional and defaults to “PushModules” if not specified.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-Instances
Section titled “-Instances”Specifies the instances of the resources to be updated. This parameter is mandatory and should contain results from the New-LMPushMetricInstance function.
Type: System.Collections.Generic.List`1[System.Object]Parameter Sets: (All)Aliases:
Required: TruePosition: NamedDefault value: NoneAccept 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”Outputs
Section titled “Outputs”This function requires a valid API authentication. Make sure you are logged in before running any commands using Connect-LMAccount.