https://github.com/payintech/caddy-datadog
Datadog plugin for Caddy HTTP/2 web server
https://github.com/payintech/caddy-datadog
caddy caddyserver datadog plugin statsd
Last synced: 6 months ago
JSON representation
Datadog plugin for Caddy HTTP/2 web server
- Host: GitHub
- URL: https://github.com/payintech/caddy-datadog
- Owner: payintech
- License: mit
- Created: 2017-05-05T17:43:05.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2019-08-12T12:42:20.000Z (almost 7 years ago)
- Last Synced: 2024-06-19T05:45:59.428Z (about 2 years ago)
- Topics: caddy, caddyserver, datadog, plugin, statsd
- Language: Go
- Homepage:
- Size: 21.5 KB
- Stars: 15
- Watchers: 4
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Datadog plugin for Caddy HTTP/2 web server
Datadog plugin allow Caddy HTTP/2 web server to send some metrics to Datadog via statsd, and optionally also send traces to Datadog APM.
*****
## Configuration
In your Caddy configuration file, you have to use the directive `datadog`
to enable Datadog metric harvester on each configuration blocks where it
was needed.
In the following example, all requests on _example-d.com_ won't be harvested.
example-a.com {
datadog "area" # area is optional
}
example-b.com {
datadog "area" { # area is optional
statsd 127.0.0.1:8125 # Optional - can be any valid hostname with port
tags tag1 tag2 tagN # Optional
namespace caddy. # Optional
trace_enabled # Optional - whether to enable tracing to Datadog APM
trace_agent 127.0.0.1:8126 # Optional - can be any valid hostname with port
service_name caddy # Optional
}
}
example-c.com {
datadog
}
example-d.com {
}
**Note:** As you can see on the previous example, the directive `datadog`
can be configured only once.
## Metrics
The plugin send following metrics to Datadog:
| Metric | Type | Unit |
| ------------------------- | ----- | ------------------- |
| caddy.requests.per_s | Gauge | requests per second |
| caddy.responses.1xx | Gauge | requests |
| caddy.responses.2xx | Gauge | requests |
| caddy.responses.3xx | Gauge | requests |
| caddy.responses.4xx | Gauge | requests |
| caddy.responses.5xx | Gauge | requests |
| caddy.responses.size_byte | Gauge | bytes |
| caddy.responses.duration | Gauge | nanoseconds |
## License
This project is released under terms of the [MIT license](https://raw.githubusercontent.com/payintech/caddy-datadog/master/LICENSE).