StatsD backend for Circonus, send metrics via HTTPTRAP check. The existing graphite backend was used as a template.
- Install StatsD
- Copy
circonus.js
intobackends/
(where StatsD is installed) - Create HTTPTRAP check in Circonus
- Configure Circonus backend (see below)
- Start, or restart, StatsD
In the StatsD configuration file:
- Add
"./backends/circonus"
tobackends: [...]
array - Add
circonus: {...}
section
circonus: {
check_url: ""
, cert_url: ""
, globalPrefix: ""
, prefixCounter: ""
, prefixTimer: ""
, prefixGauge: ""
, prefixSet: ""
, sendTimerDerivatives: true
, sendMemoryStats: true
}
option | required | type | description |
---|---|---|---|
check_url |
yes | string | HTTPTRAP check submission URL to which metrics will be sent |
cert_url |
no* | string | broker CA certificate URL [default: http://login.circonus.com/pki/ca.crt]. * Note: URL must be set for a Circonus Inside installation. |
globalPrefix |
no | string | global prefix to use for sending metrics to Circonus [default: ""] |
prefixCounter |
no | string | prefix for counter metrics [default: "counters"] |
prefixTimer |
no | string | prefix for timer metrics [default: "timers"] |
prefixGauge |
no | string | prefix for gauge metrics [default: "gauges"] |
prefixSet |
no | string | prefix for set metrics [default: "sets"] |
sendTimerDerivatives |
no | boolean | send standard StatsD derivatives for timer metrics [default: true]. Raw timer data is sent to Circonus as a histogram. |
sendRawTimers |
no | boolean | send raw timers (as an array) to Circonus as a histogram. [default: false] Timers are sent as pre-bucketed histograms. |
sendMemoryStats |
no | boolean | send memory utilization metrics (process.memoryUsage()) for StatsD process [default: true] |
The bare minimum would be:
- Create an HTTPTRAP check in Circonus.
- Create a config (skeleton below, e.g.
config.js
). - Put the submission url, from the new check, between the quotes next to
check_url
and save the config. - Start statsd as usual e.g.
node stats.js config.js
- Send metrics to port 8125.
{
port: 8125,
address: "127.0.0.1",
flushInterval: 60000,
backends: [ "./backends/circonus" ],
keyNameSanitize: false,
circonus: {
check_url: "..."
}
}