Questions tagged [metricsql]

Add this tag for queries related to MetricsQL- query language for VictoriaMetrics

22 questions
0
votes
1 answer

avg_over_time of a max

I have a gauge metric badness which goes up when my service is performing poorly. There is one gauge per instance of the service and I have many instances. I can take a max over all instances so that I can see how bad the worst instance…
Kerrick Staley
  • 1,583
  • 2
  • 20
  • 28
0
votes
1 answer

Using the interpolate() function between all points

I'm investigating using VictoriaMetrics for some metrics collected from remote sites with intermittent network connectivity. So the data will have gaps. But some of the metrics are counters that only increase. For these counters, we would like to…
Mads T
  • 11
  • 2
0
votes
1 answer

Get the values between a given range with last value = 0

I am trying to get some metrics out of a Victoria DB, specifically some printer metrics monitoring the amount of available ink. What I want to do is extract the metrics which reached 0 (ink is finished) and started from 100 (full ink). After some…
adcoder
  • 31
  • 5
0
votes
1 answer

Translate influx stddev to promQL

what would be the best way to write this influx query in promQL? SELECT Stddev(value) FROM db WHERE cat = 'time' AND metricName = 'CPU Time' AND (server='s1' OR server='s2') AND time > now() - 1h GROUP BY server
eng007
  • 93
  • 2
  • 8
0
votes
1 answer

Translate influx percentile function to promQL

I need to translate the following influx query to promQL SELECT PERCENTILE(value,95) FROM db WHERE cat = 'time' AND metricName = 'CPU Time' AND time > now() - 1h GROUP BY server
eng007
  • 93
  • 2
  • 8
0
votes
1 answer

promQL API end points

As per the documentation here, there are 2 API end points for querying, one for range queries (GET /api/v1/query_range) and one for instant queries (GET /api/v1/query) At the same time, I have been posting queries like this to the instant API end…
eng007
  • 93
  • 2
  • 8
-1
votes
1 answer

MetricsQL query based on values

[ { "metric": { "__name__": "k8s_failure_value", "build": "90" }, "values": [ [ 1678924800, "0" ] ] }, { "metric": { "__name__": "k8s_failure_value", "build": "91" }, …
rahulyadav
  • 73
  • 2
1
2