diff --git a/README.md b/README.md index 3ef5150..61c3b7c 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,8 @@ Example add-on configuration: "password": "!secret glances_influxdb_password", "database": "glances", "prefix": "localhost", - "interval": 60 + "interval": 60, + "protocol": "http" } } ``` @@ -173,6 +174,11 @@ The hostname to append for exported data. Defines the interval (in seconds) on how often Glances exports data to InfluxDB. +#### Option `influxdb`: `protocol` + +Use `http` or `https` to connect to InfluxDB. Set to `http` if using the +Community InfluxDB add-on + ## Adding Glances as a sensor into Home Assistant The Home Assistant Glances sensor platform is consuming the system information diff --git a/glances/config.json b/glances/config.json index 49caac0..00e61c3 100755 --- a/glances/config.json +++ b/glances/config.json @@ -53,7 +53,8 @@ "password": "", "database": "glances", "prefix": "localhost", - "interval": 60 + "interval": 60, + "protocol": "http" } }, "schema": { @@ -71,7 +72,8 @@ "password": "str", "database": "str", "prefix": "str", - "interval": "int" + "interval": "int", + "protocol": "match(^(http|https)$)" }, "leave_front_door_open": "bool?" }, diff --git a/glances/rootfs/etc/cont-init.d/glances.sh b/glances/rootfs/etc/cont-init.d/glances.sh index f8c2128..de798de 100644 --- a/glances/rootfs/etc/cont-init.d/glances.sh +++ b/glances/rootfs/etc/cont-init.d/glances.sh @@ -27,5 +27,6 @@ if bashio::config.true 'influxdb.enabled'; then echo "password=$(bashio::config 'influxdb.password')" echo "db=$(bashio::config 'influxdb.database')" echo "prefix=$(bashio::config 'influxdb.prefix')" + echo "protocol=$(bashio::config 'influxdb.protocol')" } >> /etc/glances.conf fi