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

Support Datasources in grr serve #525

Merged
merged 2 commits into from
Nov 26, 2024
Merged

Support Datasources in grr serve #525

merged 2 commits into from
Nov 26, 2024

Conversation

K-Phoen
Copy link
Member

@K-Phoen K-Phoen commented Nov 14, 2024

This PR adds support for datasources in grr serve.

Here's how it looks:

Grizzly server home

Screenshot 2024-11-14 at 15-42-48 Grizzly

Datasource page

Screenshot 2024-11-14 at 15-43-05 Grizzly

Note: datasources can NOT be persisted via the grizzly server (yet, this may be implemented later).

@K-Phoen K-Phoen added the enhancement New feature or request label Nov 14, 2024
@K-Phoen K-Phoen self-assigned this Nov 14, 2024
@K-Phoen K-Phoen requested a review from a team as a code owner November 14, 2024 14:45
@malcolmholmes
Copy link
Contributor

This is really cool! So, if my Grafana instance has access to the datasource backends, but the datasources are not configured in Grafana, Grizzly serve can provide them. That's really neat!

@K-Phoen
Copy link
Member Author

K-Phoen commented Nov 15, 2024

Not sure what you mean 🤔

Are you thinking about using locally-defined datasources when previewing dashboards?
AFAIK, this PR doesn't enable anything like that. It "just" does preview of datasources via grr serve, anything else would be an unintended side-effect 😅

@malcolmholmes
Copy link
Contributor

Hah, okay, so I can preview whether the datasource looks as I would expect via the UI. That's fair. But those unintended side-effects could also be really cool? Maybe?

@K-Phoen
Copy link
Member Author

K-Phoen commented Nov 15, 2024

I'm not sure how that would work. Queries are handled by Grafana's backend, making it hard for Grizzly to inject/patch datasources for querying.

We'll have to settle for being able to preview datasources configuration with grr serve, and having to properly create datasources in the remote Grafana instance if they're meant to be used in dashboards/alerts/...

pkg/grafana/utils.go Outdated Show resolved Hide resolved
@K-Phoen K-Phoen merged commit 487374f into main Nov 26, 2024
7 checks passed
@K-Phoen K-Phoen deleted the proxy-datasources branch November 26, 2024 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants