Datadog downtimes Create
Certified
Schedule a Datadog downtime that mutes monitor notifications
Datadog downtimes Create
Schedule a Datadog downtime that mutes monitor notifications
Creates a one-time downtime on one monitor (monitorId) or on every monitor with given monitor tags (monitorTags), for the part of them that matches scope. Needs the API key and an application key with the monitors_downtime scope.
A downtime needs an end: give end or duration to end it that long after start. A downtime without an end would mute the monitors until someone cancels it, which a failed flow may never do. Keep the returned downtimeId and cancel the downtime with downtimes.Cancel when the work is done.
type: io.kestra.plugin.datadog.downtimes.CreateExamples
Mute the production monitors of a service during a deployment
id: datadog_mute_during_deploy
namespace: company.observability
tasks:
- id: mute
type: io.kestra.plugin.datadog.downtimes.Create
apiKey: "{{ secret('DATADOG_API_KEY') }}"
appKey: "{{ secret('DATADOG_APP_KEY') }}"
scope: "env:prod AND service:orders"
monitorTags:
- "service:orders"
duration: PT30M
message: "Deployment {{ execution.id }}"
- id: deploy
type: io.kestra.plugin.core.log.Log
message: Deploying the orders service
- id: unmute
type: io.kestra.plugin.datadog.downtimes.Cancel
apiKey: "{{ secret('DATADOG_API_KEY') }}"
appKey: "{{ secret('DATADOG_APP_KEY') }}"
downtimeId: "{{ outputs.mute.downtimeId }}"
Installation
Our standard Docker images already include this plugin. If you use a -slim image or another setup, install it with the following command:
kestractl plugins get io.kestra.plugin:plugin-datadog --compatible-for $KESTRA_VERSION For kestractl, use your Kestra version with --compatible-for, or specify an exact plugin version.
Properties
apiKey *string
Datadog API key
The organization API key. Use a Kestra secret, e.g. {{ secret('DATADOG_API_KEY') }}.
scope *string
Scope
The monitor groups to mute, in the Datadog query syntax, such as env: prod AND service: orders. * mutes all the groups of the selected monitors.
apiUrl string
API base URL
Replaces https://api.<site> when set, for a proxy, a private link or a test server. Leave it empty for the public API. logs.Send does not use it: it calls the log intake, which has its own address (intakeUrl).
appKey string
Datadog application key
An application key. Datadog asks for it on every call that reads data or manages monitors and downtimes, so the tasks that only send data (events.Create, metrics.Submit, logs.Send) work without it. Create it with the scopes the task needs. Use a Kestra secret, e.g. {{ secret('DATADOG_APP_KEY') }}.
assets
Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.
io.kestra.core.models.assets.AssetsDeclaration
IGNOREFAILWARNAsset failure behavior
Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.
Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.
The assets consumed as inputs.
io.kestra.core.models.assets.AssetIdentifier
1The assets produced as outputs.
io.kestra.plugin.ee.assets.Dataset
1150{}1150io.kestra.plugin.ee.assets.File
1150{}1150io.kestra.plugin.ee.assets.Table
1150{}1150io.kestra.plugin.ee.assets.VM
1150{}1150io.kestra.core.models.assets.External
1150{}1150io.kestra.core.models.assets.Custom
11501Custom asset type
{}1150displayTimezone string
Display time zone
The time zone Datadog uses to show the downtime, such as Europe/Paris. UTC when it is not set.
duration string
Duration
How long the downtime lasts from its start (from now when start is not set), such as PT30M. Use instead of end.
end string
End
When the downtime ends, an ISO-8601 instant. Use instead of duration.
message string
Message
A note shown with the downtime.
monitorId integerstring
Monitor id
The id of the one monitor to mute. Use instead of monitorTags.
monitorTags array
Monitor tags
Mutes every monitor that carries all these monitor tags. Use instead of monitorId.
muteFirstRecoveryNotification booleanstring
Mute the first recovery notification
Also mutes the first recovery notification of a monitor that recovers during the downtime.
site string
Datadog site
The Datadog site of the organization, the domain you see in the Datadog URL: datadoghq.com (US1, the default), us3.datadoghq.com, us5.datadoghq.com, datadoghq.eu, ap1.datadoghq.com, ap2.datadoghq.com, uk1.datadoghq.com or ddog-gov.com. A key only works on the site of the organization that created it.
start string
Start
When the downtime starts, an ISO-8601 instant. It starts now when it is not set.
Outputs
downtimeId string
Downtime id
The id of the downtime, to give to downtimes.Cancel.
end string
date-timeEnd
When the downtime ends.
status string
Status
The status Datadog gives the downtime, such as scheduled or active.