Grafana data source plugin to connect to Timeplus and visualize streaming or batch queries.
As the core engine of Timeplus Enterprise, Proton is a single binary for streaming analytics. It helps data engineers and platform engineers solve complex real-time analytics use cases.
Grafana v11.3 or above (older versions may work but not verified)
A running Timeplus Proton or Timeplus Enterprise instance with TCP port 8463 (for database connection) and HTTP port 3218 (for query analazyer REST API).
The docker-compose.yaml in this folder ships a Grafana container, with the proton plugin pre-installed, as well as a data generator.
You start it with docker compose up and go to http://localhost:3000 to view the Carsharing dashboard.
A data source for Timeplus is created automatically.
You can define dashboard variables with this data source. Please make sure turning off the streaming query mode in the SQL to populate the variable values, and only return 1 or 2 columns. When there is 1 column returned, it will be set as both value and label. If there are 2 columns, the first column will be set as value and the second column as the label. You can also refer to __from and __to variables in the SQL to get the time range of the dashboard, e.g.:
SELECT distinct product_id FROM table(coinbase) where _tp_time < to_datetime($__to/1000) and _tp_time > to_datetime($__from/1000)-
Update Grafana plugin SDK for Go dependency to the latest minor version:
go get -u github.com/grafana/grafana-plugin-sdk-go go mod tidy
-
Build backend plugin binaries for Linux, Windows and Darwin:
brew install mage mage -v
mage build:linuxARM will fail, which is okay. Only 64bit OS are supported.
-
List all available Mage targets for additional commands:
mage -l
-
Install dependencies
npm install
-
Build plugin in development mode and run in watch mode (Ctrl+C to stop)
npm run dev
-
Build plugin in production mode
npm run build
-
Sign the plugin
export GRAFANA_ACCESS_POLICY_TOKEN=<YOUR_ACCESS_POLICY_TOKEN> npm run sign
-
Distribute the plugin
make package
Below you can find source code for existing app plugins and other related documentation.