Skip to content

PromQL bug with query_range and metrics name change #4562

@roidelapluie

Description

@roidelapluie

Bug Report

What did you do?

  • Upgrade node_exporter
  • run with query_range: sum(rate({__name__=~'node_network_receive_drop_total|node_network_receive_drop',env='prod',instance="nip-beprd51"}[5m]) > 0) by(instance,cluster)

What did you expect to see?

a constant result

What did you see instead? Under which circumstances?

when the query range overlaps the metric name change, I git no result when we switch to the new metric

Environment

  • Prometheus version:

prometheus, version 2.3.2 (branch: HEAD, revision: 71af5e2)
build user: root@5258e0bd9cc1
build date: 20180712-14:02:52
go version: go1.10.3

Raw data

{"status":"success","data":{"resultType":"matrix","result":[{"metric":{"__name__":"node_network_receive_drop","cluster":"default","device":"bond0","env":"prod","instance":"nip-beprd51","job":"node_exporters"},"values":[[1535541130.395,"107315172"],[1535541160.395,"107315217"]]},{"metric":{"__name__":"node_network_receive_drop_total","cluster":"default","device":"bond0","env":"prod","instance":"nip-beprd51","job":"node_exporters"},"values":[[1535541190.396,"107315254"],[1535541220.395,"107315281"],[1535541250.395,"107315334"],[1535541280.395,"107315405"],[1535541310.395,"107315457"],[1535541340.395,"107315529"],[1535541370.395,"107315598"],[1535541400.395,"107315649"],[1535541430.395,"107315697"]]}]}}

Query range queries with sum() that cross 1535541430-1535541431 are stopped in the middle

query3
query4

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions