Skip to content

Send-LMPushMetric

Terminal window
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>]
Terminal window
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>]

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.

Terminal window
Send-LMPushMetric -NewResourceHostName "NewResource" -NewResourceDescription "New Resource Description" -ResourceIds @{"system.deviceId"="12345"} -ResourceProperties @{"Property1"="Value1"} -DatasourceId "123" -Instances $Instances
Creates a new resource and sends metric data for the specified instances.

Specifies the hostname of the new resource to be created. This parameter is required if you want to create a new resource.

Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Specifies the description of the new resource to be created. This parameter is required if you want to create a new resource.

Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Specifies the resource IDs to use for resource mapping. This parameter is mandatory.

Type: Hashtable
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Specifies the properties of the resources to be updated. This parameter is optional.

Type: Hashtable
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Specifies the ID of the datasource. This parameter is required if the datasource name is not specified.

Type: String
Parameter Sets: Create-DatasourceId
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Specifies the name of the datasource. This parameter is required if the datasource ID is not specified.

Type: String
Parameter Sets: Create-DatasourceName
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Specifies the display name of the datasource. This parameter is optional and defaults to the datasource name if not specified.

Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Specifies the group of the datasource. This parameter is optional and defaults to “PushModules” if not specified.

Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

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: True
Position: Named
Default value: None
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: False

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

This function requires a valid API authentication. Make sure you are logged in before running any commands using Connect-LMAccount.