Giter Club home page Giter Club logo

fluent-plugin-dogstatsd's Introduction

fluent-plugin-dogstatsd

Fluend plugin for Dogstatsd, that is statsd server for Datadog. This plugin was forked to use dogstatsd-ruby package version 4, which provide better performance (DNS Caching included).

Installation

$ gem install fluent-plugin-dogstatsd

Usage

$ echo '{"type": "increment", "key": "apache.requests", "tags": {"url": "/"}}' | fluent-cat dogstatsd.hello
$ echo '{"type": "histogram", "key": "apache.response_time", "value": 10.5, "tags": {"url": "/hello"}}' | fluent-cat dogstatsd.hello
$ echo '{"type": "event", "title": "Deploy", "text": "New revision"}' | fluent-cat dogstatsd.hello

Supported types are increment, decrement, count, gauge, histogram, timing, set and event.

Configuration

<match dogstatsd.*>
  type dogstatsd

  # Dogstatsd host
  host localhost

  # Dogstatsd port
  port 8125

  # Use tag of fluentd record as key sent to Dogstatsd
  use_tag_as_key false

  # (Treat fields in a record as tags)
  # flat_tags true

  # (Metric type in Datadog.)
  # metric_type increment

  # Default: "value"
  # value_key Value
</match>

Example

Count log lines

<source>
  type tail
  path /tmp/sample.log
  tag datadog.increment.sample
  format ...
</source>

<match datadog.increment.*>
  type dogstatsd
  metric_type increment
  flat_tags true
  use_tag_as_key true
</match>

Histogram

<source>
  type tail
  path /tmp/sample.log
  tag datadog.histogram.sample
  format /^(?<value>[^ ]*) (?<host>[^ ]*)$/
</source>

<match datadog.histogram.*>
  type dogstatsd
  metric_type histogram
  flat_tags true
  use_tag_as_key true
</match>

MySQL threads

<source>
  type mysql_query
  tag datadog.histogram.mysql_threads
  query SHOW VARIABLES LIKE 'Thread_%'
</source>

<match datadog.histogram.mysql_threads>
  type dogstatsd
  metric_type histogram
  value_key Value
  flat_tags true
  use_tag_as_key true
</match>

Contributing

  1. Fork it ( https://github.com/soluto/fluent-plugin-dogstatsd/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

fluent-plugin-dogstatsd's People

Contributors

jridgewell avatar renovate-bot avatar ryotarai avatar shaikatz avatar sonots avatar uryyyyyyy avatar

Watchers

 avatar  avatar  avatar

fluent-plugin-dogstatsd's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

bundler
Gemfile
github-actions
.github/workflows/gempush.yml
  • actions/checkout v2
  • actions/setup-ruby v1
.github/workflows/run_tests.yml
  • actions/checkout v2
  • actions/setup-ruby v1

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.