Skip to content

neginAhmadiTech/hostpulse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HostPulse

Result animation

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.


⚙️ Features

  • 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

⚙️ Setup & Usage

1️⃣ Clone the Repository

    git clone https://github.com/neginAhmadiTech/hostpulse.git
    cd hostpulse

2️⃣ Create and Activate a Virtual Environment

🪟 On Windows
    python -m venv venv
    venv\Scripts\activate
🐧 On Linux / macOS
    python3 -m venv venv
    source venv/bin/activate

3️⃣ Install Dependencies

    pip install -r requirements.txt

4️⃣ Run HostPulse

    python main.py -c config.ini -i 60 -t 3
Arguments
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

5️⃣ Deactivate Environment (when done)

deactivate


🧩 Example Configuration (config.ini)

    [sites]
    urls = https://httpbin.org/status/200, https://httpbin.org/status/404

🧪 Example Output

    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 ---

💡 Future Enhancements (Open for Collaboration)

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 🤝

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages