WatchDoggo - Service Status Monitor

A Flask web application that monitors the status of various third-party services and displays their current operational status in a user-friendly dashboard.
Features
- Real-time Monitoring: Automatically checks service status every 5 minutes (configurable)
- Visual Dashboard: Clean, responsive interface with Bootstrap styling
- Multiple Adapters: Supports StatusPage.io, custom HTML, and generic API formats
- Status Indicators: Color-coded status icons (green ✓, yellow ⚠, red ✗)
- Detailed Information: Response times, last check times, error messages
- Auto-refresh: Background updates without page reload
- Mobile Responsive: Works on desktop, tablet, and mobile devices
- Configuration Reload: Update monitored services without restart

Supported Services
The application comes pre-configured to monitor:
- GitHub
- Twilio
- Docker
- Google Maps
- Google APIs
- Google DNS
- Power BI
- Amazon Web Services (AWS)
- Microsoft Azure
- OpenAI
Quick Start
Prerequisites
- Python 3.7 or higher
- pip (Python package installer)
Installation
- Clone or download the application
git clone git@github.com:zyra-engineering-ltda/watch-doggo.git cd watch-doggo -
Run the startup script
Linux/macOS:
./run.shWindows:
run.bat -
Access the dashboard
Open your web browser and navigate to:
http://127.0.0.1:5000
The startup script will automatically:
- Create a virtual environment
- Install dependencies
- Start the Flask application
Manual Installation
If you prefer to set up manually:
- Create virtual environment
python3 -m venv venv source venv/bin/activate # Linux/macOS # or venv\Scripts\activate.bat # Windows - Install dependencies
pip install -r requirements.txt - Start the application
python app.py
Configuration
Services Configuration
Edit config/services.json to add, remove, or modify monitored services:
{
"refresh_interval": 300,
"timeout": 30,
"services": [
{
"name": "github",
"url": "https://www.githubstatus.com/api/v2/status.json",
"adapter": "statuspage_io",
"display_name": "GitHub"
},
{
"name": "custom_service",
"url": "https://example.com/status",
"adapter": "custom_html",
"display_name": "Custom Service",
"selector": ".status-indicator",
"success_text": "operational"
}
]
}
Configuration Options
- refresh_interval: How often to check services (seconds)
- timeout: HTTP request timeout (seconds)
- services: Array of service configurations
Service Adapters
StatusPage.io Adapter
For services using StatusPage.io format:
{
"name": "service_name",
"url": "https://status.example.com/api/v2/status.json",
"adapter": "statuspage_io",
"display_name": "Service Name"
}
Custom HTML Adapter
For services with custom HTML status pages:
{
"name": "service_name",
"url": "https://example.com/status",
"adapter": "custom_html",
"display_name": "Service Name",
"category": "infrastructure",
"selector": ".status-indicator",
"success_text": "operational",
"degraded_text": "degraded",
"down_text": "down"
}
For detailed parsing of individual services on a status page:
{
"name": "service_name",
"url": "https://status.example.com/",
"adapter": "custom_html",
"display_name": "Service Name",
"category": "infrastructure",
"detailed_parsing": true,
"service_selector": ".component, .service-item",
"service_name_selector": ".name, .component-name",
"service_status_selector": ".status, .component-status",
"success_text": "operational"
}
Generic API Adapter
For services with custom JSON APIs:
{
"name": "service_name",
"url": "https://api.example.com/status",
"adapter": "api_adapter",
"display_name": "Service Name",
"status_path": "status.current",
"status_mapping": {
"ok": "operational",
"issues": "degraded",
"down": "down"
}
}
Ping Adapter
For simple HTTP status checks (just checks if URL returns 200):
{
"name": "service_name",
"url": "https://example.com",
"adapter": "ping",
"display_name": "Service Name",
"category": "infrastructure"
}
Service Categories
Services can be organized into categories for better dashboard organization. Add a category field to each service configuration:
{
"name": "service_name",
"url": "https://example.com",
"adapter": "ping",
"display_name": "Service Name",
"category": "crm"
}
The dashboard will automatically group services by category, making it easier to understand which services belong to which part of your infrastructure.
Display Names
Each service should have a display_name field that provides a human-readable name for the dashboard and API responses:
{
"name": "github",
"url": "https://www.githubstatus.com/api/v2/status.json",
"adapter": "statuspage_io",
"display_name": "GitHub",
"category": "development"
}
The display_name is used in the dashboard interface and API responses, while name is used internally for identification.
Status Page Links
Each service automatically includes a link to its status page in the dashboard. The URL from the service configuration is used to create clickable links on service cards:
{
"name": "github",
"url": "https://www.githubstatus.com/api/v2/status.json",
"adapter": "statuspage_io",
"display_name": "GitHub",
"category": "development"
}
Users can click the “View Status Page” button on each service card to open the full status page in a new tab.
Environment Variables
You can customize the application using environment variables:
FLASK_HOST: Host to bind to (default: 127.0.0.1)FLASK_PORT: Port to bind to (default: 5000)FLASK_DEBUG: Enable debug mode (default: False)SERVICES_CONFIG_PATH: Path to services.json fileSECRET_KEY: Flask secret key for sessions
Example:
export FLASK_HOST=0.0.0.0
export FLASK_PORT=8080
export FLASK_DEBUG=True
python app.py
API Endpoints
The application provides REST API endpoints:
GET /api/status- Get all service statusesPOST /api/refresh- Force refresh all servicesGET /api/config- Get current configurationGET /api/service/<name>- Get specific service statusPOST /api/config/reload- Reload configurationPOST /api/config/validate- Validate configuration
Development
Project Structure
service-status-monitor/
├── app/
│ ├── __init__.py # Flask app factory
│ ├── routes.py # Web routes and API endpoints
│ ├── models.py # Data models
│ ├── services/
│ │ ├── status_checker.py # Core status checking logic
│ │ ├── config_manager.py # Configuration management
│ │ └── adapters/ # Service adapters
│ ├── static/ # CSS, JavaScript, images
│ └── templates/ # HTML templates
├── config/
│ └── services.json # Service configuration
├── app.py # Application entry point
├── requirements.txt # Python dependencies
└── README.md # This file
Adding New Service Adapters
- Create a new adapter class in
app/services/adapters/ - Inherit from
BaseServiceAdapter - Implement the
parse_responsemethod - Register the adapter in
StatusChecker.__init__
Running Tests
# Install test dependencies
pip install pytest pytest-cov
# Run tests
pytest
# Run with coverage
pytest --cov=app
Troubleshooting
Common Issues
- Port already in use
- Change the port using
FLASK_PORTenvironment variable - Or kill the process using the port:
lsof -ti:5000 | xargs kill
- Change the port using
- Configuration file not found
- Ensure
config/services.jsonexists - Check the
SERVICES_CONFIG_PATHenvironment variable
- Ensure
- Service not responding
- Check the service URL in configuration
- Verify network connectivity
- Check application logs for detailed error messages
- Permission denied on startup script
- Make the script executable:
chmod +x run.sh
- Make the script executable:
Logs
Application logs are written to:
- Console output (stdout)
service_monitor.logfile
Check logs for detailed error information and debugging.
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Support
For issues and questions:
- Check the troubleshooting section
- Review application logs
- Create an issue in the repository