Datadog metrics Submit
Certified
Submit a custom metric point to Datadog
Datadog metrics Submit
Submit a custom metric point to Datadog
Sends a gauge, a count or a rate to the Datadog metrics intake. Needs the API key only.
Two ways to describe the data. Give metric and value for one point or give series to send several series in one call, in the shape of the Datadog POST /api/v2/series body. A point without timestamp gets the time the task runs. Giving both or neither, is an error.
Datadog accepts a point up to 1 hour in the future and up to 1 hour in the past and answers before the point is processed: a point it rejects later does not make the task fail.
type: io.kestra.plugin.datadog.metrics.SubmitExamples
Report the number of rows a pipeline loaded
id: datadog_row_count
namespace: company.observability
tasks:
- id: report_rows
type: io.kestra.plugin.datadog.metrics.Submit
apiKey: "{{ secret('DATADOG_API_KEY') }}"
metric: kestra.orders.rows_loaded
value: 1250
metricType: GAUGE
tags:
- "env:prod"
- "flow:{{ flow.id }}"
Send two series in one call
id: datadog_two_series
namespace: company.observability
tasks:
- id: report
type: io.kestra.plugin.datadog.metrics.Submit
apiKey: "{{ secret('DATADOG_API_KEY') }}"
series:
- metric: kestra.orders.rows_loaded
type: 3
points:
- value: 1250
tags: ["env:prod"]
- metric: kestra.orders.rows_rejected
type: 3
points:
- value: 3
tags: ["env:prod"]
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') }}.
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
{}1150host string
Host
The host the series is reported for. Sent as a resource of type host.
interval integerstring
Interval
The length in seconds of the period a COUNT or RATE value covers.
metric string
Metric name
The name of the metric, such as kestra.orders.rows_loaded. Use with value.
metricType string
COUNTRATEGAUGEMetric type
GAUGE (default), COUNT or RATE. With RATE, set interval to the length of the period the value covers.
series array
Series
A list of series in the shape of the Datadog POST /api/v2/series body (metric, type, points, tags, resources, unit, interval). type is a number there: 1 count, 2 rate, 3 gauge. A point timestamp is a number of seconds or an ISO-8601 instant. Use instead of metric and value: metricType, tags, host, unit, interval and timestamp then go on each entry.
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.
timestamp string
Time of the point
When the value was measured, an ISO-8601 instant. The time the task runs when it is not set.
unit string
Unit
The unit of the metric, such as row.
value numberstring
Metric value
The value of the point. Use with metric.
Outputs
points integer
Points sent
The number of points in the request.
series integer
Series sent
The number of series in the request.