Set-LMDeviceGroupDatasource
Syntax
Section titled “Syntax”Name-dsName
Section titled “Name-dsName”Set-LMDeviceGroupDatasource -DatasourceName <string> -Name <string> [-StopMonitoring <bool>] [-WhatIf] [-Confirm] [<CommonParameters>]Id-dsName
Section titled “Id-dsName”Set-LMDeviceGroupDatasource -DatasourceName <string> -Id <int> [-StopMonitoring <bool>] [-WhatIf] [-Confirm] [<CommonParameters>]Name-dsId
Section titled “Name-dsId”Set-LMDeviceGroupDatasource -DatasourceId <int> -Name <string> [-StopMonitoring <bool>] [-WhatIf] [-Confirm] [<CommonParameters>]Id-dsId
Section titled “Id-dsId”Set-LMDeviceGroupDatasource -DatasourceId <int> -Id <int> [-StopMonitoring <bool>] [-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”-Confirm
Section titled “-Confirm”Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameterDefaultValue: ''SupportsWildcards: falseAliases:- cfParameterSets:- Name: (All) Position: Named IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-DatasourceId
Section titled “-DatasourceId”Specifies the ID of the datasource. Required when using the ‘Id-dsId’ or ‘Name-dsId’ parameter sets.
Type: System.Int32DefaultValue: 0SupportsWildcards: falseAliases: []ParameterSets:- Name: Name-dsId Position: Named IsRequired: true ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: false- Name: Id-dsId Position: Named IsRequired: true ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-DatasourceName
Section titled “-DatasourceName”Specifies the name of the datasource. Required when using the ‘Id-dsName’ or ‘Name-dsName’ parameter sets.
Type: System.StringDefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: Name-dsName Position: Named IsRequired: true ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: false- Name: Id-dsName Position: Named IsRequired: true ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''Specifies the ID of the device group. Required when using the ‘Id-dsId’ or ‘Id-dsName’ parameter sets.
Type: System.Int32DefaultValue: 0SupportsWildcards: falseAliases: []ParameterSets:- Name: Id-dsName Position: Named IsRequired: true ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: false- Name: Id-dsId Position: Named IsRequired: true ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''Specifies the name of the device group. Required when using the ‘Name-dsId’ or ‘Name-dsName’ parameter sets.
Type: System.StringDefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: Name-dsId Position: Named IsRequired: true ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: false- Name: Name-dsName Position: Named IsRequired: true ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-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: System.Nullable`1[System.Boolean]DefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: Named IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-WhatIf
Section titled “-WhatIf”Runs the command in a mode that only reports what would happen without performing the actions.
Type: System.Management.Automation.SwitchParameterDefaultValue: ''SupportsWildcards: falseAliases:- wiParameterSets:- Name: (All) Position: Named 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.