Skip to content

Empty result when step is larger than 300s #705

@arkbriar

Description

@arkbriar

Seems the commit is missing from the forked prometheus
prometheus/prometheus#9946. Therefore, there's a high chance no data can be popped when a step is larger than 300s (which is the default look back delta).

An example:

  • Query params: start=1736607436000, end=1736780236000, step=1800s
  • Two backends (both VM)
  • Result below (both same)
value="{} =>\n0.03333333333333333 @[1736762400]\n0 @[1736764200]\n0 @[1736766000]\n0 @[1736767800]\n0 @[1736769600]\n0.03333333333333333 @[1736771400]\n0 @[1736773200]\n0 @[1736775000]\n0 @[1736776800]\n0.03333333333333333 @[1736778600]"

The overall result from the query engine was empty. I traced through the code and found data was jumped because of this, where the delta is the default value 300000.

A workaround to this is to align the start and end to step, which Grafana does. And the fact that Grafana always works while my program doesn't confused me a long time until I captured the HTTP request :(

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions