log_search
Retrieve raw log events from VMware Log Insight for a specified time window, filterable by message text, to investigate incidents.
Instructions
[READ] Search Log Insight events within a time window.
WHEN: to find the actual log lines behind an incident (e.g. what vmkernel logged during a storage event). For "where did logs burst?" use log_aggregate instead; for vCenter alarms use vmware-monitor.
RETURNS: {count, complete (False if truncated), constraints, events: [{timestamp_ms, text, fields}]}. Feed events to vmware-debug incident_timeline to correlate across sources. Read-only.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| last | No | Relative window ending now, as a quantity plus a unit suffix — s, m, h or d ("30m", "2h", "7d") — or a bare number of seconds. Anything else raises a ValueError naming the accepted forms. Cannot be combined with begin_ms/end_ms; passing both is refused. Omit all three and the query defaults to the last hour, so it is never unbounded. | |
| text | No | Free-text substring matched against the event message with the CONTAINS operator — not a regex and not a full query expression. Omit to match every event in the window. To filter on an extracted field instead, discover names with log_fields; this tool exposes no field-filter parameter. | |
| limit | No | Maximum events returned, 1..20000, default 50. Out-of-range values are silently clamped into that range rather than refused. Narrow the window or the text rather than raising this — raw events are the largest thing this skill can put in context. | |
| end_ms | No | Absolute window end as epoch milliseconds (not seconds). May be given without begin_ms, which then means "everything up to this instant". Cannot be combined with last. | |
| target | No | Log Insight target name as spelled in ~/.vmware-log-insight/config.yaml. Omit to use that file's default_target — with no default configured, omitting it is an error that lists the configured names. | |
| begin_ms | No | Absolute window start as epoch milliseconds (not seconds). May be given without end_ms, which then means "from this instant onwards". Cannot be combined with last. |