Skip to content

Set-LMDeviceGroupDatasource

Terminal window
Set-LMDeviceGroupDatasource -DatasourceName <String> -Name <String> [-StopMonitoring <Boolean>]
[-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]
Terminal window
Set-LMDeviceGroupDatasource -DatasourceName <String> -Id <Int32> [-StopMonitoring <Boolean>]
[-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]
Terminal window
Set-LMDeviceGroupDatasource -DatasourceId <Int32> -Name <String> [-StopMonitoring <Boolean>]
[-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]
Terminal window
Set-LMDeviceGroupDatasource -DatasourceId <Int32> -Id <Int32> [-StopMonitoring <Boolean>]
[-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]

The Set-LMDeviceGroupDatasource cmdlet modifies an existing device group datasource in LogicMonitor, allowing updates to monitoring state. This cmdlet provides control over the “Enable” checkbox (stopMonitoring) for a datasource applied to a device group. For alert settings use Set-LMDeviceGroupDatasourceAlertSetting.

Terminal window
#Disable monitoring for a datasource on a device group
Set-LMDeviceGroupDatasource -Id 15 -DatasourceId 790 -StopMonitoring $true
Terminal window
#Enable monitoring using names
Set-LMDeviceGroupDatasource -Name "Production Servers" -DatasourceName "CPU" -StopMonitoring $false

Specifies the name of the datasource. Required when using the ‘Id-dsName’ or ‘Name-dsName’ parameter sets.

Type: String
Parameter Sets: Name-dsName, Id-dsName
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Specifies the ID of the datasource. Required when using the ‘Id-dsId’ or ‘Name-dsId’ parameter sets.

Type: Int32
Parameter Sets: Name-dsId, Id-dsId
Aliases:
Required: True
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

Specifies the ID of the device group. Required when using the ‘Id-dsId’ or ‘Id-dsName’ parameter sets.

Type: Int32
Parameter Sets: Id-dsName, Id-dsId
Aliases:
Required: True
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

Specifies the name of the device group. Required when using the ‘Name-dsId’ or ‘Name-dsName’ parameter sets.

Type: String
Parameter Sets: Name-dsName, Name-dsId
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Specifies whether to stop monitoring the datasource. When set to $true, monitoring is disabled (unchecks the “Enable” checkbox). When set to $false, monitoring is enabled (checks the “Enable” checkbox).

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

Shows what would happen if the cmdlet runs. The cmdlet is not run.

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

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
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.

None. You cannot pipe objects to this command.

Section titled “None. You cannot pipe objects to this command.”

Returns a LogicMonitor.DeviceGroupDatasource object containing the updated datasource configuration.

Section titled “Returns a LogicMonitor.DeviceGroupDatasource object containing the updated datasource configuration.”

You must run Connect-LMAccount before running this command.