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

Empty value in Grafana variables #159

Closed
Heyzi opened this issue Dec 14, 2024 · 4 comments
Closed

Empty value in Grafana variables #159

Heyzi opened this issue Dec 14, 2024 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@Heyzi
Copy link

Heyzi commented Dec 14, 2024

A simple query also returns an empty value, which should be filtered out.

grafana:11.4.0
victorialogs-datasource-v0.12.0
image image

The logs are collected using vector with the following configuration:

  logs_system_to_loki:
    type: loki
    inputs:
      - journald_transform
    endpoint: "http://......./insert/loki/"
    path: /api/v1/push
    encoding:
      codec: json
    labels:
      job: 'journald'
      unit: "{{ unit }}"
      server_name: "{{ server_name }}"
    healthcheck:
      enabled: false
@krzysion
Copy link

You can use the regex expression /.+/
Zrzut ekranu 2024-12-15 112346

@Heyzi
Copy link
Author

Heyzi commented Dec 15, 2024

You can use the regex expression /.+/ Zrzut ekranu 2024-12-15 112346

Yes, it worked. I checked through Explore - the logs that don't have this label at all show empty values, so why should I display them in the filter? Maybe we should change the default behavior?

image

@hagen1778 hagen1778 added the bug Something isn't working label Dec 16, 2024
@yincongcyincong
Copy link
Contributor

actually, it's a grafana issue. grafana add an empty string variable at this line https://github.com/yincongcyincong/scenes/blob/main/packages/scenes/src/variables/variants/MultiValueVariable.ts#L336
i will try give a pr to grafana. but i'm not sure when this is merged.

@dmitryk-dk
Copy link
Contributor

Hi @Heyzi ! The issue was fixed in the release. Issue closed as solved. If you find any problem feel free to reopen the issue

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

No branches or pull requests

6 participants