Difference between revisions of "LogQL"

From wikieduonline
Jump to navigation Jump to search
 
Line 4: Line 4:
  
 
  [[logcli]]
 
  [[logcli]]
 +
 +
 +
Get top 10 applications by highest log throughput:
 +
topk(10,sum(rate({region=”us-east1"}[5m]) by (name))
 +
Get the count of logs during the last 5 minutes by level:
 +
sum(count_over_time({job=”mysql”}[5m])) by (level)
 +
Get the rate of HTTP GET requests from nginx logs:
 +
avg(rate(({job=”nginx”} |= “GET”)[10s])) by (region)
  
  

Latest revision as of 17:40, 23 November 2020

This article is a Draft. Help us to complete it.


logcli


Get top 10 applications by highest log throughput:

topk(10,sum(rate({region=”us-east1"}[5m]) by (name))

Get the count of logs during the last 5 minutes by level:

sum(count_over_time({job=”mysql”}[5m])) by (level)

Get the rate of HTTP GET requests from nginx logs:

avg(rate(({job=”nginx”} |= “GET”)[10s])) by (region)


See also[edit]

Advertising: