loki

Aggregate and query logs with Loki using LogQL.

5|Updated Apr 29, 2023
One-click install
npx skills add https://github.com/n4vysh/dotfiles --skill loki-n4vysh
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: loki
Source: https://github.com/n4vysh/dotfiles/tree/main/home/dot_agents/skills/loki
Command: npx skills add https://github.com/n4vysh/dotfiles --skill loki-n4vysh

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Grafana Loki provides centralized log aggregation and the LogQL query language to simplify log analysis, troubleshooting, and observability at scale.

Core Features & Use Cases

  • LogQL-based querying for log streams, labels, and parsers (json, logfmt, pattern, regexp, unpack)
  • Loki ingestion architecture and ecosystem (Promtail/Fluent Bit) for smooth log ingestion
  • Use cases: debugging distributed systems, monitoring service health, and extracting structured data from logs

Quick Start

Configure Loki with your log sources and run a sample LogQL query to verify ingestion and querying.

Frequently Asked Questions about loki

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

FAQPage Schema
How do I query logs in Loki using LogQL?

LogQL queries target log streams using labels and apply parsers like json, logfmt, pattern, regexp, or unpack to extract structured data. This method enables efficient filtering and analysis across distributed services for centralized observability.

What is the best way to aggregate logs for distributed services troubleshooting?

Aggregating logs with Loki provides centralized log analytics to simplify troubleshooting across distributed services. It uses LogQL to drill down into service health issues and extract structured metadata for observability at scale.

How does log ingestion work with Promtail and Fluent Bit in Loki?

Log ingestion in Loki relies on ecosystem agents like Promtail or Fluent Bit to collect and forward logs. Configuring these agents with your log sources ensures smooth ingestion into the centralized Loki architecture for querying.

Can I parse json and logfmt structured data from my log streams?

Yes, you can parse json and logfmt structured data from log streams using LogQL. Loki supports multiple parsers including json, logfmt, pattern, regexp, and unpack to extract and analyze structured metadata within your logs.

When do I need centralized log aggregation for observability?

You need centralized log aggregation for observability when debugging distributed systems, monitoring service health, or extracting structured data from logs. Loki enables efficient drill-down investigations and alerting across distributed services.