Grafana Loki – Log Aggregation

SkillMonitoring & ops

Log aggregation with Grafana Loki

Instructions available. Your AI can read the instructions. Execution depends on the setup they require.

Add ahel to your AI once: Claude, ChatGPT, Cursor, Claude Code or Codex. Then ask it to use this.

Then ask your AI: use the Grafana Loki skill

What this skill tells your AI

The instructions your AI receives, as published by bidewio/better-openclaw in skills/loki-logs/SKILL.md and read by ahel’s review.

Loki is a horizontally scalable log aggregation system designed to be cost-effective and easy to operate — "like Prometheus, but for logs."

  • GitHub: github.com/grafana/loki (25 000+ ⭐)
  • License: AGPL-3.0
  • Security: Grafana Labs-backed. No malware.

Environment Variables

VariableDescription
{{LOKI_URL}}Base URL of the Loki instance

Usage Examples

Push log entries

curl -s -X POST "{{LOKI_URL}}/loki/api/v1/push" \
  -H "Content-Type: application/json" \
  -d '{"streams": [{"stream": {"app": "myapp"}, "values": [["'$(date +%s)000000000'", "Log message"]]}]}'

Query logs

curl -s "{{LOKI_URL}}/loki/api/v1/query_range" \
  --data-urlencode 'query={app="myapp"}' \
  --data-urlencode "start=$(date -d '1 hour ago' +%s)000000000"

AI Agent Tips

  • Uses labels for indexing, not full-text — extremely cost-effective.
  • LogQL query language is similar to PromQL.
  • Native integration with Grafana dashboards.
  • Pairs with Promtail, Alloy, or Fluentd for log collection.

Signals

GitHub stars
58
Forks
6
Last commit
Aug 2026
Advanced
Item type
skill
Key
loki-logs
Source
github.com/bidewio/better-openclaw