This PR add support for influxdb data logging into calaos_server.
What's needed
One instance of Influxdb up and running at IP:PORT
Configure Calaos_server
Configuration is located in local_config.xml
calaos_config set influxdb_host 127.0.0.1
calaos_config set influxdb_port 8086
calaos_config set influxdb_database calaos
calaos_config set influxdb_enabled true
calaos_config set influxdb_log_timeout 300
Configure IO
Enabling IO logging is done in configuration per IO, by adding
logged=true in io.xml file
At calaos_server startup, the database influxdb_database is created if it doesn't exists.
Each time an IO with logged=true configuration changed, value is send to influxdb host.
At startup and after a timeout of influxdb_log_timeoutseconds expires, all data marked as logged_true are send to influxdb host.
Schema used for influxdb logging is the following :
IOName,room=ROOM value=XX TIMESTAMP
Once data are insterted in influxdb database, they can be retrieve by using requests :
curl -G 'http://127.0.0.1:8086/query' --data-urlencode "db=calaos" --data-urlencode "q=SELECT \"value\" FROM \"T°\" WHERE \"room\"='livingroom'"
This PR add support for influxdb data logging into calaos_server.
What's needed
One instance of Influxdb up and running at IP:PORT
Configure Calaos_server
Configuration is located in local_config.xml
Configure IO
Enabling IO logging is done in configuration per IO, by adding
logged=true
in io.xml fileExample of configuration :
Behaviour
At calaos_server startup, the database influxdb_database is created if it doesn't exists. Each time an IO with logged=true configuration changed, value is send to influxdb host. At startup and after a timeout of
influxdb_log_timeout
seconds expires, all data marked as logged_true are send to influxdb host.Schema used for influxdb logging is the following :
Once data are insterted in influxdb database, they can be retrieve by using requests :