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?

topk(1, max by (job) (max_over_time(
{job=”myjob”}
| regexp “[^,],(?P[^,]),.
| unwrap count
[24h]
)))

New contributor

Koi Loah is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

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

LEAVE A COMMENT