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

UI: Allow step size below 1s. #6875

Open
ank-everstake opened this issue Feb 26, 2020 · 2 comments
Open

UI: Allow step size below 1s. #6875

ank-everstake opened this issue Feb 26, 2020 · 2 comments

Comments

@ank-everstake
Copy link

ank-everstake commented Feb 26, 2020

Using prometheus 2.16.0 and grafana 6.6.2
There is a job with scrape_interval = 500ms.
Tried everything to get precise data with 0.5sec resolution - nothing works.
The main goal is to get graphs on Grafana, but it seems not to pass the resolution down to prometheus.
Instant queries using Grafana - returns data, but only the last datapoint not a time range
Only queries to Prometheus Api - returns right data, but with some duplicates (aggregation as i see)

curl -s 'http://localhost:9090/api/v1/query_range?query=metric_name&start=1582643556&end=1582643756&&step=200ms' | jq

          [
            1582643680,
            "1151710"
          ],
          [
            1582643680.2,
            "1151711"
          ],
          [
            1582643680.4,
            "1151711"
          ],
          [
            1582643680.6,
            "1151712"
          ],
          [
            1582643680.8,
            "1151712"
          ],
          [
            1582643681,
            "1151712"
          ],
          [
            1582643681.2,
            "1151713"
          ],
          [
            1582643681.4,
            "1151713"
          ],
          [
            1582643681.6,
            "1151714"
          ],
          [
            1582643681.8,
            "1151714"
          ],
          [
            1582643682,
            "1151714"
          ]

Scrape interval for datasource in grafana, min step, min time interval are all set.
Even prometheus global scrape interval is set to 500ms.

Setting resolution in graph console doesn't make any change - it parses values like seconds as seen on the right side:

Load time: 71ms
Resolution: 1s
Total time series: 10

So even if you set 0.5 or 0.5s it parses it like 1s...

What can be wrong?

@beorn7
Copy link
Member

beorn7 commented Apr 9, 2024

Hello from the bug scrub.

We played around with this and confirmed that the API is actually capable of serving step sizes below 1s. You can specify a step like 100ms or plainly 0.1. However, the UI will never request this resolution even if you ask for it in the form field. So that latter point is valid and should be improved.

@beorn7
Copy link
Member

beorn7 commented Apr 9, 2024

Note that this isn't about Grafana but just the Prometheus UI. If Grafana really has the same issue, an issue needs to be filed over there.

@beorn7 beorn7 changed the title Resolution (step) lower than 1s UI: Allow step size below 1s. Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants