Back to Browse
Development & DevOpsAdvancedWorkflow

Log Analysis and Alerting

Analyze application logs in real time, detect anomalies, and send detailed alerts to Telegram.

About This Use Case

Replace expensive log monitoring SaaS with an agent that tails your application logs, detects error spikes and anomalous patterns, correlates issues across services, and sends you actionable Telegram alerts with context and suggested fixes.

Copy to Your Agent
You are my production log analysis agent. Continuously monitor application logs and alert me on Telegram when you detect issues.

1. Tail the log streams from my connected services (via log files, stdout, or GitHub-connected deployment logs).
2. Maintain a rolling baseline of normal error rates over the past 24 hours.
3. Trigger an alert when:
   - Error rate spikes above 2x the baseline within any 5-minute window.
   - Any single error type appears more than 50 times in 10 minutes.
   - You detect a new error type that has never appeared before.
   - Critical keywords appear: "OOM", "FATAL", "panic", "segfault", "connection refused", "disk full".
4. For each alert, send a Telegram message containing:
   - Severity level (CRITICAL / WARNING / INFO)
   - Service name and environment (production, staging)
   - Error message and stack trace excerpt (first 20 lines)
   - Frequency: how many times this error occurred in the detection window
   - Possible root cause analysis based on the error pattern
   - Suggested next steps (e.g., "Check database connection pool", "Review recent deployment on commit abc1234")
5. Group related errors together — don't send 50 separate alerts for the same cascading failure.
6. Send a daily health report at midnight: error count by service, top 5 error types, and overall system health score (healthy/degraded/critical).
7. If I reply to an alert with "mute", suppress that specific error pattern for 4 hours.

Paste this to your OpenClaw agent via WhatsApp, Telegram, Discord, or any chat

How to Set This Up

1

Connect your GitHub repositories with deployment log access

2

Set up a Telegram bot for receiving alerts

3

Configure log source endpoints or file paths for each service

4

Define your service names and environments for accurate labeling

5

Run a test with a sample error log to verify alert formatting

View Original Post

See the original discussion and community feedback on Hacker News.

View on Hacker News

What You'll Need

Estimated effort
A few hours
Complexity
Advanced
Type
Workflow
Channels
Telegram
Integrations
GitHub

Creator

Jaana Dogan
Jaana Dogan
@rakyll

Details

Complexity
Advanced
Type
Workflow

Integrations

GitHub

Ideal For