Add prefix option to config (#3)

* Added prefix option to set the hostname.

* updated README.md to include the prefix option and description.

* added entry to 30-influxdb.sh for the prefix option.

* changed the default value of prefix to localhost to map to the glances grafana dashboard.

* changed the prefix order and moved it to the end of the 30-influxdb.sh...because it did not work above it in the conf possibly?

* Changed the default to indicate localhost for the glances dashboard.

* Changed the sample to include the prefix localhost.
This commit is contained in:
T Morton 2019-02-05 15:02:38 -06:00 committed by Franck Nijhof
parent 10072da020
commit f8fb909f4c
3 changed files with 8 additions and 0 deletions

View file

@ -71,6 +71,7 @@ Example add-on configuration:
"username": "glances",
"password": "!secret glances_influxdb_password",
"database": "glances",
"prefix": "localhost",
"interval": 60
}
}
@ -148,6 +149,10 @@ The password for the above username option.
The name of the database to store all Glances information into.
#### Option `prefix`: `localhost`
The hostname to append for exported data **Note for the Grafana Glances dashboard set this to localhost.
**Note**: _It is strongly recommended to create a separate database for glances
and not store this in the same database name as Home Assistant._

View file

@ -39,6 +39,7 @@
"username": "glances",
"password": "",
"database": "glances",
"prefix": "localhost",
"interval": 60
}
},
@ -54,6 +55,7 @@
"username": "str",
"password": "str",
"database": "str",
"prefix": "str",
"interval": "int"
},
"leave_front_door_open": "bool?"

View file

@ -18,4 +18,5 @@ fi
echo "user=$(hass.config.get 'influxdb.username')"
echo "password=$(hass.config.get 'influxdb.password')"
echo "db=$(hass.config.get 'influxdb.database')"
echo "prefix=$(hass.config.get 'influxdb.prefix')"
} >> /etc/glances.conf