From 39ee05cf0fac091572a235cb23daed7bb68f5a8f Mon Sep 17 00:00:00 2001 From: Sebastien Douheret Date: Sat, 20 Jul 2019 13:30:50 +0200 Subject: Allow to set host+port using params in config.json Default influxDB host and port can now be set using params field of plugins section of harvester-config.json file. For example : "plugins": [ { "uid": "influxdb", "info": "Plugins that handle influxdb read and write", "libs": "influxdb.ctlso", "params": { "host": "localhost", "port": 8086 } } ], Change-Id: Iff0fffe1d0883304413d887986991a207b840aa7 Signed-off-by: Sebastien Douheret --- conf.d/project/etc/harvester-config.json | 60 +++++++++++++++++--------------- 1 file changed, 31 insertions(+), 29 deletions(-) (limited to 'conf.d') diff --git a/conf.d/project/etc/harvester-config.json b/conf.d/project/etc/harvester-config.json index 368be7f..da9d6e4 100644 --- a/conf.d/project/etc/harvester-config.json +++ b/conf.d/project/etc/harvester-config.json @@ -1,31 +1,33 @@ { - "$schema": "http://iot.bzh/download/public/schema/json/ctl-schema.json", - "metadata": { - "uid": "Harvester", - "version": "1.0", - "api": "harvester", - "info": "Data collection binding" - }, - "plugins": [ - { - "uid": "influxdb", - "info": "Plugins that handle influxdb read and write", - "libs": "influxdb.ctlso" - } - ], - - "onload": [ - { - "uid": "init_db", - "info": "Ensure that InfluxDB is up", - "action": "plugin://influxdb#influxdb_ping" - } - ], - - "controls": [ - { - "uid": "write", - "action": "plugin://influxdb#write_to_influxdb" - } - ] + "$schema": "http://iot.bzh/download/public/schema/json/ctl-schema.json", + "metadata": { + "uid": "Harvester", + "version": "1.0", + "api": "harvester", + "info": "Data collection binding" + }, + "plugins": [ + { + "uid": "influxdb", + "info": "Plugins that handle influxdb read and write", + "libs": "influxdb.ctlso", + "params": { + "host": "localhost", + "port": 8086 + } + } + ], + "onload": [ + { + "uid": "init_db", + "info": "Ensure that InfluxDB is up", + "action": "plugin://influxdb#influxdb_ping", + } + ], + "controls": [ + { + "uid": "write", + "action": "plugin://influxdb#write_to_influxdb" + } + ] } -- cgit 1.2.3-korg