Add source status API and enhance dashboard with data source checks
- Introduced a new API endpoint `/api/source-status/` to return the status of Prometheus and OpenStack data sources. - Implemented lightweight health check functions for both Prometheus and OpenStack. - Updated the dashboard template to display the status of data sources dynamically. - Added tests for the new API endpoint to ensure correct functionality and response handling. - Configured a cache timeout for source status checks to improve performance.
This commit is contained in:
@@ -155,3 +155,4 @@ CACHES = {
|
||||
}
|
||||
}
|
||||
DASHBOARD_CACHE_TTL = 120 # seconds
|
||||
SOURCE_STATUS_CACHE_TTL = 30 # seconds (lightweight source-status checks)
|
||||
|
||||
Reference in New Issue
Block a user