Skip to content
Agentmart
Submit a tool

log-fetcher

The log fetcher skills allow to fetch logs via a SSH connection.

Skill by redhat-et

IndexedApache-2.0★ 13
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/redhat-et-log-fetcher

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

The log fetcher skills allow to fetch logs via a SSH connection. Before using the skill, we assume a SSH profile to the server is already setup. Use the skill to either to fetch by Time/Mode (fetch_logs_ssh.py) or fetch by Job Number (fetch_logs_by_job.py).

Use cases: backend

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found
Runs as
Python package

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/log-fetcher

What's inside

Skill name
log-fetcher
Description
The log fetcher skills allow to fetch logs via a SSH connection. Before using the skill, we assume a SSH profile to the server is already setup. Use the skill to either to fetch by Time/Mode (fetch_logs_ssh.py) or fetch by Job Number (fetch_logs_by_job.py).
License
Apache-2.0
Instructions
165 lines in SKILL.md · view on GitHub

Before installing

  • Ships executable scripts

Agent Skills spec issues

  • name: "log-fetcher" does not match folder "logs-fetcher"
  • allowed-tools: must be a space-separated string

Files (3)

  • SKILL.md
  • fetch_logs_by_job.py · scripts/
  • fetch_logs_ssh.py · scripts/

SKILL.md (first lines)

# Log Fetcher

Fetch available logs for further investigations. Currently

```
 [Python]  Fetch logs via SSH
```

## Quick Start

```bash
cd /path/to/incident-investigator
pip install -r requirements.txt

python -m scripts.cli new --incident-id "inc-001"
python -m scripts.cli run --incident-id "inc-001" --all
python -m scripts.cli status --incident-id "inc-001"
```

## Prerequisites

We assume that the user has correctly set up the SSH profile to the Ansible server.

---

## Fetch Ansible Logs via SSH

**Input:** User provides incident context (time window, job IDs, or investigation scope)
**Output:** Raw log files in local directory (default: `~/etl-logs`)
**Scripts:** `scripts/fetch_logs_ssh.py` or `scripts/fetch_logs_by_job.py`

### Prerequisites

Ensure SSH access is configured:
```bash
ssh ${REMOTE_HOST}  # Should connect without password prompt
```

### Option A: Fetch by Time/Mode (fetch_logs_ssh.py)

Use this when you want to fetch recent logs or a range of logs based on time.

1. **Determine the scope:**
   - For recent failures: Use `--mode processed --order desc --limit 10-50`
   - For specific time window: Use `--start-time` and/or `--end-time` to filter by creation date
   - For all recent activity: Use `--mode all` (includes both processed and ignored)

2. **Run the fetch script:**
   ```bash
   # Fetch recent logs with limit
   python -m scripts.fetch_logs_ssh \
     --mode processed \
     --order desc \
     --limit 20 \
     --local-dir .incidents/<incident-id>/raw_logs

   # Fetch logs within a specific time range
   python -m scripts.fetch_logs_ssh \
     --mode processed \
     --start-time "2025-12-09 08:00:00" \
     --end-time "2025-12-10 17:00:00" \
     --local-dir .incidents/<incident-id>/raw_logs

   # Fetch logs from a specific day
   python -m scripts.fetch_logs_ssh \
     --mode all \
     --start-time "2025-12-10" \
     --end-time "2025-12-10" \
     --local-dir .incidents/<incident-id>/raw_logs
   ```

3. **Parameters:**
   - `--mode`: Select log type (`processed`, `ignored`, or `all`)
   - `--order`: Sort by time (`desc` = newest first, `asc` = oldest first)
   - `--limit`: Number of files to fetch (omit for all files)
   - `--start-time`: Filter logs created on or after this time (format: `YYYY-MM-DD [HH:MM[:SS]]`)
   - `--end-time`: Filter logs created on or before this time (format: `YYYY-MM-DD [HH:MM[:SS]]`)
   - `--local-dir`: Where to store logs (default: `~/etl-logs`)

4. **Time Filtering Examples:**
   - Full timestamp: `"2025-12-10 14:30:45"`
   - Minute precision: `"2025-12-10 14:30"`
   - Day only: `"2025-12-10"`
   - Combine with other filters: `--start-time "2025-12-10 00:00" --limit 10 --order desc`

### Option B: Fetch by Job Number (fetch_logs_by_job.py)

Use this when you know specific job numbers to investigate.

1. **Run the fetch script with job numbers:**
   ```bash
   python -m scripts.fetch_logs_by_job \
     job_1234567 job_1234568 job_1234569 \
     --local-dir .incidents/<incident-id>/raw_logs
   ```

   Or without the 'job_' prefix:
   ```bash
   python -m scripts.fetch_logs_by_job \
     1234567 1234568 1234569 \
     --local-dir .incidents/<incident-id>/raw_logs
   ```

2. **Parameters:**
   - `job_numbers`: One or more job identifiers (with or without 'job_' prefix)
   - `--local-dir`: Where to store logs (default: `~/etl-logs`)

3. **What it fetches:**
   - All transform statuses for specified jobs (`*.transform-processed`, `*.transform-ignored`, etc.)
   - Automatically finds matching files on the remote server

### Verify the Fetch

- Check that files were transferred successfully
- Note the job IDs from filenames (e.g., `job_1234567.json.gz.transform-processed`)
- Confirm the time range matches the incident window (for Option A)

### Example Output (Option A)

From redhat-et/rhdp-rca-plugin, Apache-2.0.

Signals

Stars
13
Forks
11
Open issues
5
Last commit (this folder)
Mar 17, 2026 (7 months ago)
Last release
Apr 30, 2026 (6 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
Apache-2.0
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from redhat-et

Cite this page

log-fetcher skill. Agent Mart. https://agentmart.dev/skills/redhat-et-log-fetcher (last updated 2026-10-24)