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

Variable values fetch from query #40

Closed
Neko-Follower opened this issue Jul 4, 2024 · 9 comments
Closed

Variable values fetch from query #40

Neko-Follower opened this issue Jul 4, 2024 · 9 comments
Assignees
Labels
enhancement New feature or request

Comments

@Neko-Follower
Copy link

Hi!
Thank you for the datasource plugin.

I wanted to get the variable values ​​from the query rather than defining them manually.
Снимок экрана 2024-07-04 в 16 18 51

@hagen1778 hagen1778 added the enhancement New feature or request label Jul 4, 2024
@hagen1778
Copy link
Contributor

@Loori-R @dmitryk-dk would you mind taking a look?

@pgassmann
Copy link

I would like to build a logs dashboard like this using victorialogs:

grafik
grafik

The query for loki looks like this:

{host=~"$host",category="dockerlogs",compose_project=~"$project",compose_service=~"$service"} $filter |~ "$search" 
| line_format "{{.compose_project }}/{{.compose_service }}\t| {{ __line__ }}"

For this, the grafana plugin would need to support querying field_values. The api is implemented:
https://docs.victoriametrics.com/victorialogs/querying/#querying-stream-field-values

@ccgovuk
Copy link

ccgovuk commented Jul 30, 2024

Dynamic variables allow some really useful dashboarding, looking forward to being able to do this with victorialogs.

@dginhoux
Copy link

Hi,

I agree, allow creating vars is very usefull. It can help to focus on specific point.
It can be use to create clean dashboards with both vmlogs and vmetrics content.

@hagen1778
Copy link
Contributor

@Loori-R is #58 enough for supporting variables in the plugin?

@Loori-R
Copy link
Contributor

Loori-R commented Aug 21, 2024

Yes, I think that will be enough. If anything was missed, you can reopen or create a new feature request.

@Neko-Follower
Copy link
Author

Hi! Thank you for feature. I tried this out and found some bugs.

Multi-value seems doesn't work. I have query:
consumer: $consumer
Choose 2 options and get nothing. From google devtools in network i see following query:
consumer: <null>|admin
I think it should have looked like this:
consumer: ("<null>" OR "admin")

Query works badly with values with special characters. I have query:
proxy_list: $proxy_list
From google devtools in network i see following query:
proxy_list: api_name:clientid-persons-v1;v1\\.14\\.1
I think it should have looked like this:
proxy_list: "api_name:clientid-persons-v1;v1.14.1"

I think need to add quotes and work through the moment with multi-value

@Loori-R
Copy link
Contributor

Loori-R commented Aug 22, 2024

Hi @Neko-Follower! Thank you for the feedback.
I created a separate issue #65.

@Loori-R
Copy link
Contributor

Loori-R commented Aug 22, 2024

The functionality for fetching variable values is supported in victorialogs-datasource starting from version v0.3.0.

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

No branches or pull requests

6 participants