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

How to support mulit options with label values of stream-fields #109

Open
worker24h opened this issue Nov 20, 2024 · 7 comments
Open

How to support mulit options with label values of stream-fields #109

worker24h opened this issue Nov 20, 2024 · 7 comments
Assignees
Labels
bug Something isn't working question Further information is requested

Comments

@worker24h
Copy link

worker24h commented Nov 20, 2024

image

When I selected ALL, the result of query is nothing, as follows:
image

So I capture the package of http:

{
  "from": xxx
  "to": xxx
   "queries":  {
     ...
     "expr": "{pod=~\"(neolix-cockpit-server-5888c774f-fqrgv OR neolix-cockpit-server-5888c774f-smclh)\",container_name=\"neolix-cockpit-server\",namespace=\"vehicle-platform\"} MarsSendServiceImpl",
     ...
    }
}

The LogQL is : {pod=~"${pod}",container_name="${container}",namespace="${namespace}"} ${query}

The value of variable pod is generated by grafana auto, But, I think the victorialogs does not support it, which it is (AAA OR BBB)

so, how to fix it? Everyone, thanks

@hagen1778 @dmitryk-dk

@hagen1778
Copy link
Contributor

Hey @worker24h !
Have you tried set All value to *?
See my example for host variable below:
image

And then on query time:
image

And here's how it works for All:
image

@hagen1778 hagen1778 added the question Further information is requested label Nov 21, 2024
@worker24h
Copy link
Author

Yes, your case is done, but my case is stream field. When I setted * , it response failed.
image

The fields of stream, as follows
image

@hagen1778

@hagen1778
Copy link
Contributor

Try changing * to .* in All options settings for variable

@worker24h
Copy link
Author

worker24h commented Nov 21, 2024

Try changing * to .* in All options settings for variable

Perfect, .* for 'ALL' is good. But, if selected two items of pod, the result of query is nothing.

image

The grafana will generate pod=~"(AAA OR BB)",So I think, it will be need fixed.

@hagen1778
Copy link
Contributor

For stream selector regular expression for selecting multiple items should be A|B, instead of A OR B.
@Loori-R is it possible to parse variable differently if we deal with stream matcher?

@Loori-R
Copy link
Contributor

Loori-R commented Nov 21, 2024

For stream selector regular expression for selecting multiple items should be A|B, instead of A OR B. @Loori-R is it possible to parse variable differently if we deal with stream matcher?

Yes, of course, I'll see what I can do.

@Loori-R Loori-R self-assigned this Nov 21, 2024
@Loori-R Loori-R added the bug Something isn't working label Nov 21, 2024
@worker24h
Copy link
Author

worker24h commented Nov 26, 2024

For stream selector regular expression for selecting multiple items should be A|B, instead of A OR B. @Loori-R is it possible to parse variable differently if we deal with stream matcher?

Yes, of course, I'll see what I can do.

Hi, I fixed the bug, Do you cloud code reivew ? PR: #122

@hagen1778 @Loori-R Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants