logql: how to get the log line associated with the max value?

  Kiến thức lập trình

I am executing the following query:

topk(5, max by (job) (max_over_time(
   {job="myjob"}
   | regexp "[^,],(?P<count>[^,]*),.*"
   | unwrap count
   [24h]
)))

This returns a job and a number. I am not interested in that number. I want to get the log line that contains the biggest count. How do I do that?

Theme wordpress giá rẻ Theme wordpress giá rẻ Thiết kế website

LEAVE A COMMENT