< Back
Edit-DDMonitor
Post
NAME Edit-DDMonitor
SYNOPSIS
Edit a Datadog monitor
SYNTAX
Edit-DDMonitor [-MonitorObject] <PSObject> [<CommonParameters>]
DESCRIPTION
PARAMETERS
-MonitorObject <PSObject>
# A Datadog Monitor object. Can be created from scratch or retrieved with Get-DDMonitor, edited and fed to
Edit-DDMonitor.
If it's the later, the commandlet will make sure that only supported properties are supplied by removing
others.
The only required property is query.
Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
-------------------------- EXAMPLE 1 --------------------------
PS C:\\># Edit an existing object
$m = Get-DDMonitor -All | Select -First 1
$m += ' - EDITED'
Edit-DDMonitor -MonitorObject $m
-------------------------- EXAMPLE 2 --------------------------
PS C:\\># Edit an existing object and pass it by the pipeline
$m = Get-DDMonitor -All | Select -First 1
$m += ' - EDITED'
$m | Edit-DDMonitor
-------------------------- EXAMPLE 3 --------------------------
PS C:\\># Create a custom object and pass it to the commandlet
$o=[PSCustomObject]@{id = '869861'; query = 'avg(last_5m):sum:system.net.bytes_rcvd{*} > 10000'; name = 'CREATED
FROM SCRATCH' }
$o | Edit-DDMonitor
RELATED LINKS
http://docs.datadoghq.com/api/?lang=con ... nitor-edit
SYNOPSIS
Edit a Datadog monitor
SYNTAX
Edit-DDMonitor [-MonitorObject] <PSObject> [<CommonParameters>]
DESCRIPTION
PARAMETERS
-MonitorObject <PSObject>
# A Datadog Monitor object. Can be created from scratch or retrieved with Get-DDMonitor, edited and fed to
Edit-DDMonitor.
If it's the later, the commandlet will make sure that only supported properties are supplied by removing
others.
The only required property is query.
Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
-------------------------- EXAMPLE 1 --------------------------
PS C:\\># Edit an existing object
$m = Get-DDMonitor -All | Select -First 1
$m += ' - EDITED'
Edit-DDMonitor -MonitorObject $m
-------------------------- EXAMPLE 2 --------------------------
PS C:\\># Edit an existing object and pass it by the pipeline
$m = Get-DDMonitor -All | Select -First 1
$m += ' - EDITED'
$m | Edit-DDMonitor
-------------------------- EXAMPLE 3 --------------------------
PS C:\\># Create a custom object and pass it to the commandlet
$o=[PSCustomObject]@{id = '869861'; query = 'avg(last_5m):sum:system.net.bytes_rcvd{*} > 10000'; name = 'CREATED
FROM SCRATCH' }
$o | Edit-DDMonitor
RELATED LINKS
http://docs.datadoghq.com/api/?lang=con ... nitor-edit