zongkuiy / grafana4tb

make grafana connecting to thingsboard

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Grafana Support Thinsboard

A backend project for Grafana connecting to ThingsBoard server using Simple-Json-Datasource(a grafana datasource plugin).

Build

  • Build and maven install the thingsboard maven dependencies

  • Set the thingsboard version in grafana4tb pom.xml

        <thingsboard.version>2.4.1-SNAPSHOT</thingsboard.version>

  • maven build
        mvn clean package

Start Server

  • Copy the thingsboard configuration file(thingsboard.yml) and modify the bind port if needed

  • Start the server using the configuration file on above step

        java -jar grafana4tb-0.0.1-SNAPSHOT.jar --spring.config.location=/your/conf/dir/ 

Install the simple json datasource plugin on grafana

Config the datasource

  • Grafana Dashboard -> Configuration -> Datasources
  • Add datasoure -> filter 'simplejson'
  • Configuration as below:
Field Value
HTTP.URL http://<grafana4tb_host>:<grafana4tb_port>/grafana/<device_token>
HTTP.ACCESS server/client both work
Auth default
Basic Auth Details default

About

make grafana connecting to thingsboard


Languages

Language:Java 100.0%