11 Finding And Searching Logs In Dashboards

Finding And Searching Logs In OpenSearch Dashboards

OpenSearch Dashboards (https://logs.klok.dev) holds every log event and every transaction of Klok's routes for 30 days, and the console lines of the pods. It is where you search further back than klok.dev's Run → Logs keeps, read the console around a failure, and build your own views. From a terminal, the same logs are klok logs (Investigation Pattern).

Signing in

Open https://logs.klok.dev, press Sign in with Klok and sign in with the same Klok account as in klok.dev. What you see follows from your groups on klok.dev's Tenant → People:

Your group You see Tenant space in Dashboards
A tenant's developers or admins Every log of the tenant The tenant's space, read and write
A domain's developers or admins The logs of that domain only The tenant's space, read only
No group Nothing Your private space

Choose your tenant's space at the top right (Switch tenants): searches, visualizations and dashboards saved there are shared with the tenant's people. A domain member saves their own in their private space. A log line that carries no domain, such as the console of a pod that is not a Klok service, is seen by the tenant's people only. Being taken out of a group in klok.dev takes the access away at the next sign-in; who is in which group is the tenant admin's choice on Tenant → People.

Where the logs are

Each kind of log has its own indexes, one per week, named after the tenant, or for the console lines after the Kubernetes namespace the pod runs in (klok for tenant klok's services):

Index pattern One document per Use it for
klok-logs-<tenant>-trans-* transaction (one correlation id) Did a flow finish, fail or hang; how long it took; how many legs completed
klok-logs-<tenant>-event-* log event of a route What happened in each step: errors, exception, payload, file fields
klok-logs-<namespace>-console-* line a pod printed What a service said around a failure; broker connection problems
klok-logs-<tenant>-* any of the three Following one transaction from its status to the line a pod printed (below)

All three have their time in @timestamp: choose it as the time field when you create an index pattern, also one over all three. Do not make the pattern klok-*: that also matches the ODL's indexes (klok-odl-*), which are business objects with time fields of their own.

So far only tenant klok's events are indexed: other tenants' services log, but nothing consumes their events yet (ipaas-service-deploy-manifests#10).

The fields you search on

The fields are documented, with every value they take, in KLK001's Log receivers and chain status (klok-egress-opensearch). The ones you will use most:

Field In Means
@timestamp all three When the event was logged, when the transaction's latest event was, when the pod printed the line
log_type all three transaction, event or console
correlation_id all three One business flow across all its legs. A console line has it when a Klok service printed it inside the flow, and so have the lines of a stack trace under it
invocation_id events, console One run of one route
kubernetes.pod_name, kubernetes.namespace_name events, console The pod that logged the event or printed the line
trace_id all three (a list on a transaction) The trace of another system the flow's message arrived in, when it came with a traceparent header
status both Transactions: FINISHED, FAILED, PARTIAL_FINISHED, IN_PROGRESS. Events: START, PROGRESS, FINISHED, FAILED
solution_id, route_id / route_ids events / transactions Which solution and route (KLK017I1_FileFlowSource)
route_instance both One running instance of a route, such as one file flow
klok_tenant, klok_domain, klok_env both Tenant, domain and environment (prod, test)
first_seen transactions When the flow started; @timestamp is its latest event
duration_ms both How long it took
count_out_done, count_out_failure transactions How many outgoing legs completed or failed
error_code, exception_class, log_message events Why a step failed
file_flow_id, file_name, file_sha256, file_state events (transactions as lists) KLK017 file transfers

The indexes are mapped dynamically: to count or group by a text field, use its .keyword subfield, for example route_id.keyword.

An event or transaction index from before November 2026 shows the time as timestamp when you open a document; the time filter and a search on @timestamp cover it all the same. A console line from before then, and a line of a service that does not print Klok's console format, has no correlation_id: find it by its text, log:"<correlation id>".

Following one transaction through all three

With an index pattern over the tenant's three kinds of log (klok-logs-<tenant>-*, time field @timestamp), one search bar is enough:

  1. What went wrong. log_type:transaction and status:(FAILED or PARTIAL_FINISHED). Open a row and copy its correlation_id.
  2. Where. correlation_id:"<id>" and log_type:event lists every step of the flow in time order. The failed one has its route_id, error_code, exception_class and exception_message, and its pod in kubernetes.pod_name.
  3. What the pod said. correlation_id:"<id>" alone adds the console lines of the same flow between the events, stack traces included. invocation_id:"<id>" narrows it to one run of one route, and kubernetes.pod_name:"<pod>" without a correlation id shows everything that pod printed in the time range, which is where a problem outside any flow shows (a lost broker connection, a restart).

Add the columns log_type, route_id, status, log_level and log to the table to read the three kinds side by side.

Recipes

Type these in Discover, with the index pattern and time range chosen above the search bar:

To find Index Search
Every event of one flow event correlation_id:"c-9f3c4e1a-…"
Failed transactions of a solution today trans status:FAILED and solution_id:KLK017
Transactions still running after 15 minutes trans status:IN_PROGRESS and first_seen < now-15m
Every transfer of a file flow event file_flow_id:"payroll-to-bank"
A file by its name or content event file_name:"payroll_20261017.csv" or file_sha256:"…"
Failures of one route with a given error event route_id:KLK010E2_PersonecScheduleFileOfframp and error_code:*
What a pod said console kubernetes.labels.app:"klok-file-transfer" and log_level:ERROR
Everything of one flow, console lines included all three correlation_id:"c-9f3c4e1a-…"
A flow by the trace of the system that called it trans trace_id:"4bf92f3577b34da6a3ce929d0e0e4736"

Quote a value that contains a hyphen, such as an app label: unquoted, kubernetes.labels.app:klok-file-transfer matches every pod whose label contains klok, file or transfer.

klok.dev's Run → Logs shows the search for a transaction under In OpenSearch, ready to paste.

Next

To be told when something fails, make a monitor on your tenant's log indexes under Alerting → Monitors → Create monitor, with a notification channel you make under Notifications → Channels. A monitor and a channel are seen by the people who share a Keycloak group with the person who made them, and a monitor's query counts only what its maker may see. Alerting By Integration Pattern says what is worth watching.