DataDog/fluent-plugin-datadog

Name: fluent-plugin-datadog

Owner: Datadog, Inc.

Description: Fluentd output plugin for Datadog: https://www.datadog.com

Created: 2017-10-25 15:28:44.0

Updated: 2018-05-17 12:12:13.0

Pushed: 2018-05-24 14:37:22.0

Homepage: null

Size: 12

Language: Ruby

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Fluentd output plugin for Datadog

It mainly contains a proper JSON formatter and a socket handler that streams logs directly to Datadog - so no need to use a log shipper if you don't wan't to.

Pre-requirements

To add the plugin to your fluentd agent, use the following command:

gem install fluent-plugin-datadog

If you installed the td-agent instead

/usr/sbin/td-agent-gem install fluent-plugin-datadog
Usage
Configure the output plugin

To match events and send them to Datadog, simply add the following code to your configuration file.

TCP example

tch events tagged with "datadog.**" and
nd them to Datadog
ch datadog.**>

ype datadog
d awesome_agent
i_key <your_api_key>

Optional
clude_tag_key true
g_key 'tag'

Optional tags
_sourcecategory 'aws'
_source 'rds' 
_tags 'app:mysql,env:prod'

tch>

After a restart of FluentD, any child events tagged with datadog are shipped to your platform.

Validation

Let's make a simple test.

l -X POST -d 'json={"message":"hello Datadog from fluentd"}' http://localhost:8888/datadog.test

Produces the following event:


"message": "hello Datadog from fluentd"

fluent-plugin-datadog properties

Let's go deeper on the plugin configuration.

As fluent-plugin-datadog is an output_buffer, you can set all output_buffer properties like it's describe in the fluentd documentation.

| Property | Description | Default value | |————-|————————————————————————–|—————-| | api_key | This parameter is required in order to authenticate your fluent agent. | nil | | use_json| Event format, if true, the event is sent in json format. Othwerwise, in plain text. | true | | include_tag_key| Automatically include tags in the record. | false | | tag_key| Name of the tag attribute, if they are included. | “tag” | | use_ssl | If true, the agent initializes a secure connection to Datadog. In clear TCP otherwise. | true | |max_retries| The number of retries before the output plugin stops. Set to -1 for unlimited retries | -1 | | max_retries | The number of retries before the output plugin stops. Set to -1 for unlimited retries | -1 | | dd_source | This tells Datadog what integration it is | nil | | dd_sourcecategory | Multiple value attribute. Can be used to refine the source attribtue | nil | | dd_tags | Custom tags with the following format “key1:value1, key2:value2” | nil |


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.