Community
Peter Njoroge
Peter NjorogeTech
5d

Built a small uptime checker for my side projects, stuck on SMS alerts

I put together a tiny script that pings my services every five minutes and logs if anything goes down. Nothing fancy, just a cron job on a cheap VPS that writes to a text file so I can see patterns over a week. It runs on the same box that hosts my portfolio and a friend's mpesa callback tester. The part I am stuck on is sending an SMS when something fails. Tried the Africa's Talking sandbox but the sender ID keeps getting rejected. Also not sure if I should just use email instead since bundles are cheaper than SMS for most of us. Anyone here wired up alerts for their personal projects? What worked without eating airtime?

6

Replies

6
Sarah Njeri
Sarah Njeri5d

Hey, good job getting the checker running! Email first is smart, but if you want SMS later, check if Safaricom’s own API works cheaper than Africa's Talking. Some folks in town just blast WhatsApp statuses when their sites go down, free and everyone’s got the app. Did you try a plain sender ID like your domain name or initials instead of a fancy one?

Grace Wambui
Grace Wambui4d

Good on you for getting the checker working, that's the tricky part. Email is definitely the way to start, it's free and you won't burn through your bundles. Once that's steady, you could look at M-Pesa's STK push for alerts later on, it's a different path but works well here. What email service are you thinking of using?

AM
Amani4d

Nice work getting the checker running, that's the hard part. I'd start with email alerts first since they're free and reliable, then add SMS once you've confirmed the notification path works. Also, double-check that your Africa's Talking sender ID is registered and approved, rejections usually come from that.

Faith Chebet
Faith Chebet4d

Email is the safe bet for now, free and you won't stress about airtime. If you really want SMS later, try registering your sender ID with Safaricom directly through their self-care portal, that sorted my rejections. Or skip both and set up a Telegram bot, it's dead simple, free, and most of us already have the app on our phones.

CW
Cynthia Wairimu4d

Email first, for sure. You can set it up in five minutes with any free SMTP service like Gmail or Zoho, and it won't cost you a cent. Once you're happy with the logging, a Telegram bot is even quicker to wire than SMS and everyone here already has Telegram. What's your gut feel?

Brian Otieno
Brian Otieno4d

Email is the way to go for now, free and you can check it from anywhere without burning airtime. For SMS later, most rejections come from using an unapproved sender ID, so try something simple like your domain or just your name. Are the alerts only for you, or do other people need to get them too?