LogQL
Overview
LogQL is Grafana Loki’s PromQL-inspired query language for searching across logs.
Kloudfuse supports LogQL in addition to Kloudfuse Query Builder on Logs Analytics interfaces.
Toggle query languages to use LogQL; the default is FuseQL. The saved dashboards, alerts, and other artifacts in Logs Analytics use LogQL expressions when you turn off the FuseQL option. The corresponding Grafana datasource is called KfuseLogsDatasource.
A LogQL query is built from stages that run in order: comparison matchers in the stream selector pick the log streams, text search filters and parse operators narrow and structure the lines, predicate and transform expressions refine the results, and the metric operators — range aggregations, unwrapped aggregations, aggregations, binary operators, and miscellaneous functions — turn logs into time series. Each category below documents its operators with syntax, parameters, and worked examples.