Translate collectd JSON HTTP requests to Influx Data line protocol
- Go >= 1.9
dep ensure
go build .
<Plugin "write_http">
<Node "collectd-json-influxdb-proxy">
URL "http://localhost:5826/"
Format "JSON"
BufferSize 129024
Timeout 5000
</Node>
</Plugin>
./collectd-json-influxdb-proxy --debug-vars --log-requests
curl -H "Content-Type: application/json" -X POST -d '[{"values": [1901474177],"dstypes":["counter"],"dsnames":["value"],"time":1280959128,"interval":10,"host":"leeloo.octo.it","plugin":"cpu","plugin_instance": "0","type":"cpu", "type_instance":"idle"}]' http://localhost:5826/
curl http://localhost:5826/debug/vars
(c) 2018 Serguei Poliakov mailto:serguei.poliakov@gmail.com MIT (c) 2018 Piotr Roszatycki mailto:piotr.roszatycki@gmail.com MIT
Based on https://github.com/dex4er/perl-collectd-json-influxdb-proxy