Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/timbuchwaldt/udpflux
An opinionated InfluxDB UDP only client
https://github.com/timbuchwaldt/udpflux
Last synced: about 1 month ago
JSON representation
An opinionated InfluxDB UDP only client
- Host: GitHub
- URL: https://github.com/timbuchwaldt/udpflux
- Owner: timbuchwaldt
- License: mit
- Created: 2015-06-13T17:46:55.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2020-03-03T21:43:30.000Z (almost 5 years ago)
- Last Synced: 2024-11-01T08:34:04.218Z (about 1 month ago)
- Language: Elixir
- Size: 130 KB
- Stars: 4
- Watchers: 1
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
- freaking_awesome_elixir - Elixir - An opinionated InfluxDB UDP only client. (ORM and Datamapping)
- fucking-awesome-elixir - udpflux - An opinionated InfluxDB UDP only client. (ORM and Datamapping)
- awesome-elixir - udpflux - An opinionated InfluxDB UDP only client. (ORM and Datamapping)
README
#UdpFlux
[![Build Status](https://travis-ci.org/timbuchwaldt/udpflux.svg)](https://travis-ci.org/timbuchwaldt/udpflux)This is an opinionated InfluxDB client, built to only work with InfluxDB 0.9 and it's UDP line protocol.
It's meant to instantly ship available events off to InfluxDB, taking the risk of loosing events due to UDP usage. It also let's InfluxDB decide upon the timestamp, as I can't be bothered to make sure the clocks are all fine ;)
# Usage
1. Instantiate the InfluxSender GenServer: `{:ok, pid} = UDPFlux.Sender.start_link(%{ip: "127.0.0.1", port: 4444})`
2. Create events: `point = %UDPFlux.DataPoint{name: "foo", tags: [key: "value"], fields: [value: 0.069]}`
3. Ship events: `UDPFlux.Sender.write_point(pid, point)`
4. Done. The point is now racing to the InfluxDB specified. Make sure to configure it correctly, the values below work for me```
[udp]
enabled = true
bind-address = "0.0.0.0:4444"
database = "foo"
batch-size = 100
batch-timeout = "10ms"
```Those values basically mean: Accept UDP on any IP and port 4444, write points to the DB "foo", wait up to 10ms or a batch of up to 100 data points. Whichever comes first triggers a write.