mirror of
https://github.com/home-assistant/core.git
synced 2025-08-04 05:05:09 +02:00
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:
committed by
Pascal Vizeli
parent
9bea7d7d8b
commit
727a22f925
@@ -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 "
|
||||
|
Reference in New Issue
Block a user