Datadog

Send logs to Datadog

The Datadog output plugin lets you ingest your logs into Datadog.

Before you begin, you need a Datadog account, a Datadog API key, and you need to activate Datadog Logs Management.

Configuration parameters

This plugin uses the following configuration parameters:

Key
Description
Default

Host

The Datadog server where you are sending your logs.

http-intake.logs.datadoghq.com

TLS

End-to-end security communications security protocol. Datadog recommends setting this to on.

off

compress

Optional. Compresses the payload in GZIP format. Datadog supports and recommends setting this to gzip.

none

apikey

none

Proxy

Optional. Specifies an HTTP proxy. The expected format of this value is http://host:port. HTTPS isn't supported.

none

provider

To activate remapping, specify the configuration flag provider with the value ecs.

none

json_date_key

Date key name for output.

timestamp

include_tag_key

If enabled, a tag is appended to the output. The key name is used tag_key property.

false

tag_key

The key name of tag. If include_tag_key is false, this property is ignored.

tagkey

dd_service

Recommended. The human readable name for your service generating the logs. For example, the name of your application or database. If not set, Datadog looks for the service using service remapper.

none

dd_source

Recommended. A human-readable name for the underlying technology of your service like postgres or nginx. If unset, Datadog looks for the source in the ddsource attribute.

none

dd_tags

Optional. The tags you want to assign to your logs in Datadog. If unset, Datadog will look for the tags in the ddtags attribute.

none

dd_message_key

By default, the plugin searches for the key log and remaps the value to the key message. If the property is set, the plugin will search the property name key.

none

dd_hostname

The host the emitted logs should be associated with. If unset, Datadog expects the host to be set with host, hostname, or syslog.hostname attributes. See Datadog Logs preprocessor documentation for recognized attributes.

none

workers

The number of workers to perform flush operations for this output.

0

header

Add additional arbitrary HTTP header key/value pair. Multiple headers can be set.

none

Configuration file

Get started with this configuration file:

pipeline:

  outputs:
    - name: datadog
      match: '*'
      host: http-intake.logs.datadoghq.com
      tls: on
      compress: gzip
      apikey: <my-datadog-api-key>
      dd_service: <my-app-service>
      dd_source: <my-app-source>
      dd_tags: team:logs,foo:bar
      dd_hostname: myhost

Troubleshooting

If you get a 403 Forbidden error response, double check that you have a valid Datadog API key and that you have activated Datadog Logs Management.

Last updated

Was this helpful?