winops_evtlog_query
Query recent Windows Event Log entries by channel, time range, and event ID to retrieve timestamps, source, level, and messages for system monitoring and troubleshooting.
Instructions
Query recent events from a Windows Event Log channel.
Return Format
{
"success": bool,
"log_name": str,
"events": [{"timestamp": str, "id": int, "source": str, "level": str, "message": str}],
"count": int,
"has_more": bool
}Examples
query(log_name="System", max_events=20, time_range_hours=1)
query(log_name="Application", event_id=1000)Errors:
Returns success=false if pywin32 is not installed or log_name is invalid.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| event_id | No | Filter by specific Event ID. | |
| log_name | No | Log channel name (Application, System, Security, etc.). | Application |
| max_events | No | Max events to return (1-500). | |
| time_range_hours | No | Lookback window in hours. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||