loki

Query and analyze Grafana Loki logs using LogQL via logcli.

1|Updated Feb 1, 2026
One-click install
npx skills add https://github.com/BjzyLabs/vCenterCert --skill loki-bjzylabs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: loki
Source: https://github.com/BjzyLabs/vCenterCert/tree/main/.ruler/skills/loki
Command: npx skills add https://github.com/BjzyLabs/vCenterCert --skill loki-bjzylabs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Grafana Loki often presents vast, unstructured log data. This Skill provides a streamlined way to interact with Loki and extract actionable insights by issuing LogQL-based queries via the logcli CLI, enabling rapid diagnostics and observability workflows.

Core Features & Use Cases

  • Query and filter logs across multiple services with logcli to identify errors, latency spikes, and unusual patterns.
  • Explore log streams by labels, extract metrics, and build time-based dashboards for outages and performance trends.
  • Use Case: When a service experiences an incident, quickly aggregate logs from relevant pods, correlate events, and surface the root cause for faster remediation.

Quick Start

Install the logcli CLI on your host, ensure the Loki endpoint is reachable, and perform a basic query to verify connectivity, for example: logcli query '{job="varlogs"}' --limit 20

Frequently Asked Questions about loki

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

FAQPage Schema
How do I query Grafana Loki logs to diagnose incidents across distributed services?

Query Grafana Loki logs to diagnose incidents by issuing LogQL-based queries via the logcli CLI, filtering by labels and extracting metrics to correlate events across distributed services for rapid root cause analysis.

What do I need to start analyzing Loki logs with this approach?

To analyze Loki logs, you need the logcli CLI installed on your host and network access to a reachable Loki endpoint to perform queries and filter log streams by labels.

Can I filter Kubernetes pod logs by labels to identify latency spikes and errors?

Filter Kubernetes pod logs by labels using LogQL queries through logcli to identify latency spikes, surface errors, and extract metrics for observability across your cluster.

What is the best way to extract metrics from Loki log streams for performance trends?

Extract metrics from Loki log streams by executing LogQL queries via logcli to build time-based dashboards, enabling you to track outages and visualize performance trends across services.

Does this log aggregation method work with Docker and on-prem environments?

Log aggregation with logcli works across Kubernetes, Docker, and on-prem environments, allowing you to search logs, select streams by labels, and extract metrics wherever your Loki endpoint is accessible.

Why use LogQL with logcli instead of directly viewing raw logs in Grafana Loki?

Using LogQL with logcli automates querying and filtering of vast unstructured Loki logs, streamlining the extraction of actionable insights and metrics for faster incident remediation than manual viewing.