command module
Version: v0.0.0-...-7129faf Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Mar 28, 2021 License: BSD-2-Clause Imports: 8 Imported by: 0


test Go Report Card


Threadle can ingest metrics from a Datadog Agent and send them to a custom storage using different plugins.

A use case example would be using Elasticsearch to store the timeseries and having Grafana visualize data.

Datadog Grafana


Install threadle:

$ go get -u
go: downloading

Threadle discards all the messages coming from the Datadog Agent out of the box, so you have to enable at least one output plugin. Create a basic configuration file named threadle.yaml:


Launch Threadle from the same directory containing the config file:

$ $GOPATH/bin/threadle -c /path/to/threadle.yaml
Initializing plugin: logger

Alternatively, you can use the Docker image to achieve the same:

$ docker run -e THREADLE_PLUGINS="{\"logger\":{}}" masci/threadle:unstable
INFO Initializing plugin: logger
INFO Threadle running at

By default Threadle listens on port 3060, point the Datadog Agent there by adding the following to your datadog.yaml configuration file:

  "http://localhost:3060": ""

Restart the Datadog Agent, you're all set.


Threadle is a small tool I built for myself so it doesn't offer much out of the box, but adding a plugin shouldn't be hard.


The logger plugin just prints the payload received from the Datadog Agent on stderr in JSON format. It is mostly intended for debugging but it has an option to make the log lines ECS compatible, in case you want to send them straight to an index in Elasticsearch without additional setup. The plugin only has one configuration option:

  ecs_compatible: true

The elasticsearch plugin transforms Datadog metric points into Elasticsearch documents that will be stored in a timeseries fashion, using the Bulk API to ingest data.

The plugin accepts few config options:

  • cloudid to setup your ES cluster location if you're using Elastic Cloud.
  • addresses can be used to specify the URL of the ES nodes to use when cloudid is not set
  • username and password to authenticate the client
  • index to specify which ES index to use to store data
  • exclude_metrics to ignore Datadog metrics using one or more regexps matching the metric name

A fully functional example might be:

    username: "test"
    password: "secret!"
    index: "datadog-agent"
      - .*datadog.*


The Go Gopher

There is no documentation for this package.

Source Files


Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL