logcli-logs

Query and analyze Grafana Loki logs using logcli with label-based filters.

18|1|Updated Nov 5, 2015
One-click install
npx skills add https://github.com/cristianoliveira/dotfiles --skill logcli-logs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: logcli-logs
Source: https://github.com/cristianoliveira/dotfiles/tree/main/ai/shared/skills/logcli-logs
Command: npx skills add https://github.com/cristianoliveira/dotfiles --skill logcli-logs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill enables you to quickly query and analyze Grafana Loki logs using logcli, turning log data into actionable insights.

Core Features & Use Cases

  • Query logs with label matchers, text filters, and regex patterns.
  • Stream or fetch historical logs with time-bounded ranges.
  • Discover labels and values to refine searches and perform rapid troubleshooting across services.

Quick Start

Use logcli to query logs from a Loki endpoint, for example: logcli query '{app="myapp"}' --since=1h

Frequently Asked Questions about logcli-logs

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

FAQPage Schema
How do I query Loki logs from Grafana using logcli?

You can query Loki logs using logcli by executing command-line queries with label matchers, text filters, and regex patterns to extract actionable log data. It applies to debugging and incident response by building label-based queries across multiple services.

Do I need to configure environment variables to fetch historical logs with logcli?

Fetching historical logs with logcli requires configuring environment variables such as LOKI_ADDR, LOKI_USERNAME, and LOKI_PASSWORD. You can stream or fetch time-bounded log ranges after setting the Loki endpoint and necessary credentials.

Can I filter Grafana Loki logs by text and regex patterns across multiple services?

Filtering Grafana Loki logs across multiple services is fully supported using text filters and regex patterns. You can also discover labels and values to refine searches and perform rapid troubleshooting during incident response.

What is the best way to troubleshoot application logs with Loki and logcli?

The best way to troubleshoot application logs with Loki is using logcli to build label-based queries with time-range selections. This approach turns raw log data into actionable insights for monitoring and debugging across services.

Does logcli work with Grafana Loki for incident response and monitoring?

Logcli works directly with Grafana Loki for incident response and monitoring by enabling label-based queries and time-bounded log ranges. It requires logcli to be installed and configured with the Loki endpoint to query logs effectively.