Skip to content

DiamondMofeng/grafana-greptime-datasource

Repository files navigation

GreptimeDB Datasource Plugin for Grafana

Grafana x GreptimeDB

CI downloads downloads

Features

Write sql or use the visual query editor in Grafana to query data from GreptimeDB, then visualization happens! Plugin Example

About GreptimeDB

Greptime provides cloud-scale, fast and efficient Time Series Data Infrastructure

Visit Greptime's Official Website here

Install

  • From Grafana Plugin Marketplace
  • Using grafana cli
    • grafana-cli plugins install mofengfeng-greptimedb-datasource
  • Using docker to start a grafana instance with plugin installed
    • docker run -d -p 3000:3000 --name=grafana -e "GF_INSTALL_PLUGINS=mofengfeng-greptimedb-datasource" grafana/grafana

Using GreptimeDB in Grafana

For detailed instructions, see https://github.com/DiamondMofeng/grafana-greptime/blob/main/docs/Using%20GreptimeDB%20in%20Grafana.md

TODO List

  • Add support for more query protocols. Only Sql is supported now.
  • Add more test cases

Commands

  1. Install dependencies

    yarn install
  2. Build plugin in development mode or run in watch mode

    yarn dev
    
    # or
    
    yarn watch
  3. Build plugin in production mode

    yarn build
  4. Run the tests (using Jest)

    # Runs the tests and watches for changes
    yarn test
    
    # Exists after running all the tests
    yarn lint:ci
  5. Spin up a Grafana instance and run the plugin inside it (using Docker)

    yarn server
  6. Run the linter

    yarn lint
    
    # or
    
    yarn lint:fix