0.1.5 • Published 6 years ago
influx-batch-sender v0.1.5
influx-batch-sender
buffer message and send them in a bulk.
useage
npm i influx-batch-sender --save
or
yarn add influx-batch-sender
const Sender = require('../index');
const sender = new Sender({
host: 'INFLUXDB_HOST',
db: 'DATABASE',
measurement: 'MEASUREMENT',
duration: 2000,
records:200
});
setInterval(() => {
sender.addMessage({
tags: {
foo: 'sdasda'+Math.random(),
bar: 'test'
},
fields: {
data: "d123asda"
}
});
}, Math.random() * 100)
0.1.5
6 years ago