Requires Grafana 10.4.0 or higher.
- The Harper plug-in is published in Grafana’s catalog and can be installed from there.
- Once installed, create a new Grafana Data Source using the plugin.
- Configure the full URL to your Harper cluster's operations API (defaults to port 9925)
- When replicated analytics are turned on you may target the GTM URL and get analytics for the whole cluster instead of being limited to seeing individual nodes in each configured data source.
- Replicated analytics are not enabled by default, please turn on in config by setting
ANALYTICS_REPLICATE=trueon all nodes in the cluster.
- Replicated analytics are not enabled by default, please turn on in config by setting
- Configure a Harper username and password that has permission to use the analytics ops in the Operations API.
- Dashboards can be created using same data source (one very basic example dashboard included with plugin)
- Please refer to the analytics Operations API docs for detailed information on what’s available to query.
-
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:
mage -v
-
List all available Mage targets for additional commands:
mage -l
-
Install dependencies
npm install
-
Build plugin in development mode and run in watch mode
npm run dev
-
Build plugin in production mode
npm run build
-
Run the tests (using Jest)
# Runs the tests and watches for changes, requires git init first npm run test # Exits after running all the tests npm run test:ci
-
Spin up a Grafana instance and run the plugin inside it (using Docker)
npm run server
-
Run the E2E tests (using Cypress)
# Spins up a Grafana instance first that we tests against npm run server # Starts the tests npm run e2e
-
Run the linter
npm run lint # or npm run lint:fix
- Run
npm run devin one terminal- This will watch your frontend code for changes
- Build the backend:
mage -v build:linuxARM64- Because this will run in a Docker container, you should always build it for Linux
- You will have to manually rerun this when the backend code changes
- Run
docker compose upin another terminal- This will need to be restarted when the backend is rebuilt
- Access Grafana at http://localhost:3000/