Loki LogQL and querying

Writing fast LogQL queries, turning logs into metrics and giving people a way to explore Loki data in Grafana and from the command line.

Loki query best practices for faster LogQL

Ordering LogQL so Loki discards data early: narrow time ranges, precise stream selectors, line filters before parsers, and the label and query habits that keep dashboards responsive.

Querying Loki from the command line with LogCLI

Using LogCLI to run LogQL from terminals and scripts: downloading ranges of logs, checking stream counts and query volume before running expensive searches, and authenticating to a multi-tenant cluster.

Fixing common Loki query errors

Diagnosing LogQL errors and limits: parse errors, at least one equality matcher required, maximum series reached, max entries per query, query would read too many bytes, time range limits and timeouts.

Blocking expensive Loki queries per tenant

Stopping known costly queries from destabilizing Loki with per-tenant blocked_queries rules by exact pattern, regex, query type or hash, applied through runtime overrides without restarts.

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.