HostPulse is a lightweight, command-line website and server monitoring tool built with pure Python, designed to check the availability of URLs, log uptime/downtime, and help engineers better understand the foundations of monitoring systems.
- Monitor multiple websites defined in a config file
- Customizable interval between health checks
- Parallel monitoring using Python threads
- Smart logging with timestamps and error handling
- Lightweight — no external database or heavy dependencies
- CLI arguments for flexible usage
- Colorized error messages for better visibility
git clone https://github.com/neginAhmadiTech/hostpulse.git
cd hostpulse python -m venv venv
venv\Scripts\activate python3 -m venv venv
source venv/bin/activate pip install -r requirements.txt python main.py -c config.ini -i 60 -t 3| Flag | Long | Description | Default |
|---|---|---|---|
-c |
--config |
Path to configuration file | required |
-i |
--interval |
Time interval between checks (seconds) | 60 |
-t |
--threads |
Number of parallel threads | 3 |
deactivate
[sites]
urls = https://httpbin.org/status/200, https://httpbin.org/status/404 HostPulse started.
Monitoring 9 sites every 60 seconds using 3 threads...
--- Check started at 2025-10-17 20:34:21 ---
https://httpbin.org/status/200 | UP | Time: 1.81s | Code: 200
https://httpbin.org/status/404 | WARNING | Time: 3.47s | Code: 404
https://httpbin.org/status/500 | DOWN | Time: - | Code: N/A
https://httpbin.org/basic-auth/user/pass | WARNING | Time: 1.38s | Code: 401
https://httpbin.org/delay/5 | DOWN | Time: - | Code: N/A
https://http.cat/404 | UP | Time: 0.48s | Code: 200
https://httpstat.us/503 | DOWN | Time: - | Code: N/A
https://httpbin.org/redirect/3 | UP | Time: 8.48s | Code: 200
https://mocky.io/ | DOWN | Time: - | Code: N/A
--- Next check in 60s ---I’d love for other developers and DevOps engineers to share ideas or contribute!
Here are some next-step ideas:
-
Add email or SMS notifications on downtime
-
Store results in SQLite for visualization
-
Add a simple dashboard (maybe with React)
-
Add Docker support for containerized deployment
-
Implement multiprocessing version for stress testing
If you have ideas, please open an issue or create a pull request 🤝
