Guides/Networking & Security
Networking & Security6 min read

How to Monitor Server Uptime and Get Alerts When Things Break

Server downtime costs money and credibility. This guide covers free and low-cost monitoring options — from cron-based health checks to uptime monitoring services — and how to get instant alerts via Telegram, Slack, or email.

The Simplest Uptime Monitor: Cron + Curl

On any external server, add a cron job: */5 * * * * curl -sf https://yoursite.com/api/health || curl -s "https://api.telegram.org/botTOKEN/sendMessage?chat_id=CHAT_ID&text=🚨+yoursite.com+is+DOWN". This checks your health endpoint every 5 minutes and sends a Telegram alert if it fails. Zero cost, zero dependencies. The /api/health endpoint should return 200 and check your database connection.

Free Uptime Monitoring Services

Better Uptime, UptimeRobot (free tier: 50 monitors, 5-minute checks), and Freshping (free: 50 monitors, 1-minute checks) are solid free options. They check your endpoints from multiple global locations (catching CDN/regional issues), maintain uptime history, and send alerts via email, Slack, or webhook. Set up at minimum: your homepage, your API health endpoint, and your most critical user-facing page.

Monitor PM2 Process Health

PM2 restarts crashed processes automatically, but if your app crash-loops (crashes faster than PM2 can restart), you need to know. Add to your cron: pm2 jlist | python3 -c "import json,sys; procs=[p for p in json.load(sys.stdin) if p['pm2_env']['status'] != 'online']; sys.exit(1) if procs else sys.exit(0)" || alert_telegram "PM2 process down". This checks that all PM2 processes are online every minute.

Set Up Telegram Alerts (Free and Instant)

Create a Telegram bot: message @BotFather on Telegram, run /newbot, save the token. Get your chat ID: message your bot, then call https://api.telegram.org/botTOKEN/getUpdates to find your chat_id. Now you can send alerts from any server or script with a single curl command. Telegram delivers in under 1 second, works on mobile, and is free — it beats email for critical alerts.

Need Help?

Want this done for you?

Our engineering team handles implementations like this every week. Get a free scoping call — we will tell you exactly what it takes and what it costs.

Book a free call

© 2026 NexWorldTech — Built for Global Dominance.