Skip to main content
Version: 2.0

Log Gateway

Service: log-gateway · Port: 8099

log-gateway gives the rest of KubeOpera — the dashboard, AI agents and the RCA engine — a simple way to read logs. You ask for logs by service, namespace and time range; it builds the LogQL, queries Loki and returns normalized results. It stores nothing itself.

What you can do​

OperationUse it to…
SearchFind log lines for a service or namespace in a time range, optionally filtered by text or level.
PatternsSee the recurring shapes of log lines (for example connection refused to <_>:5432) and how often each occurs — the fastest way to spot what changed.
ContextGet the most recent lines for one service, for a quick look or for an AI agent's context.

How queries are built​

RequestLogQL selector
/search?service=payments-api{app="payments-api"}
/search?namespace=prod&service=api{namespace="prod", app="api"}
/search?service=api&contains=timeout{app="api"} |= "timeout"
/patterns?service=api{app="api"} | pattern

Tenant users only see logs from their own vClusters: log-gateway adds the tenant's namespaces to every selector from the caller's token.

REST API​

MethodPathDescription
GET/api/v1/logs/searchSearch logs (?service=&namespace=&contains=&level=&start=&end=&limit=).
GET/api/v1/logs/patternsRecurring patterns and counts (?service=&window=1h).
GET/api/v1/logs/contextRecent lines (?service=&namespace=&lines=).
GET/api/v1/logs/tailStream new lines as they arrive (Server-Sent Events).
GET/healthzHealth check.

Configuration​

VariableDefaultDescription
LOKI_URLhttp://loki-gateway.monitoring:80Loki endpoint.
AUTH_JWT_ACCESS_SECRET—Validates tokens.
PORT8099HTTP port.