Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ryotarai/fluent-plugin-dogstatsd
Fluend plugin for Dogstatsd, that is statsd server for Datadog.
https://github.com/ryotarai/fluent-plugin-dogstatsd
Last synced: about 1 month ago
JSON representation
Fluend plugin for Dogstatsd, that is statsd server for Datadog.
- Host: GitHub
- URL: https://github.com/ryotarai/fluent-plugin-dogstatsd
- Owner: ryotarai
- License: mit
- Created: 2014-09-08T06:12:42.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2020-03-01T12:23:47.000Z (almost 5 years ago)
- Last Synced: 2024-04-24T15:19:08.506Z (8 months ago)
- Language: Ruby
- Homepage:
- Size: 19.5 KB
- Stars: 20
- Watchers: 4
- Forks: 17
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# fluent-plugin-dogstatsd
Fluend plugin for Dogstatsd, that is statsd server for Datadog.
## 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
```
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```
## Example
### Count log lines
```apache
type tail
path /tmp/sample.log
tag datadog.increment.sample
format ...type dogstatsd
metric_type increment
flat_tags true
use_tag_as_key true```
### Histogram
```apache
type tail
path /tmp/sample.log
tag datadog.histogram.sample
format /^(?[^ ]*) (?[^ ]*)$/type dogstatsd
metric_type histogram
flat_tags true
use_tag_as_key true```
### MySQL threads
```apache
type mysql_query
tag datadog.histogram.mysql_threads
query SHOW VARIABLES LIKE 'Thread_%'type dogstatsd
metric_type histogram
value_key Value
flat_tags true
use_tag_as_key true```
## Contributing
1. Fork it ( https://github.com/ryotarai/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