This image provisions Grafana with the following:
- Datasource to connect to PostgreSQL database with data from the car (Works with CarConnectivity-plugin-database)
- Datasource to obtain live data from the vehicle through CarConnectivity WebUI (Works with CarConnectivity-plugin-webui)
- Dashboards visualizing the data
More information can be found on Github: https://github.com/tillsteinbach/CarConnectivity-grafana/
- Docker 20.10.10 or later (if you are new to Docker, see Installing Docker and Docker Compose or for Raspberry Pi), docker-compose needs to be at least version 1.27.0 (you can check with
docker compose --version) - A Machine that's always on, so VWsFriend can continually fetch data
- External internet access, to talk to the servers
- Clone or download the files docker-compose.yml and .env
- To create myconfig.env copy .env file and make changes according to your needs
- create your carconnectivity.json configuration file as described in the CarConnectivity repository. The minimal viable configuration for carconenctivity with grafana is:
{
"carConnectivity": {
"log_level": "error", // set the global log level, you can set individual log levels in the connectors and plugins
"connectors": [
{
// Definition for your connector
...
}
],
"plugins": [
{
"type": "webui",
"config": {
"username": "admin",
"password": "secret",
}
},{
"type": "database",
"config":{
"db_url": "postgresql://admin:secret@postgresdbbackend:5432/carconnectivity"
}
}
]
}
}Webui username and password must match the values in your .env file. db_url must match your database configuration in the .env file.
- Start the stack using your configuration.
docker compose --env-file ./myconfig.env up- Open a browser to use the webinterface on http://IP-ADDRESS:4000
- Open a browser to use grafana on http://IP-ADDRESS:3000 with the user and password you selected