Skip to content

bjoerrrn/url-monitoring

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 

Repository files navigation

stars last_commit

Monitor URLs

This script monitors a list of URLs, checking if they are reachable. If a URL fails 5 times, a notification is sent to Pushover.

Features

  • Checks HTTP/HTTPS URLs for reachability.
  • Can verify if a specific keyword exists on the page.
  • Alerts are sent to Pushover.
  • Configured via a .credo file.
  • Runs automatically via crontab on a Raspberry Pi.

Setup & Installation

1️⃣ Install Dependencies

On a Raspberry Pi, run:

sudo apt update
sudo apt install python3 python3-pip -y
pip install requests beautifulsoup4 urllib3

2️⃣ Clone This Repository

git clone https://github.com/bjoerrrn/url-monitoring
   cd monitor-urls

3️⃣ Configure Your Script

Open monitor_urls.credo (needs to be in the same folder as the script) and set:

# Description       URL           Optional_Keyword
"test"              http://...    "test"

4️⃣ Run the Script

Manual Execution

python3 monitor_urls.py

Run Every Minute with Crontab

crontab -e

Add the following line at the bottom:

* * * * * /usr/bin/python3 /home/pi/url-monitoring/url-monitor.py

Save and exit.

📡 Expected Output

📢 Pushover Notifications

❌ {url}" → Sent when URL is unreachable.
⚠️ {url} MISSING '{keyword}'" → Sent when keyword check fails.
✅ {url}" → Sent when a previously failing URL recovers.

🤝 Contributing

Feel free to open issues or pull requests to improve the script! 🚀

if you want to contact me directly, feel free to do so via discord: https://discordapp.com/users/371404709262786561

📜 License

This project is open-source under the GPL-3.0 License.

About

A Python script for monitoring a bunch of local and public URLs and sending notifications via Pushover.

Topics

Resources

License

Stars

Watchers

Forks

Languages