Skip to main content

Lightweight process monitor with Telegram alerts and Shield security. Auto-restarts crashed processes, monitors CPU/memory/disk, blocks SSH attacks, sends alerts.

Project description

StillRunning

Lightweight process monitor with auto-restart, Telegram alerts, and live dashboard. Watches your processes, restarts crashes, monitors system resources, and sends you alerts.

How It Works

  1. Pay at stillrunning.io — Basic ($29/mo) or AI tier ($49/mo)
  2. Get your token via email — arrives instantly after checkout
  3. Run one command on your server:
    curl -sSL https://stillrunning.io/install | python3 - --token YOUR_TOKEN
    
  4. Dashboard goes live — yourname.stillrunning.io shows all your processes within 60 seconds

Features

  • Process Watchdog: Auto-restarts crashed screen sessions, systemd services, PM2 processes
  • Live Dashboard: See all your processes at yourname.stillrunning.io
  • Resource Monitoring: CPU, memory, disk usage alerts
  • Per-Process Memory: Alerts when individual processes exceed thresholds
  • Log Rotation: Auto-archives logs when they exceed size limits
  • Health File Monitoring: Alerts when your app stops updating its heartbeat file
  • Telegram Alerts: Get notified instantly when something breaks
  • Telegram Commands: Text "status" to get a live summary
  • Daily Heartbeat: Receive a daily health summary
  • Restart Limits: Disables processes after 3 consecutive failures to prevent restart loops

AI Tier Adds

  • AI Crash Diagnosis: Claude analyzes crash logs and explains what went wrong
  • Fix Suggestions: Get code fix suggestions sent to Telegram with approve/reject buttons
  • Daily Health Audit: Automated code quality and infrastructure review every morning
  • Pattern Detection: Learns from your crash history to predict and prevent issues

Shield — Intelligent Attack Protection

Shield monitors SSH brute force attacks and automatically blocks malicious IPs.

Basic Tier (included free)

  • SSH failed login counter (reads /var/log/auth.log)
  • Automatic fail2ban integration after 10 failed attempts
  • Security grade A/B/C/D based on attack volume
  • Daily security summary in Telegram heartbeat

AI Tier (intelligent protection)

  • Intelligent threat scoring: LOW, MEDIUM, HIGH, REPEAT offender detection
  • Tiered punishment: fail2ban for LOW, iptables 24h for MEDIUM, permanent ban for HIGH/REPEAT
  • AbuseIPDB reporting for HIGH+ threats (requires API key)
  • Claude Haiku pattern analysis every 50 attacks
  • Shared threat network: every customer protects every other customer
  • Pre-emptive blocking from shared blocklist

Quick Start

curl -sSL https://stillrunning.io/install | python3 - --token YOUR_TOKEN

The installer will:

  1. Validate your token with stillrunning.io
  2. Auto-detect running screen sessions, systemd services, and PM2 processes
  3. Generate stillrunning.yaml in your current directory
  4. Start pushing status to your dashboard every 30 seconds

Self-Hosted (Free)

If you prefer to self-host without a dashboard:

pip install stillrunning
stillrunning --setup

The setup wizard will:

  1. Scan for running screen sessions and systemd services
  2. Detect log files in your working directory
  3. Ask for your app name and Telegram credentials
  4. Generate stillrunning.yaml automatically
  5. Start monitoring

Manual Configuration

Create stillrunning.yaml:

app_name: "MyApp"
working_dir: "/home/user/myapp"

telegram_bot_token: "123456789:ABCdefGHI..."
telegram_chat_id: "987654321"

processes:
  - name: "api"
    screen: "api"
    script: "api.py"
  - name: "worker"
    screen: "worker"
    script: "worker.py"

log_files:
  - path: "app.log"
    max_mb: 10
    keep_archives: 5

health_file: "status.json"
health_max_age_sec: 180

thresholds:
  cpu_percent: 85
  mem_percent: 85
  disk_percent: 85
  process_mem_mb: 500

Run:

screen -dmS stillrunning stillrunning

Telegram Setup

  1. Create a bot: Message @BotFather and send /newbot
  2. Copy the bot token
  3. Get your chat ID: Message @userinfobot and send /start
  4. Add both to your config

Telegram Commands

Text these to your bot:

  • status - Get live process and resource status
  • help - Show available commands
  • enable all - Re-enable disabled processes

Configuration Reference

Field Default Description
app_name "StillRunning" Name shown in alerts
working_dir current dir Where your scripts live
telegram_bot_token - From @BotFather
telegram_chat_id - Your Telegram user ID
processes [] List of processes to monitor
log_files [] List of logs to auto-rotate
health_file null File to monitor for freshness
health_max_age_sec 180 Alert if health file older than this
thresholds.cpu_percent 85 CPU alert threshold
thresholds.mem_percent 85 Memory alert threshold
thresholds.disk_percent 85 Disk alert threshold
thresholds.process_mem_mb 500 Per-process memory threshold
intervals.process_check_sec 30 How often to check processes
intervals.resource_check_sec 60 How often to check resources
intervals.heartbeat_sec 86400 Daily heartbeat interval
restart_cooldown_sec 120 Minimum time between restarts
max_consecutive_failures 3 Disable process after this many failures

Requirements

  • Linux (uses /proc/stat, /proc/meminfo, screen, pgrep)
  • Python 3.10+
  • PyYAML

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stillrunning-1.2.0.tar.gz (18.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

stillrunning-1.2.0-py3-none-any.whl (18.5 kB view details)

Uploaded Python 3

File details

Details for the file stillrunning-1.2.0.tar.gz.

File metadata

  • Download URL: stillrunning-1.2.0.tar.gz
  • Upload date:
  • Size: 18.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.3

File hashes

Hashes for stillrunning-1.2.0.tar.gz
Algorithm Hash digest
SHA256 cd47d4ac33d380a9e398e33fd638c46a0bec054b7de7d5c544e5722491e2829e
MD5 50497047f358fb5048a5a0f1e1b9e24a
BLAKE2b-256 4799edd3879d74ead7a0e205dd860076c7b2bd24e3d0d65a551901ce5e030573

See more details on using hashes here.

File details

Details for the file stillrunning-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: stillrunning-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 18.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.3

File hashes

Hashes for stillrunning-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ce23ad5103c4ccea8a7accc96313aea07b1006fbb6bd6040fed878b3f21a94b8
MD5 8bb5a2bf24cf20913b2251617040609c
BLAKE2b-256 9c184f7066d2baedce73d4aeb4076c55f56b29d30c36d074f93273c218cb2d70

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page