RP

rpi-enrichment-logs

Investigates system logs on Raspberry Pi to debug pipeline failures in the EasyOref enrichment process.

Install

mkdir -p .claude/skills/rpi-enrichment-logs && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/19310" && unzip -o skill.zip -d .claude/skills/rpi-enrichment-logs && rm skill.zip

Installs to .claude/skills/rpi-enrichment-logs

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Check RPi systemd logs for EasyOref enrichment pipeline issues. Use when: duplicate alerts, cooldown failures, session state bugs, phase transitions wrong, Telegram send errors, GramJS connection issues, worker crashes. Requires SSH to RPi.
240 chars✓ has a “when” trigger
Intermediate

Key capabilities

  • Fetch systemd logs from Raspberry Pi
  • Filter logs by pipeline stage
  • Diagnose Telegram send failures
  • Investigate worker crashes and session state
  • Build chronological event timelines

How it works

It uses SSH to query and filter journalctl logs on a remote Raspberry Pi, specifically targeting the easyoref service.

Inputs & outputs

You give it
Enrichment issue description and time range
You get back
Filtered systemd log entries

When to use rpi-enrichment-logs

  • Debug duplicate alert issues
  • Investigate Telegram message failures
  • Check worker crash logs

About this skill

RPi Enrichment Logs — systemd Investigation

Check RPi journalctl logs for EasyOref enrichment pipeline issues that are NOT visible in LangSmith.

When to Use

  • Duplicate alerts sent to users
  • Cooldown not blocking repeated alerts
  • Session phase transitions wrong (e.g., red_alert → red_alert)
  • Telegram send failures
  • GramJS disconnections or edited message handling
  • Worker crashes or DLQ entries
  • Enrichment never started (no LangSmith traces at all)

What's NOT in LangSmith

LangSmith only traces the LangGraph pipeline execution. These happen OUTSIDE the graph:

  • Alert detection, cooldown checks, Telegram sends → bot.ts
  • Session creation, phase upgrades → bot.ts
  • BullMQ job scheduling, worker lifecycle → worker.ts
  • GramJS post collection, channel monitoring → gramjs/index.ts
  • Health checks, config loading → service.ts, config.ts

Procedure

Step 1: SSH and Fetch Logs

# Recent 200 lines (overview)
ssh [email protected] "journalctl -u easyoref -n 200 --no-pager"

# Time-range query (use IDT = UTC+3)
ssh [email protected] "journalctl -u easyoref --since='2026-04-09 22:00' --until='2026-04-09 23:00' --no-pager"

# Errors only
ssh [email protected] "journalctl -u easyoref -p err -n 50 --no-pager"

IMPORTANT: RPi logs use IDT (Israel Daylight Time, UTC+3). LangSmith uses UTC. Convert accordingly.

Step 2: Filter by Pipeline Stage

Alert Detection & Sending

ssh [email protected] "journalctl -u easyoref --since='2026-04-09 22:00' --no-pager" | grep -iE 'Alert.*RELEVANT|Alert sent|Cooldown active|Alert type filtered|no users matched'

Key log messages:

  • "Alert — RELEVANT" → alert passed filters, matched_users shows who receives it
  • "Alert sent via Telegram (text)" → successful send, type, chatId
  • "Cooldown active, skipping Telegram" → duplicate suppressed
  • "Alert — no users matched area" → nobody subscribed to those areas

Session Lifecycle

ssh [email protected] "journalctl -u easyoref --since='2026-04-09 22:00' --no-pager" | grep -iE 'Session:|resolved phase|upgraded phase|without active session'

Key log messages:

  • "Session: started" → new session, phase, chatCount
  • "Session: upgraded phase"fromto (e.g., early_warning → red_alert)
  • "Session: entered resolved phase" → all-clear
  • "Resolved alert without active session — no enrichment" → resolved with no session

Worker & BullMQ

ssh [email protected] "journalctl -u easyoref --since='2026-04-09 22:00' --no-pager" | grep -iE 'Enrich worker:|job FAILED|DLQ'

Key log messages:

  • "Enrich worker: starting run"alertId, phase, runNum, maxRuns
  • "Enrich worker: max runs reached" → session complete
  • "Enrich worker: no active session — skipping" → session expired before job ran
  • "Enrich worker: phase expired" → timeout before completion
  • "Enrich worker: job FAILED → DLQ" → crash with error, stack

GramJS Channel Monitoring

ssh [email protected] "journalctl -u easyoref --since='2026-04-09 22:00' --no-pager" | grep -iE 'gramjs|channel|stored.*post|EditedMessage'

Step 3: Diagnose Common Issues

Duplicate Alerts

