🐧 Linux tool • Alert on consecutive ping loss & restored
Ping_Alert Linux: Get Alerts When Hosts Are Down (and When Restored)
Monitor hosts continuously. Ping_Alert Linux triggers an alert only when ping loss/timeout happens consecutively, then sends another notification when the host is back to normal. Alerts are delivered via SMS and Email, with optional alternative SMTP for reliability.
How it works
- Consecutive loss detection: alert only after ping loss/timeout persists for N checks (not for short spikes).
- Status change alerts only: sends one alert when it becomes abnormal and one alert when it is restored—no repeated spam while it remains down.
- Server delivery + SMTP options: SMS/Email alerts can be sent from our server, and you can also enable alternative SMTP to improve deliverability.
- Logs + daily mail: writes ping loss records to a log file with timestamp; can mail logs daily for easy review in your inbox.
- I am Alive: optional periodic mail notification to confirm the program is still running.
Alternative SMTP supported
Local/Gmail/Yahoo/Free SMTP (Gmail/Yahoo use App Password) or SendGrid (API key as password).
Install & run
Download the zip file, edit the config files, then run the program.
# 1) Download and unzip wget -O pingalert_linux.zip "https://www.sms4mail.com/download/pingalert_linux.zip" unzip pingalert_linux.zip cd pingalert # 2) Edit config files nano pingalert_host.txt nano pingalert_setup.txt # Optional (alternative SMTP): nano pingalert_email.txt # 3) Run (foreground) ./pingalert # 4) Run in background (silent mode) ./pingalert -s &
Silent mode
Run
./pingalert -s & after you confirm it works as expected.Config files
These files are included in the zip package.
| File | Purpose |
|---|---|
| pingalert_host.txt | Hosts to monitor (domain/IP, label, and optional per-host settings). |
| pingalert_setup.txt | Account setup: recipients for SMS/Email alerts and basic program settings. |
| pingalert_email.txt (optional) | Alternative SMTP settings (Local/Gmail/Yahoo/Free SMTP) for better deliverability. |
| pingalert (program) | The Linux executable that performs continuous ping monitoring and sends alerts. |
Need test SMS?
Register to get free test SMS: register.htm
Alert message examples
Typical messages for “Down/Timeout” and “Restored”.
Down / consecutive loss
Triggered after consecutive ping loss/timeouts reach your threshold.
[2019-08-11 15:55:57] 🔴 PING TIMEOUT Host: 590630.com Loss: 10 consecutive packets Duration: 41 seconds
Restored
Sent when ping returns to normal.
[2019-08-11 16:31:48] 🟢 RESTORED Host: 590630.com Status: Ping OK
Related pages
- Ping_Alert Windows: ping_alert.htm
- Port_Alert Linux: port_alert_linux.htm
- CPU_Alert Linux: cpu_alert_linux.htm
- SMTP setup: SMTP.htm
- SendGrid SMTP relay: sendgrid.htm