Skip to content

New datasink class InfluxdbSink

Mario Gonzalez Carpintero requested to merge mariog/labRemote:influxDB into devel

This adds a new data sink for InfluxDB, allowing communication between labRemote and InfluxDB based on "influxdb.h", a third-party InfluxDB library for C++ (https://github.com/orca-zhang/influxdb-cpp).

Uploads data points to an existing database in InfluxDB. A new measurement (data table) will be created if the specified one doesn't exist in the database.

The connectivity parameters (host, port and database name) need to be specified in the configuration file following the example in input-hw.json

A small detail about this MR is that since InfluxdbSink has to read the "DB name", "port" and "address" from the configuration, we have to pass the json to it from ps_monitor.cpp. Therefore, one needs to add a line sink->setConfiguration(configFile); right after the definition sink = ds.getDataSink(sinkName);. This detail means that the current ps_monitor.cpp is not fully sink-independent. I'm just wondering if this is ok or we should rather work on a fix.

Edited by Mario Gonzalez Carpintero

Merge request reports