Look for two "Alert sent" with same type within 90s:

ssh [email protected] "journalctl -u easyoref --since='2026-04-09 22:00' --no-pager" | grep 'Alert sent' | head -20
  • Check "Cooldown state restored from Redis" at startup — if missing, cooldown was lost
  • Check for PID change (process restart mid-attack) → resets in-memory state

Process Restart During Attack

ssh [email protected] "journalctl -u easyoref --since='2026-04-09 22:00' --no-pager" | grep -iE 'EasyOref starting|Bot initialized|pid'

Multiple "EasyOref starting" entries = restart. Check if npm run release or easyoref update triggered mid-attack.

Enrichment Never Started

If no LangSmith traces exist:

  1. Check "Session: started" — was a session created?
  2. Check "Enrich worker started" — is the worker alive?
  3. Check for BullMQ errors or Redis connection issues
  4. Check "Alert type filtered out by config" — is early_warning enabled?

Telegram API Errors

ssh [email protected] "journalctl -u easyoref --since='2026-04-09 22:00' --no-pager" | grep -iE 'Telegram.*failed|Telegram unavailable|send failed'
  • "Telegram send failed" → API error, check error field (rate limit, chat not found, etc.)
  • "Telegram unavailable" → bot instance or chatId missing

Step 4: Build Timeline

Combine logs into a chronological timeline:

Time (IDT)EventDetails
22:14:28early_warning sent3 chats
22:14:28Session startedphase=early_warning
22:16:02red_alert sent3 chats
22:16:02Session upgradedearly_warning → red_alert
22:16:30Enrich worker run #1alertId=..., phase=red_alert
22:18:00Enrich worker run #2alertId=...
22:24:30resolved sent3 chats

Cross-reference with LangSmith traces (use attack-postmortem skill for that).

Service Management

# Check service status
ssh [email protected] "systemctl status easyoref"

# Restart service
ssh [email protected] "sudo systemctl restart easyoref"

# Check current version
ssh [email protected] "easyoref --version"

# Check Redis
ssh [email protected] "docker exec -it \$(docker ps -q -f name=redis) redis-cli ping"

Tips

  • Logs are in JSON format (pino). Use | jq . for pretty-printing if needed
  • PID changes in logs indicate process restarts — correlate with deploy times
  • journalctl --since uses local time (IDT). No need to convert to UTC
  • For large log volumes, pipe through grep before --no-pager to reduce output
  • Max useful window: journalctl retains ~7 days on RPi (depends on disk space)

When not to use it

  • Accessing logs already visible in LangSmith
  • Analyzing logs without converting IDT to UTC

Prerequisites

SSH access to Raspberry Pi

Limitations

  • Logs are limited to approximately 7 days of retention
  • Requires manual time conversion between IDT and UTC

How it compares

This provides visibility into pipeline events occurring outside the LangSmith trace scope.

Compared to similar skills

rpi-enrichment-logs side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
rpi-enrichment-logs (this skill)03moReviewIntermediate
network-info34moReviewBeginner
debug-cluster28moReviewIntermediate
devops-troubleshooter13moNo flagsAdvanced

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

network-info

UKGovernmentBEIS

Gather network configuration and connectivity information including interfaces, routes, and DNS

329

debug-cluster

openshift

Provides systematic debugging approaches for HyperShift hosted-cluster issues. Auto-applies when debugging cluster problems, investigating stuck deletions, or troubleshooting control plane issues.

25

devops-troubleshooter

sickn33

Expert DevOps troubleshooter specializing in rapid incident response, advanced debugging, and modern observability. Masters log analysis, distributed tracing, Kubernetes debugging, performance optimization, and root cause analysis. Handles production outages, system reliability, and preventive monitoring. Use PROACTIVELY for debugging, incident response, or system troubleshooting.

12

railway-deployment

davila7

Manage Railway deployments - view logs, redeploy, restart, or remove deployments. Use for deployment lifecycle (remove, stop, redeploy, restart), deployment visibility (list, status, history), and troubleshooting (logs, errors, failures, crashes). NOT for deleting services - use railway-environment skill with isDeleted for that.

10

doctor

louisphamdev

**SKILL** — Doctor Agent diagnostic & self-healing toolkit for Turing OS. Use when: diagnosing errors, fixing system issues, checking Docker/container health, querying known issues database, running self-healing scripts, tracking fix metrics, or generating GitHub issues. Triggers: "doctor", "diagnos

00

nav-troubleshoot

navikt

Strukturerte diagnostiske trær for vanlige Nav-plattformproblemer — pod-krasj, auth-feil, Kafka-lag og databaseproblemer

00

Search skills

Search the agent skills registry