docker run -it -v /your_application.properties_folder:/iotdb-grafana-connector/config -p 8888:8888 apache/iotdb:<version>-grafana
SPRING_DATASOURCE_URL for example)docker run -it -p 8888:8888 apache/iotdb:<version>-grafana -e SPRING_DATASOURCE_URL=jdbc:iotdb://iotdb:6667/
grafana/src/main/resources/application.properties)| name | default value |
|---|---|
| SPRING_DATASOURCE_URL | jdbc:iotdb://127.0.0.1:6667/ |
| SPRING_DATASOURCE_USERNAME | root |
| SPRING_DATASOURCE_PASSWORD | root |
| SPRING_DATASOURCE_DRIVER_CLASS_NAME | org.apache.iotdb.jdbc.IoTDBDriver |
| SERVER_PORT | 8888 |
| TIMESTAMP_PRECISION | ms |
| ISDOWNSAMPLING | true |
| INTERVAL | 1m |
| CONTINUOUS_DATA_FUNCTION | AVG |
| DISCRETE_DATA_FUNCTION | LAST_VALUE |
Using docker compose, it contains three services: iotdb, grafana and grafana-connector
/docker/src/main/DockerCompose/docker-compose-grafana.ymldocker-compose up can start all three servicesdocker-compose up -d to start in the backgrounddocker-compose-grafana.yml to implement your requirements.volumes keyword to mount the data volume or file of the host into the container.{ip}:3000 to visit grafanaConfiguration, search SimpleJsongrafana-connector:8888, then click save and test. if Data source is working is shown, the configuration is finished.docker-compose downEnjoy it!