Closed elzik closed 2 years ago
Hey @elzik
Where did you see the INFLUXDB_HOST
environmental variable referenced? I may have some old documentation I need to update
since the key for the influxdb host in the config file is web.influxdb.host
, the associated environmental variable is SCRUTINY_WEB_INFLUXDB_HOST
If you set that variable, everything should work correctly. I'll close this issue for now, but please reopen/comment if this doesnt work for you.
@AnalogJ thanks for your reply.
Where did you see the INFLUXDB_HOST environmental variable referenced?
the associated environmental variable is SCRUTINY_WEB_INFLUXDB_HOST
Thanks, that does get rid of the previous error I was seeing but I get another one now instead:
2022/10/30 13:34:53 No configuration file found at /opt/scrutiny/config/scrutiny.yaml. Using Defaults.
time="2022-10-30T13:34:53Z" level=info msg="Trying to connect to scrutiny sqlite db: /opt/scrutiny/config/scrutiny.db\n" type=web
time="2022-10-30T13:34:53Z" level=info msg="Successfully connected to scrutiny sqlite db: /opt/scrutiny/config/scrutiny.db\n" type=web
panic: failed to check influxdb setup status - Get "http://http/api/v2/setup": dial tcp: lookup http on 194.168.4.100:53: no such host
I find this even stranger given my docker run
command. I haven't specified a host of http://http
or an IP address of 194.168.4.100
anywhere. I wonder if some of my other environment variables are wrong - possibly just another docs issue? Would you like me to reopen this issue or create a new one?
i assume that you are using -e 'INFLUXDB_HOST'='http://192.168.0.12:8086'
then replace the env to -e 'SCRUTINY_WEB_INFLUXDB_HOST'='http://192.168.0.12:8086'
? It should be only the IP or container name like SCRUTINY_WEB_INFLUXDB_HOST=db
or SCRUTINY_WEB_INFLUXDB_HOST=192.168.0.12
@elzik ah. Those environmental variables are just for simplifying the scripts for configuring your influxDB manually. The webapp (running in docker) doesn't care about those environmental variables at all. only SCRUTINY_*
env variables (and the config file) are considered.
As @martadinata666 mentioned, you need to remove the scheme component from your environmental variable. SCRUTINY_WEB_INFLUXDB_HOST
expects an IP address or domain name (no http://
/https://
prefix)
Describe the bug When trying to set the
INFLUXDB_HOST
environment variable, the value set is ignored and Scrutiny still tries to connect tolocalhost:8086
. Perhaps I am using the wrong image (master-web
)?Expected behavior When the the
INFLUXDB_HOST
environment variable is set it should be honoured.Docker Run This is used on Unraid, so please excuse the noise in the
docker run
command. However, you can see thatINFLUXDB_HOST
is set tohttp://192.168.0.12:8086
Log
Docker Info