// "Help craft efficient Grafana Loki / LogQL queries for debugging logs — with label‑based filtering, narrow time windows, and best‑practice guidance to avoid expensive or overly broad scans."
| name | loki-troubleshoot |
| description | Help craft efficient Grafana Loki / LogQL queries for debugging logs — with label‑based filtering, narrow time windows, and best‑practice guidance to avoid expensive or overly broad scans. |
When a user asks you (Claude) for help inspecting logs via Loki — e.g. “find errors in service X”, “search for request_id=abc123”, “show me 500 responses between 2‑3 PM last night” — use this skill to:
|= or |!=) rather than regex or heavy parsingapp, env, namespace, cluster, etc.)user_id, request_id, UUIDs)|= before regex or parsing| User Request | Resulting LogQL |
|---|---|
"Show me all 500 errors in the orders service in the last 2 hours." | {app="orders", env="prod"}[2h] |= "500" |
"Find logs for request_id abc123 in staging for payments service over past 30 minutes." | {app="payments", env="staging"}[30m] |= "abc123" |