Loki Service#
The Loki service provides log aggregation and LogQL querying with 7 tools for label discovery, stream inspection, and log-first troubleshooting.
Overview#
The Loki service in Cloud Native MCP Server helps AI assistants and operators inspect logs without starting from raw full-text dumps. It emphasizes compact summaries first, then targeted LogQL queries when more detail is needed.
Key Capabilities#
### πͺ΅ LogQL Queries
Run instant and range LogQL queries against Loki streams.
### π§ Label Discovery
Discover labels, values, and indexed series before building larger queries.
### π― LLM-Friendly Summaries
Start with compact stream summaries instead of full log payloads.
### β
Connectivity Checks
Verify the configured Loki endpoint and auth settings quickly.
Available Tools (7)#
loki_query_logs_summaryloki_queryloki_query_rangeloki_get_label_namesloki_get_label_valuesloki_get_seriesloki_test_connection
Quick Examples#
Start with a compact log summary#
| |
List available values for a label#
| |
Inspect indexed series before a wider query#
| |
Best Practices#
- Start with
loki_query_logs_summarybeforeloki_query_range. - Narrow time windows and stream selectors aggressively.
- Use label discovery tools before guessing selector keys and values.
- Prefer targeted pipelines like
|=,|~, and parsed labels over dumping broad streams.
Next Steps#
- Prometheus Service for metrics correlation
- Jaeger Service for trace correlation
- Configuration Guide for runtime setup