logql

Filters and analyzes Loki logs using LogQL queries with parsers and aggregations.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/tylertitsworth/skills --skill logql
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: logql
Source: https://github.com/tylertitsworth/skills/tree/main/logql
Command: npx skills add https://github.com/tylertitsworth/skills --skill logql

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Filter and analyze logs from Loki using LogQL queries to quickly identify errors, trends, and anomalies across distributed systems.

Core Features & Use Cases

  • Stream selectors for precise log targeting across namespaces, pods, and jobs
  • Parsers for extracting structured data from logs (json, logfmt, pattern, regexp, unpack)
  • Time-based aggregations and metric-like queries for dashboards and alerts

Quick Start

Run a sample LogQL query against your Loki deployment to retrieve the latest error logs.

Frequently Asked Questions about logql

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I query Loki logs to find errors across distributed systems?

To query Loki logs, use LogQL to combine stream selectors, line filters, and parsers. This targets precise namespaces or pods, enabling you to quickly identify errors and anomalies across distributed systems.

What is the best way to extract structured data from Loki log lines?

The best way to extract structured data from Loki log lines is using LogQL parsers. You can apply json, logfmt, pattern, regexp, or unpack parsers to isolate specific fields for deeper aggregation and analysis.

Can I use LogQL for dashboards and alerting in Grafana Loki?

Yes, you can use LogQL for dashboards and alerting in Grafana Loki. It supports time-based aggregations and metric-like queries, allowing you to build visual dashboards and configure alerts for distributed systems.

How do stream selectors work when filtering logs in Loki?

Stream selectors filter logs in Loki by matching exact label values such as namespace, pod, or job. They target specific log streams before applying line filters and parsers for precise log analysis.

Does LogQL support regular expressions for log parsing?

Yes, LogQL supports regular expressions for log parsing through its regexp parser. Alongside json, logfmt, pattern, and unpack parsers, it extracts structured data from complex, unstructured log lines.