Monitoring
Learn how the Rates API monitoring system works to ensure reliability and uptime.
API Monitoring
Rates API includes a robust monitoring system that continuously checks the health of all endpoints. This system uses GitHub Actions to run automated checks every 15 minutes and alert developers when issues are detected.
How Monitoring Works
The monitoring workflow:
- Runs every 15 minutes via GitHub Actions
- Checks the health of all API endpoints
- Creates a GitHub Issue when problems are detected
- Notifies the repository owner through GitHub’s notification system
Monitored Endpoints
The following endpoints are continuously monitored:
- API Root: The main API endpoint
- Mortgage Rates: Both list and by-institution endpoints
- Personal Loan Rates: Both list and by-institution endpoints
- Car Loan Rates: Both list and by-institution endpoints
- Credit Card Rates: Both list and by-issuer endpoints
- Time Series Endpoints: Historical data for all rate types
- API Documentation: The OpenAPI documentation endpoint
Alert System
When an endpoint fails, the monitoring system:
- Creates a new GitHub Issue with detailed information
- Labels the issue as “incident” and “high-priority”
- Mentions the repository owner to trigger a notification
- Provides specific details about which endpoints failed and why
GitHub Notifications
The notification system uses GitHub’s built-in @mentions to alert team members. Users will receive notifications according to their GitHub notification preferences (email, web, mobile).
To ensure you receive timely alerts:
- Check your GitHub notification settings at https://github.com/settings/notifications
- Enable notifications for “Issues” activity
- Configure your preferred notification method (web, email, mobile)
Required Permissions
The GitHub Action requires specific permissions to create issues and add labels. These permissions are already configured in the workflow file:
If you’re using an organization with restricted permissions, ensure that:
-
The repository settings allow GitHub Actions to create issues
- Go to repository Settings > Actions > General
- Under “Workflow permissions”, select “Read and write permissions”
- Check “Allow GitHub Actions to create and approve pull requests”
- Click “Save”
-
Create the required labels in your repository:
- Go to repository Issues > Labels
- Create “incident” and “high-priority” labels if they don’t exist
Extending the Monitoring System
You can extend the monitoring system to include additional checks:
- Add new endpoints to the monitoring workflow
- Implement more detailed health checks
- Set up additional notification channels (e.g., Slack, Discord, email)
- Configure custom alerting thresholds or criteria