analyze_logs
Search application logs on remote servers via SSH for specific strings or exception names, with optional time range filtering. Specify log files to focus search or bypass size limits.
Instructions
SSH to a server and search the app's logs for the given strings/exception names, returning matches with a couple of lines of context. Time filtering is best-effort: Liberty log entries carry a leading timestamp but continuation/stack-trace lines don't repeat it, so a match is only excluded when a timestamp was actually found and falls outside the window - anything unparseable is kept rather than silently dropped.
If log_files is omitted, every discovered log file is searched, except ones over ~25MB
(skipped and reported back) - call list_logs first and pass specific log_files to search
those anyway, or to scope the search down for a large deployment.
Args:
server_ip: Hostname or IP address of the server to connect to over SSH.
os_user: SSH username to authenticate as.
ssh_key: Path to the private key file (on this machine) used for authentication.
deployment_directory: Base deployment directory containing the application folder.
application: Name of the application subfolder whose logs/ directory to search.
search: Strings or exception names to search for (case-insensitive, literal match).
start_time: Optional ISO-8601 timestamp; matches before this are excluded when detectable.
end_time: Optional ISO-8601 timestamp; matches after this are excluded when detectable.
log_files: Optional list of paths (relative to logs/, as returned by list_logs) to
restrict the search to. Recommended for large deployments or to include files
skipped by the size cap.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| search | Yes | ||
| os_user | Yes | ||
| ssh_key | Yes | ||
| end_time | No | ||
| log_files | No | ||
| server_ip | Yes | ||
| start_time | No | ||
| application | Yes | ||
| deployment_directory | Yes |