logql-query-authoring

Installation
SKILL.md

LogQL Query Authoring

Purpose

LogQL is Loki's query language, deliberately modeled on PromQL but operating over log lines instead of numeric samples: a query starts with a stream selector (label matchers, cheap — Loki uses these to find which chunks to read at all) and then applies a pipeline of line filters and parser/label-filter stages that get progressively more expensive because they have to actually read and process log content. Writing an effective LogQL query is mostly about ordering that pipeline correctly and knowing when a query has stopped being "narrow by label" and started being "scan everything and grep," which is the single biggest cause of slow or timed-out Loki queries. This skill covers stream selectors, line filters, structured parsing, and LogQL's metric queries; it assumes Loki itself is already ingesting logs — see loki-log-aggregation-configuration for ingestion, retention, and storage backend configuration, which this skill does not repeat.

Installs
1
GitHub Stars
46
First Seen
Nov 10, 2026