Set-LMDeviceGroupDatasource
Syntax
Section titled “Syntax”Name-dsName
Section titled “Name-dsName”Set-LMDeviceGroupDatasource -DatasourceName <String> -Name <String> [-StopMonitoring <Boolean>] [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]Id-dsName
Section titled “Id-dsName”Set-LMDeviceGroupDatasource -DatasourceName <String> -Id <Int32> [-StopMonitoring <Boolean>] [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]Name-dsId
Section titled “Name-dsId”Set-LMDeviceGroupDatasource -DatasourceId <Int32> -Name <String> [-StopMonitoring <Boolean>] [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]Id-dsId
Section titled “Id-dsId”Set-LMDeviceGroupDatasource -DatasourceId <Int32> -Id <Int32> [-StopMonitoring <Boolean>] [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]Description
Section titled “Description”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.
Examples
Section titled “Examples”Example 1
Section titled “Example 1”#Disable monitoring for a datasource on a device groupSet-LMDeviceGroupDatasource -Id 15 -DatasourceId 790 -StopMonitoring $trueExample 2
Section titled “Example 2”#Enable monitoring using namesSet-LMDeviceGroupDatasource -Name "Production Servers" -DatasourceName "CPU" -StopMonitoring $falseParameters
Section titled “Parameters”-DatasourceName
Section titled “-DatasourceName”Specifies the name of the datasource. Required when using the ‘Id-dsName’ or ‘Name-dsName’ parameter sets.
Type: StringParameter Sets: Name-dsName, Id-dsNameAliases:
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-DatasourceId
Section titled “-DatasourceId”Specifies the ID of the datasource. Required when using the ‘Id-dsId’ or ‘Name-dsId’ parameter sets.
Type: Int32Parameter Sets: Name-dsId, Id-dsIdAliases:
Required: TruePosition: NamedDefault value: 0Accept pipeline input: FalseAccept wildcard characters: FalseSpecifies the ID of the device group. Required when using the ‘Id-dsId’ or ‘Id-dsName’ parameter sets.
Type: Int32Parameter Sets: Id-dsName, Id-dsIdAliases:
Required: TruePosition: NamedDefault value: 0Accept pipeline input: FalseAccept wildcard characters: FalseSpecifies the name of the device group. Required when using the ‘Name-dsId’ or ‘Name-dsName’ parameter sets.
Type: StringParameter Sets: Name-dsName, Name-dsIdAliases:
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-StopMonitoring
Section titled “-StopMonitoring”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: BooleanParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-WhatIf
Section titled “-WhatIf”Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: SwitchParameterParameter Sets: (All)Aliases: wi
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-Confirm
Section titled “-Confirm”Prompts you for confirmation before running the cmdlet.
Type: SwitchParameterParameter Sets: (All)Aliases: cf
Required: FalsePosition: 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”None. You cannot pipe objects to this command.
Section titled “None. You cannot pipe objects to this command.”Outputs
Section titled “Outputs”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.