test connection without needing admin rights (#7947)
SHOW DIAGNOSTICS always needs admin privileges on influxdb. For the purposes of home-assistant this is too much. Use 'SHOW SERIES' to have a relatively lightweight query which only needs READ privileges.
This commit is contained in:
parent
9bea7d7d8b
commit
727a22f925
1 changed files with 1 additions and 1 deletions
|
@ -96,7 +96,7 @@ def setup(hass, config):
|
|||
|
||||
try:
|
||||
influx = InfluxDBClient(**kwargs)
|
||||
influx.query("SHOW DIAGNOSTICS;", database=conf[CONF_DB_NAME])
|
||||
influx.query("SHOW SERIES LIMIT 1;", database=conf[CONF_DB_NAME])
|
||||
except exceptions.InfluxDBClientError as exc:
|
||||
_LOGGER.error("Database host is not accessible due to '%s', please "
|
||||
"check your entries in the configuration file and that "
|
||||
|
|
Loading…
Add table
Reference in a new issue