Ecosystem Integration

    Install Grafana

    • Download url:
    • Version >= 4.4.1

    Install data source plugin

    • Plugin name: simple-json-datasource
    • Download url:

    After downloading this plugin, use the grafana-cli tool to install SimpleJson from the commandline:

    Alternatively, manually download the .zip file and unpack it into grafana plugins directory.

    • (Windows)
    • /var/lib/grafana/plugins (Linux)
    • /usr/local/var/lib/grafana/plugins(Mac)

    Then you need to restart grafana server, then you can use browser to visit grafana.

    If you see “SimpleJson” in “Type” of “Add data source” pages, then it is install successfully.

    Or, if you meet following errors:

    1. Unsigned plugins were found during plugin initialization. Grafana Labs cannot guarantee the integrity of these plugins. We recommend only using signed plugins.
    2. The following plugins are disabled and not shown in the list below:

    Please try to find config file of grafana(eg. customer.ini in windows, and /etc/grafana/grafana.ini in linux), then add following configuration:

    Start Grafana

    If Unix is used, Grafana will start automatically after installing, or you can run sudo service grafana-server start command. See more information .

    If Mac and homebrew are used to install Grafana, you can use homebrew to start Grafana. First make sure homebrew/services is installed by running brew tap homebrew/services, then start Grafana using: brew services start grafana. See more information hereGrafana Connector (Not Recommended) - 图2 (opens new window).

    IoTDB installation

    See https://github.com/apache/iotdb

    Start IoTDB-Grafana-Connector

    • Option one

    Import the entire project, after the maven dependency is installed, directly runiotdb/grafana-connector/rc/main/java/org/apache/iotdb/web/grafanadirectoryTsfileWebDemoApplication.java, this grafana connector is developed by springboot

    In /grafana/target/directory

    If following output is displayed, then iotdb-grafana-connector connector is successfully activated.

    1. $ java -jar iotdb-grafana-connector-{version}.war
    2. . ____ _ __ _ _
    3. /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
    4. ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
    5. \\/ ___)| |_)| | | | | || (_| | ) ) ) )
    6. =========|_|==============|___/=/_/_/_/
    7. :: Spring Boot :: (v1.5.4.RELEASE)
    8. ...

    To configure properties, move the grafana-connector/src/main/resources/application.properties to the same directory as the war package (grafana/target)

    The default port of Grafana is 3000, see http://localhost:3000/

    Username and password are both “admin” by default.

    Add data source

    Select Data Sources and then Add data source, select SimpleJson in Type and is http://localhost:8888. After that, make sure IoTDB has been started, click “Save & Test”, and “Data Source is working” will be shown to indicate successful configuration.

    Design in dashboard

    Add diagrams in dashboard and customize your query. See http://docs.grafana.org/guides/getting\_started/

    Grafana Connector (Not Recommended) - 图6

    config grafana

    The specific configuration information of interval is as follows

    <1h: no sampling

    1h~1d : intervals = 1m

    1d~30d:intervals = 1h

    >30d:intervals = 1d

    After configuration, please re-run war package

    1. java -jar iotdb-grafana-connector-{version}.war