0.0.1 • Published 14 years ago
connect-logger-statsd v0.0.1
connect-logger-statsd
connect-logger-statsd is a middleware layer for Connect (running on node.js) that sends request log info to statsd.
Purpose
If you're running a web service in production, you want to know about your traffic load. Instead of scraping log files, this middleware will send some request log statistics to statsd (which you can feed into carbon/graphite, monitoring tools, etc).
As of now, we record the request time (as a statsd "timer") and request rates, broken down by response code.
Installation
$ npm install connect-logger-statsdUsage
Require the module:
var logger_statsd = require("connect-logger-statsd");And register the middleware:
app.use(logger_statsd({
host: "statsd.example.org",
port: 8125,
prefix: "example."
}));Options
hosthostname or IP of statsd server (default "localhost")portport of statsd server (default 8125)prefixstatsd metric name prefix. include the trailing "." (default "")
License
MPL 1.1/GPL 2.0/LGPL 2.1
0.0.1
14 years ago