Pulse Watch is a lightweight, real-time service monitoring solution designed to track the availability and performance of web services through periodic health checks. Built with Python, it provides automated monitoring capabilities with persistent storage and comprehensive logging, making it suitable for development environments, small-scale production monitoring, and educational purposes.
- Continuous health checks for multiple web services
- Configurable check intervals per service
- HTTP status code detection and categorization
- Response time measurement in milliseconds
- Automatic status classification (UP, UNSTABLE, DOWN)
- JSON-based persistent storage for service configuration
- Per-service historical log files
- Automatic log directory initialization
- Atomic file operations for data integrity
- Graceful timeout management (10-second default)
- Connection failure detection and logging
- Service status tracking across failure states
- Non-blocking error recovery
- Interactive command-line interface
- Service registration and removal
- Real-time service status viewing
- Input validation and error feedback
Pulse_Watch/
├── pulse_watch.py # Main application logic
├── pulse_data.json # Service configuration database
├── logs/ # Historical monitoring data
│ ├── google.json
│ ├── github.json
│ └── brokenservice.json
└── README.md
Each monitored service maintains the following properties:
{
"name": "Google",
"url": "https://www.google.com",
"interval": 10,
"status": "UP",
"last_checked": "2026-01-21 14:10:05",
"response_time": 120.4,
"status_code": 200
}Field Descriptions:
name: Unique identifier for the serviceurl: Target endpoint for health checksinterval: Check frequency in secondsstatus: Current health status (UP, UNSTABLE, DOWN, UNKNOWN)last_checked: Timestamp of most recent checkresponse_time: HTTP response duration in millisecondsstatus_code: HTTP status code from last check
| HTTP Status Code | Service Status |
|---|---|
| 200-299 | UP |
| 300-499 | UNSTABLE |
| 500-599 | DOWN |
| Connection Error | DOWN |
| Timeout | DOWN |
Each service generates individual log files with timestamped entries:
{
"timestamp": "2026-01-21 14:10:05",
"status": "UP",
"status_code": 200,
"response_time": 120.4
}- Python 3.9 or higher
- pip package manager
- Clone or download the project:
git clone <repository-url>
cd Pulse_Watch- Install required dependencies:
pip install requests- Initialize the application:
python pulse_watch.pyThe application will automatically create necessary directories and configuration files on first run.
Run the main script to launch the interactive interface:
python pulse_watch.py=============================
Pulse Watch - Service Monitor
==============================
1. Add Service
2. Remove Service
3. View Services
4. Exit
- Select option 1 from the main menu
- Enter service name (must be unique)
- Provide full URL including protocol (http:// or https://)
- Specify check interval in seconds
Example:
Enter service name: GitHub
Enter service URL: https://www.github.com
Enter check interval (in seconds): 15
Service 'GitHub' added successfully.
- Select option 2 from the main menu
- Enter the exact name of the service to remove
- Service and its logs will be removed from active monitoring
Select option 3 to display all registered services with their current status, last check time, and configuration details.
The application operates on a continuous monitoring cycle:
- Load service configuration from
pulse_data.json - Calculate next check time based on last check timestamp and interval
- Execute HTTP GET request to service URL
- Parse response for status code and response time
- Update service status based on HTTP status code
- Persist results to service-specific log file
- Save updated configuration
- Sleep for 1 second before next iteration
The monitoring loop runs independently after the main menu, allowing services to be checked automatically in the background while maintaining interactive capabilities for service management.
All service configurations and logs are stored in JSON format for human readability and easy integration with other tools. The application implements atomic write operations to prevent data corruption during concurrent operations.
- Development environment health monitoring
- API endpoint availability tracking
- Website uptime monitoring
- Educational demonstration of service monitoring concepts
- Prototyping for larger monitoring systems
- Testing HTTP endpoint reliability
- Scheduled task execution
- HTTP client implementation
- File-based persistent storage
- JSON data serialization
- Error handling and exception management
- Command-line interface design
- Time-based event scheduling
- Status code interpretation
- Performance measurement
- Operating System: Cross-platform (Windows, macOS, Linux)
- Python Version: 3.9+
- Network: Internet connectivity required for external service monitoring
- Storage: Minimal (logs scale with check frequency and retention)
- Memory: Low footprint (suitable for resource-constrained environments)
- Single-threaded execution (sequential service checking)
- No notification system for status changes
- Manual configuration (no web interface)
- No authentication support for protected endpoints
- Limited to HTTP/HTTPS protocols
- No data aggregation or analytics capabilities
Multi-threaded Monitoring
- Concurrent service checks using threading or async/await
- Improved performance for monitoring multiple services
- Reduced latency between check cycles
Notification System
- Email alerts for service status changes
- Webhook integration for external notification services
- SMS notifications via third-party APIs
- Configurable alert thresholds and cooldown periods
Web Dashboard
- Real-time service status visualization
- Historical uptime graphs and charts
- REST API for programmatic access
- Mobile-responsive interface
Advanced Analytics
- Uptime percentage calculations
- Response time trend analysis
- Service comparison metrics
- Exportable reports (PDF, CSV)
Enhanced Security
- Authentication support for protected endpoints
- SSL certificate validation options
- API key management for secured services
- Encrypted storage for sensitive credentials
Database Integration
- SQLite backend for improved query performance
- PostgreSQL support for enterprise deployments
- Time-series database integration for metrics
- Data retention and archival policies
Configuration Improvements
- YAML-based configuration files
- Environment variable support
- Configuration validation and schema enforcement
- Import/export of service configurations
Extended Protocol Support
- TCP port monitoring
- ICMP ping checks
- DNS resolution verification
- Custom protocol handlers
This project is designed as a learning tool and portfolio demonstration. Contributions, suggestions, and feedback are welcome to improve functionality and code quality.
This project is available for educational and portfolio purposes.
Install Dependencies
pip install requests
Run the Application
python pulse_watch.py
⸻
Error Handling
Pulse Watch is designed to fail safely and continue running. It handles: • Network timeouts • Invalid or unreachable URLs • Invalid user input • Duplicate service registrations
Failures are recorded without interrupting the monitoring loop.
⸻
Design Decisions • JSON-based storage for transparency and ease of inspection • Polling-based scheduler for simplicity and clarity • Per-service log files to isolate monitoring history • Defensive defaults to prevent runtime exceptions
⸻
Possible Enhancements • Uptime percentage calculations • Aggregated response-time statistics • Alerting via email, Slack, or webhooks • Asynchronous or multi-threaded monitoring • Export logs to CSV or database storage
⸻
Learning Outcomes
This project demonstrates practical experience with: • Python scripting and CLI tools • Time-based scheduling logic • Persistent data management • Structured logging • Defensive programming • Backend system design fundamentals
⸻
License
This project is released under the MIT License.