You don’t necessarily need to alter RuuviCollector, if you are able to parse InfluxDB line protocol on the receiving side, as the connection between RuuviCollector and InfluxDB (in the standard setup) is standard HTTP POST. In this case all you need to do is to change the influxUrl configuration property.
For example, if I changed the influxUrl to
http://example.com:1337 then RuuviCollector would do a HTTP POST to:
or with influxUrl of
https://example.com/some/path/ it would post to:
(parameters depending on exact configurations) with following kind of data:
(note that with batch mode there can be multiple lines like the above (from different tags) in the post data if the measurements are received within the configured
influxBatchMaxTime (default 0.1 seconds) of each other)
If you need more fine-grained adjustments, you need to create your own implementation of a DBConnection, you can take a look at the InfluxDBConnection.java and DummyDBConnection.java for examples. You also need to add it to the config.