DEV Community

John Wick
John Wick

Posted on

Running Five Bots and Losing Track of Which One's Down? Here's the Fix

For developers managing several bots at once — how to stop guessing which one crashed and start seeing all of them at a glance.

Running Five Bots and Losing Track of Which One's Down? Here's the Fix

One bot is manageable. You know its quirks, you check on it when something feels off, and if it goes down, it's obvious. Five bots is a different problem entirely — not because any individual bot got harder to run, but because keeping track of five separate things quietly stopped scaling somewhere around bot number three.

The spreadsheet-in-your-head problem

If you're maintaining several bots — a moderation bot here, a music bot there, a couple of Telegram bots for different communities — there's a good chance your actual monitoring system is "remembering." Which one crashed last week. Which one you haven't checked on in a while. Which server's owner messaged you about downtime last month. That's not a system, it's a mental spreadsheet, and mental spreadsheets have a way of quietly dropping entries.

What actually happens when it breaks down

The failure mode here isn't dramatic — it's just slow drift. Bot #4 goes down on a Tuesday, you don't notice because you were focused on bot #2's bug, and by the time someone tells you, it's been offline for three days. Nothing about this means you're bad at your job — it means you're doing manual tracking for something that scales better as a dashboard.

One deployment, every bot supervised independently

import staypresent

staypresent.run([
    "moderation_bot.py",
    "music_bot.py",
    "telegram_support.py",
])
Enter fullscreen mode Exit fullscreen mode

Each bot gets its own crash recovery, completely independent of the others — one crashing and restarting has zero effect on the rest. And instead of five separate places to check, you get one status page with every bot listed by name, its own uptime, and its own incident history.

From "which one was it again?" to one glance

staypresent.run(
    bots=[
        {"file": "moderation_bot.py", "services_name": "Moderation Bot"},
        {"file": "music_bot.py", "services_name": "Music Bot"},
        {"file": "telegram_support.py", "services_name": "Support Bot"},
    ],
)
Enter fullscreen mode Exit fullscreen mode

Named clearly, all on one dashboard, at /status. No more opening five separate hosting dashboards to figure out which one actually has a problem — just one page, checked once, that tells you everything.

You don't need five separate solutions for five bots

If your current setup is five bots each handled slightly differently, with reliability depending on how recently you personally checked on each one, it's worth consolidating. One package, one deployment pattern, every bot visible in the same place.

pip install staypresent[prod]
Enter fullscreen mode Exit fullscreen mode

Stop keeping track in your head. Let one dashboard do it instead.

Top comments (0)