logql-generator

Generate optimized LogQL queries for Grafana Loki log analysis.

290|32|Updated Dec 5, 2025
One-click install
npx skills add https://github.com/akin-ozer/cc-devops-skills --skill logql-generator
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: logql-generator
Source: https://github.com/akin-ozer/cc-devops-skills/tree/main/devops-skills-plugin/skills/logql-generator
Command: npx skills add https://github.com/akin-ozer/cc-devops-skills --skill logql-generator

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps DevOps and software teams generate accurate, efficient LogQL queries for Grafana Loki to analyze logs, build dashboards, and configure alerts without guesswork.

Core Features & Use Cases

  • Generate production-ready LogQL queries tailored to your log formats (json, logfmt, pattern) and time ranges.
  • Assist with parsing, filtering, and aggregations to produce reliable metrics and insights for dashboards and alerts.
  • Use in scenarios like troubleshooting, performance monitoring, and incident response for services running in Kubernetes or cloud environments.

Quick Start

To begin, describe your logging goal and log sources, and I will propose a plan and provide a ready-to-run LogQL snippet. For example: Generate a 5-minute rate of errors for app=web in prod.

Frequently Asked Questions about logql-generator

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

FAQPage Schema
How do I generate a LogQL query for Grafana Loki to calculate error rates?

To generate a LogQL query for Grafana Loki, describe your logging goal and log sources. The skill creates a ready-to-run LogQL snippet calculating error rates using parsing, filtering, and aggregations tailored to your formats.

Can I create LogQL queries for logfmt and JSON log formats in Loki?

Yes, you can create LogQL queries for logfmt, JSON, and pattern formats in Loki. The skill generates optimized queries by applying parsing and filtering techniques specific to your log format for accurate metrics extraction.

What is the best way to build LogQL queries for Kubernetes dashboard alerting?

The best way to build LogQL queries for Kubernetes dashboard alerting is to use incremental construction following best practices. The skill proposes an interactive plan and provides production-ready snippets for reliable insights and alerts.

Does this LogQL generator support troubleshooting and incident response workflows?

Yes, this LogQL generator supports troubleshooting and incident response workflows. It assists with performance monitoring and log analysis for services running in Kubernetes or cloud environments by generating tailored, efficient queries.

How do I parse and filter logs in Loki without writing complex LogQL syntax?

You can parse and filter logs in Loki without writing complex syntax by describing your logging goal interactively. The skill handles the query construction incrementally, applying parsing and filtering to produce reliable metrics.