OpenSearch Dashboards logs
v0.2.0Search logs in OpenSearch Dashboards and follow one trace across Kubernetes namespaces and apps.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
list_sources List log sources
List the configured log sources (OpenSearch Dashboards instances).
list_index_patterns List index patterns
List the index patterns of a source. Use one as index_pattern in search_logs and get_trace.
| Parameter | Type | Description |
|---|---|---|
source * | string | Source name from list_sources. |
list_fields List fields
Field names and types of an index pattern, for writing a search_logs query. line_fields says which field holds the level, namespace, app, pod, message and trace id that the other tools return.
| Parameter | Type | Description |
|---|---|---|
index_pattern * | string | Index pattern from list_index_patterns, e.g. "logs-*". |
source * | string | Source name from list_sources. |
contains | string | Only fields whose name contains this text, e.g. "kubernetes". |
search_logs Search logs
Search log lines, newest first. Needs a query, a time range (from / to), or both. Returns the lines (time, level, namespace, app, pod, message, trace and span ids), the number of matches and next_cursor for the next, older page.
| Parameter | Type | Description |
|---|---|---|
index_pattern * | string | Index pattern from list_index_patterns, e.g. "logs-*". |
source * | string | Source name from list_sources. |
cursor | string | next_cursor of the previous result. Keep the other arguments as they were. |
from | string | Start of the time range, as ISO 8601 (2026-11-25T10:00:00Z) or date math (now-1h). |
include_source | boolean | Include the full raw document of each line (much larger output). |
limit | integer | Lines to return (default 100, max 1000). |
query | string | Lucene query_string, e.g. `timeout` or `log.level:ERROR AND kubernetes.namespace_name:payments`. Write AND, OR and NOT in upper case, in lower case they are search words. Field names differ between cl… |
to | string | End of the time range, same formats. Open-ended when omitted. |
get_trace Get a trace
Log lines of one trace, oldest first, grouped by Kubernetes namespace and app, with line and error counts per app and the call flow (the order in which apps appear). A long trace comes in pages: the counts and the flow of each result cover only the lines in that result.
| Parameter | Type | Description |
|---|---|---|
index_pattern * | string | Index pattern from list_index_patterns, e.g. "logs-*". |
source * | string | Source name from list_sources. |
trace_id * | string | Trace id, as in the trace_id of a log line. |
cursor | string | next_cursor of the previous result. Keep the other arguments as they were. |
from | string | Optional start of a time range to narrow the lookup (ISO 8601 or date math). |
limit | integer | Lines to return (default 200, max 1000). |
to | string | End of the time range, same formats. Open-ended when omitted. |