Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mediocre/node-influx-udp
Write to InfluxDB using UDP.
https://github.com/mediocre/node-influx-udp
Last synced: 6 days ago
JSON representation
Write to InfluxDB using UDP.
- Host: GitHub
- URL: https://github.com/mediocre/node-influx-udp
- Owner: mediocre
- License: apache-2.0
- Archived: true
- Created: 2014-06-13T20:54:27.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2017-08-28T02:58:40.000Z (about 7 years ago)
- Last Synced: 2024-04-24T07:22:27.309Z (7 months ago)
- Language: JavaScript
- Homepage: https://www.npmjs.org/package/influx-udp
- Size: 35.2 KB
- Stars: 18
- Watchers: 22
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
- awesome-influxdb - node-influx-udp - Write to InfluxDB using its UDP interface (Client libraries / Unofficial)
README
# node-influx-udp
[![Build Status](https://travis-ci.org/mediocre/node-influx-udp.svg?branch=master)](https://travis-ci.org/mediocre/node-influx-udp)
[![Coverage Status](https://coveralls.io/repos/github/mediocre/node-influx-udp/badge.svg?branch=master)](https://coveralls.io/github/mediocre/node-influx-udp?branch=master)What
----
Write to InfluxDB using its UDP interface.When to use this
----------------
* When you need to write frequently and quickly
* When the speed of writes is more important than their reliability
* When you would use statsd, but you need to store more than simple numeric dataWhen not to use this
--------------------
* If you need to read from InfluxDB
* When you need to be absolutely certain every write has succeeded
* If you want any confirmation from InfluxDB whatsoeverWhere to get this
-----------------
`npm install --save influx-udp`How to use this
---------------
Configure InfluxDB for UDP: http://influxdb.com/docs/v0.7/api/reading_and_writing_data.html#writing-data-through-json-+-udp```javascript
var InfluxUdp = require('influx-udp');
var influxClient = new InfluxUdp({
port: 4444,
host: '127.0.0.1'
});var data = {
visitors: [
{
ip: '127.0.0.1',
username: 'harrison'
},
{
ip: '192.168.0.1',
username: 'shawn'
}
]
}influxClient.send(data);
/* Sends this, which will put two points into the "visitors" time series:
[
{
"name": "visitors",
"columns": ["ip", "username"],
"points": [
["127.0.0.1", "harrison"],
["192.168.0.1", "shawn"]
]
}
]
*/```