Skip to content
Back to skills

Telegram Monitor Alert

ASecurity

Send system monitoring alerts to Telegram via cron

  • 2 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added September 10, 2026
ai-agentspythonbash

Security analysis

A100/100

Scanned September 10, 2026

npx -y skills add LoopyLuci/Skills --skill telegram-monitor-alert --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Telegram Monitor Alert?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Telegram Monitor Alert
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/loopyluci-telegram-monitor-alert/badge)](https://www.skillsdirectory.com/skills/loopyluci-telegram-monitor-alert)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: telegram-monitor-alert
description: "Send system monitoring alerts to Telegram via cron"
---

# Telegram Monitor Alert

Send system health alerts (CPU, disk, memory, uptime) to Telegram via cron jobs with `no_agent=True`.

## Watchdog Script Pattern

Create a script that checks system health and outputs a message only when something is wrong:

```bash
# scripts/disk-watchdog.sh
#!/bin/bash
THRESHOLD=90
USAGE=$(df / | tail -1 | awk '{print $5}' | sed 's/%//')
if [ "$USAGE" -gt "$THRESHOLD" ]; then
    echo "⚠️  Disk Alert: $USAGE% on /"
fi
```

## Cron Job (Zero Token Cost)

```bash
hermes cron create \
  --schedule "*/10 * * * *" \
  --script "scripts/disk-watchdog.sh" \
  --no-agent \
  --deliver telegram
```

With `no_agent=True`:
- Script stdout = message body
- Empty stdout = silent (nothing to report)
- Non-zero exit = error alert sent

## Python Watchdog

```python
# scripts/system-watchdog.py
import psutil, json, os

alerts = []

# CPU
cpu = psutil.cpu_percent(interval=1)
if cpu > 90:
    alerts.append(f"🔥 CPU: {cpu}%")

# Memory
mem = psutil.virtual_memory()
if mem.percent > 90:
    alerts.append(f"🧠 Memory: {mem.percent}%")

# Disk
for part in psutil.disk_partitions():
    usage = psutil.disk_usage(part.mountpoint)
    if usage.percent > 90:
        alerts.append(f"💾 {part.mountpoint}: {usage.percent}%")

# Print alerts (becomes the message)
for a in alerts:
    print(a)
```

## What to Monitor

| Check | Command/Script | Threshold |
|-------|---------------|-----------|
| Disk usage | `df -h` | > 90% |
| CPU load | `psutil.cpu_percent()` | > 90% |
| Memory | `psutil.virtual_memory()` | > 90% |
| Uptime | `uptime` | After restart |
| Process down | `pgrep <name>` | Not running |
| Temperature | `sensors` | > 80°C |
| Network | `ping -c 1 <host>` | Packet loss |

## Alert Levels

| Level | Emoji | Action |
|-------|-------|--------|
| Info | ℹ️ | Informational |
| Warning | ⚠️ | Needs attention |
| Critical | 🔥 | Immediate action |
| Recovery | ✅ | Back to normal |

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.