Backend plugin for statsd to publish output to the circonus custom metrics API over HTTPS.
Install statsd normally. We'll call the root directory of the statsd install $STATSD_HOME
From your $STATSD_HOME
directory run $ npm install circonus-statsd-backend
will install this module into the appropriate place, and the configurations below will reference it as a backend.
For now you can pull circonus.js and put it in the backends directory of your statsd and it will be configurable like below.
To set up the circonus backend, you need a circonus account and API key. Everything else is optional. Any of the configurations below can be put into a circonusConfig.js and used as a statsd config on startup.
$ bin/statsd circonusConfig.js
{
backends: [ "circonus-statsd-backend" ],
circonus: {
trapURL: "YOUR_TRAP_URL_HERE"
}
}
To output additional logging information, add the debug parameter set to true. It will be more verbose, and can be helpful to tell what exactly is being sent to circonus.
{
backends: [ "circonus-statsd-backend" ],
circonus: {
trapURL: "YOUR_TRAP_URL_HERE"
debug: "true"
}
}
If you are using a develoment version of circonus and you are using a self signed certificate, you may get this error (assuming you have the debug flags set to true):
Error making circonus request: SELF_SIGNED_CERT_IN_CHAIN
For develoment only, you can set this environment variable prior to starting your statsd daemon
export NODE_TLS_REJECT_UNAUTHORIZED="0"
Do not use this in production. It is unsafe.