No commit activity in last 3 years
No release in over 3 years
Fluentd output plugin for the Datadog Log Intake API, which will make logs viewable in the Datadog's log viewer.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.1
~> 10.3
~> 0.35.0
~> 3.0
~> 2.3.1

Runtime

~> 0.14
~> 1.8
 Project Readme

Datadog plugin for fluentd¶ ↑

fluent-plugin-datadog-log is an output plugin for fluentd which sends logs to Datadog.

<img src=“https://badge.fury.io/rb/fluent-plugin-datadog-log.svg” alt=“Gem Version” /> <img src=“https://secure.travis-ci.org/mumoshu/fluent-plugin-datadog-log.png” alt=“Build Status” />

Installation¶ ↑

This gem is hosted at RubyGems.org and can be installed using:

$ gem install fluent-plugin-datadog-log

kube-fluentd docker image would also include the gem.

Configuration¶ ↑

To send logs to Datadog, specify type datadog in a match clause of your fluentd configuration file, for example:

<match **>
  type datadog
  api_key <your api key>
  service myservice
  source mysource
  source_category mysourcecategory
  logset mylogset
</match>

‘api_key` can be omitted when the env var named DD_LOG_API_KEY is set instead.

Add ‘log_level debug` to enable debug logging which dumps every payload sent to Datadog.

Testing Datadog Connectivity within irb¶ ↑

cd path/to/fluent-plugin-datadog-log

bundle exec irb -r datadog/lib

c = Datadog::Log::Client.new(api_key:ENV['DD_LOG_API_KEY'],hostname:'myhost'); pl = c.send_payload(msg: 'foobar', source: 'myapp', source_category: 'stdout', service: 'irb', tags: %w|foo=bar|); puts pl
Copyright

Copyright 2017 Yusuke KUOKA All rights reserved.

License

Apache License, Version 2.0