0

I want to get at most limit raw samples from a Prometheus metric, starting at a start time and stopping before an end time (in case limit is greater than the number of samples between start and end). With InfluxQL, this is straightforward:

SELECT some_field FROM metric
WHERE time >= ${start} AND time < ${end} LIMIT ${limit}

What is the equivalent of this query in Prometheus?

A MetricsQL solution would be acceptable too, but the limit N suffix that's extra, doesn't apply to this case.

Dan Dascalescu
  • 143,271
  • 52
  • 317
  • 404

1 Answers1

0

Limiting the number of returned samples per series is not possible with Prometheus. I've filed an enhancement request for VictoriaMetrics.

Dan Dascalescu
  • 143,271
  • 52
  • 317
  • 404