Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grafana Data source skeleton for Metrist #1

Merged
merged 10 commits into from
Nov 29, 2022
Merged

Grafana Data source skeleton for Metrist #1

merged 10 commits into from
Nov 29, 2022

Conversation

fmterrorf
Copy link
Contributor

@fmterrorf fmterrorf commented Nov 26, 2022

Used npx @grafana/create-plugin to generate initial code and added the following changes

  1. Use npm over yarn
  2. Added .tools-version and instructions on how to quickly setup your environment
  3. Added the provider directory so that the metrist-datasource gets installed automatically after running npm run server
  4. Show the plugin's debug log by setting GF_LOG_FILTERS = "filters = plugin.metrist-grafana-datasource:debug" in the Dockerfile

Query

image

Datasource
image

image

// Unmarshal the JSON into our queryModel.
var qm queryModel

err := json.Unmarshal(query.JSON, &qm)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be the place where we call our backend to get values. The queryModel can hold the parameters that is required for the query

Quickest way to get started is to run

```bash
npm install npm@8 -g # Make sure you have NPM version 8 to avoid grafana-e2e cli issue
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added an issue to track this grafana/grafana#59425

@nikkocampbell nikkocampbell merged commit ee3c9a9 into main Nov 29, 2022
@fmterrorf fmterrorf deleted the skeleton branch December 1, 2022 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants