I need to configure Grafana for use inside a Docker container writing to an InfluxDB server running inside the same container and be able to do so in docker-compose (for both repeatability and speed).
I’ve learned how (in theory) to map entries in the grafana.ini to ENV variables specified at the command line, or in the config. However, when I apply the values that seem to work in the GUI (in the case where the config entries are not given) I get an error of the following form:
service init failed: failed to connect to database: unknown database type: influxdb
In this case, I have given the ENV variables:
- GF_DATABASE_TYPE=influxdb
- GF_DATABASE_URL=influxdb://influxdb:8086/station
If, instead I have:
- GF_DATABASE_URL=http://influxdb:8086/station
then the error message is:
service init failed: failed to connect to database: unknown database type: http
I can’t locate any existing topics on this site (or elsewhere) that address this, and, as I said, when I configure Grafana through the GUI interface, it appears to work. An image showing that page:
What am I missing?