influxdb-udp

UDP-based writing to InfluxDB

Usage no npm install needed!

<script type="module">
  import influxdbUdp from 'https://cdn.skypack.dev/influxdb-udp';
</script>

README

node-influxdb-udp

NPM version Build status Test coverage Dependency Status License Downloads Gittip

UDP-based InfluxDB writing utility similar to influx-udp, but with a slightly different API.

API

var influx = new Influx(options)

var Influx = require('influxdb-udp');
var influx = new Influx({

})

Options:

  • port
  • host

influx.write(name, data)

Write to a series with a name with data. data can either be a single hash object or an array of them.

influx.write('my_logs', {
  count: 1
})

influx.write('my_logs', [
  {
    count: 1
  },
  {
    count: 2
  }
])

Note that when writing multiple data points, an intersection of all the columns will be used.