What are LogQL metric queries?
IntermediateConceptLogging: ELK/EFK, Loki & Log Shippers
Answer
They turn log streams into numbers using range aggregations:
sum by (app) (rate({namespace="payments"} |= "error" [5m]))
sum by (status) (count_over_time({app="nginx"} | logfmt [1m]))
quantile_over_time(0.99, {app="api"} | json | unwrap duration_seconds [5m]) by (route)
bytes_over_time({namespace="payments"}[1h])
unwrap extracts a numeric label to aggregate. These power Loki alert rules and log-based dashboards without changing the app.
More on Logging: ELK/EFK, Loki & Log Shippers
What is the ELK stack, and what is EFK?BeginnerHow does Elasticsearch store and search logs?IntermediateWhat is ILM (Index Lifecycle Management) and why do log clusters need it?IntermediateWhat is an Elasticsearch data stream?AdvancedWhat is an index template and mapping, and what is a mapping explosion?AdvancedWhat does Logstash do compared with Beats?Intermediate