Lean influxdb stats collector
$ npm install --save inlean
$ npm test
var 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:
host
the influx db host (ex.http://localhost:8086
) [required]db
the database name [optional]tags
an 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:
name
the metric name [required]val
the value [required]tags
an object containing the tags to apply [optional]ts
a timestamp [optional]
opts
must be an object and can have the following properties:
name
the metric name [required]val
the value [required]tags
an object containing the tags to apply [optional]ts
a timestamp [optional]
opts
must be an object and can have the following properties:
name
the metric name [required]key
the key to write (defaults tovalue
) [optional]val
the value [required]true
andfalse
will be correctly serialized
tags
an object containing the tags to apply [optional]ts
a timestamp [optional]
opts
must be an object and can have the following properties:
name
the metric name [required]key
the key to write (defaults tovalue
) [optional]val
the value [required]tags
an object containing the tags to apply [optional]ts
a timestamp [optional]
- only send in batches to limit http activity
Evan Lucas
MIT (See LICENSE
for more info)