Skip to content

New-LMDatasourceGraph

Terminal window
New-LMDatasourceGraph -RawObject <Object> -DatasourceId <Object> [-ProgressAction <ActionPreference>] [-WhatIf]
[-Confirm] [<CommonParameters>]
Terminal window
New-LMDatasourceGraph -RawObject <Object> -DatasourceName <Object> [-ProgressAction <ActionPreference>]
[-WhatIf] [-Confirm] [<CommonParameters>]

The New-LMDatasourceGraph function creates a new graph for a specified datasource in LogicMonitor.

Terminal window
#Create graph using datasource ID
New-LMDatasourceGraph -RawObject $graphConfig -DatasourceId 123
Terminal window
#Create graph using datasource name
New-LMDatasourceGraph -RawObject $graphConfig -DatasourceName "MyDatasource"

The raw object representing the graph configuration. Use Get-LMDatasourceGraph to see the expected format.

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

The ID of the datasource to which the graph will be added. Required for dsId parameter set.

Type: Object
Parameter Sets: dsId
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

The name of the datasource to which the graph will be added. Required for dsName parameter set.

Type: Object
Parameter Sets: dsName
Aliases:
Required: True
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 LogicMonitor.DatasourceGraph object.

Section titled “Returns LogicMonitor.DatasourceGraph object.”

You must run Connect-LMAccount before running this command.