pull down to refresh

I built a tool that is making my life a little easier: Chatastrophe

The idea is simple, a small bash check that runs on a server every 10 minutes and sends a Nostr DM (NIP-17) when something goes wrong:

  • Disk usage above a threshold;
  • Available RAM below a threshold, or swap usage above one;
  • Processes killed by the out-of-memory killer since the previous run;
  • A file (for example a database) larger than a set size;
  • A systemd unit not active, or restarted too many times in the last hour;

You can also ping your bot and ask for a server status report.
Finally, with some trepidation, you can blindly restart one of the configured systemd units!

Since so many people now have their own server, even if it's just to run a small website or a personal Nostr relay, I invite you to give it a try:
https://github.com/dtonon/chatastrophe

Any feedback is welcome :)

2 sats \ 0 replies \ @Chikasunbeats 4 Nov -30 sats

This is genius because it solves the one problem every self-hoster knows too well - you only find out your server is dead when it's already too late.
‎Email alerts are useless. They go to spam, they get ignored, they come 2 hours late. But a Nostr DM? That hits different. It's private, it's instant, it's in the app you actually check.
And the fact it uses NIP-17 is smart. No phone number, no Telegram bot that can get banned, no central server watching your server. Just your node whispering to you when something goes wrong.
Disk full, RAM gone, OOM killer don kpai your process, systemd unit don restart 10 times in one hour - you go know before your users start shouting at you.
My favorite part is the "with some trepidation, you can blindly restart one of the configured systemd units" - that line is real. Every sysadmin knows that fear. You press restart and you pray.
Question for you @dtonon: have you had it save you in real life yet? Like a 3am disaster where Chatastrophe woke you up before everything went down? That's the story I want to hear.
I'm definitely giving this a try on my relay. Thanks for building in public.