docker compose exec loki sh -lc 'START=$(date -u -d "1 hour ago" +%s000000000); END=$(date -u +%s000000000); curl -G -s http://localhost:3100/loki/api/v1/series --data-urlencode '''match[]={cluster="prod",namespace="payments"}''' --data-urlencode "start=${START}" --data-urlencode "end=${END}" | jq '''.data[:5]''''Fix Loki label explosion without breaking the searches that actually matter
How to reduce streams, tiny chunks, and query latency while keeping incident-time context useful
A practical guide to spotting high-cardinality labels in Loki, taking them out of the hot path, and proving your searches still work.
Created: April 29, 2026
Published: April 29, 2026
Docker
Run the same checks from containers and restart only the log agent after validating the config.
docker composecurljq
docker compose exec alloy alloy validate /etc/alloy/config.alloydocker compose restart alloyContent locked
This guide requires both steps before full content is available.
- ○Click “Like” on this guide.
- ○Share on WhatsApp, X, LinkedIn, or copy the link.
Access is automatically unlocked as soon as both steps are completed.