Lean influxdb stats collector
$ npm install --save inlean$ npm testvar Inlean = require('inlean')
var client = new Inlean({
host: 'http://127.0.0.1:8086'
, db: 'biscuits'
, tags: {
service: 'db'
}
})opts must be an object and can have the following properties:
hostthe influx db host (ex.http://localhost:8086) [required]dbthe database name [optional]tagsan object containing the tags to be used for every request [optional]
Note: the db is not automatically created. Use Client#createDb to create
sets the current database
creates a database with the given name
opts must be an object and can have the following properties:
namethe metric name [required]valthe value [required]tagsan object containing the tags to apply [optional]tsa timestamp [optional]
opts must be an object and can have the following properties:
namethe metric name [required]valthe value [required]tagsan object containing the tags to apply [optional]tsa timestamp [optional]
opts must be an object and can have the following properties:
namethe metric name [required]keythe key to write (defaults tovalue) [optional]valthe value [required]trueandfalsewill be correctly serialized
tagsan object containing the tags to apply [optional]tsa timestamp [optional]
opts must be an object and can have the following properties:
namethe metric name [required]keythe key to write (defaults tovalue) [optional]valthe value [required]tagsan object containing the tags to apply [optional]tsa timestamp [optional]
- only send in batches to limit http activity
Evan Lucas
MIT (See LICENSE for more info)