Skip to content

New-LMDatasourceGraph

Syntax

dsId

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

dsName

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

Description

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

Examples

Example 1

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

Example 2

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

Parameters

-RawObject

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

-DatasourceId

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

-DatasourceName

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

-ProgressAction

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

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

None. You cannot pipe objects to this command.

Outputs

Returns LogicMonitor.DatasourceGraph object.

Notes

You must run Connect-LMAccount before running this command.