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 result when using offset modifier in query #466

Closed
jstaffans opened this issue Oct 12, 2021 · 4 comments · Fixed by #467
Closed

Empty result when using offset modifier in query #466

jstaffans opened this issue Oct 12, 2021 · 4 comments · Fixed by #467
Labels

Comments

@jstaffans
Copy link

I'm using promxy 0.0.73 and the following minimal configuration:

global:
  evaluation_interval: 30s
  external_labels:
    source: promxy

promxy:
  server_groups:
    - static_configs:
        - targets:
          # downstream Prometheus is version 2.29.2
          - prometheus.local
      anti_affinity: 10s

A query like count(node_exporter_build_info) works, but if you introduce the offset modifier like count(node_exporter_build_info offset 2h) the result set is empty.

Querying the Prometheus query UI directly works so the problem seems to be in Promxy.

@jstaffans
Copy link
Author

Downgrading to 0.0.72 fixed the problem.

@jacksontj
Copy link
Owner

I am unable to reproduce the same; I am using the following config:

promxy:
  server_groups:
    - static_configs:
      - targets:
        - demo.robustperception.io:9090
      http_client:
        dial_timeout: 1s

And both the direct and the offset query work

Screenshot from 2021-10-12 13-12-56

I'm also unable to reproduce with a local build of lastest prom

Config:

promxy:
  server_groups:
    - static_configs:
        - targets:
          - localhost:9090
      labels:
        az: a

Screenshot from 2021-10-12 13-15-43

So unfortunately I don't see to be able to reproduce your issue; can you reproduce with the first demo config?

@jstaffans
Copy link
Author

I can reproduce it with promxy 0.0.73 and a locally running prom 2.30.3 and the following config:

promxy:
  server_groups:
    - static_configs:
      - targets:
        - localhost:9090
      http_client:
        dial_timeout: 1s

Prometheus

Screen Shot 2021-10-12 at 23 31 14

Promxy

Screen Shot 2021-10-12 at 23 30 50

jacksontj added a commit that referenced this issue Oct 12, 2021
@jacksontj
Copy link
Owner

jacksontj commented Oct 12, 2021

I was able to reproduce; this seems to be an issue specifically for VectorSelectors (meaning if you add a function like count it doesn't reproduce). I have a test and fix in #467

@jacksontj jacksontj added the bug label Oct 12, 2021
jacksontj added a commit that referenced this issue Oct 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants