collectd-json-influxdb-proxy
Translate collectd JSON HTTP requests to Influx Data line protocol
Requirements
Compilation
dep ensure
go build .
Configuration for collectd
<Plugin "write_http">
<Node "collectd-json-influxdb-proxy">
URL "http://localhost:5826/"
Format "JSON"
BufferSize 129024
Timeout 5000
</Node>
</Plugin>
Running
./collectd-json-influxdb-proxy --debug-vars --log-requests
Example request
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
Copyright
(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