list_alert_history
Retrieve historical records of triggered alerts from the Beszel monitoring system. Use filters, pagination, and sorting to analyze past alert data for infrastructure monitoring.
Instructions
List alert history in Beszel.
Args: page: Page number (default: 1) per_page: Number of results per page (default: 50) filter: PocketBase filter string sort: Sort order (e.g., "-created" for most recent first)
Returns: Dictionary containing historical records of triggered alerts
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | ||
| per_page | No | ||
| filter | No | ||
| sort | No |
Implementation Reference
- src/beszel_mcp/server.py:129-156 (handler)The main handler function for the 'list_alert_history' tool. It is registered via the @mcp.tool() decorator and implements the logic to retrieve paginated alert history records from the 'alerts_history' PocketBase collection using shared client utilities.@mcp.tool() async def list_alert_history( page: int = 1, per_page: int = 50, filter: Optional[str] = None, sort: Optional[str] = None, ) -> dict: """List alert history in Beszel. Args: page: Page number (default: 1) per_page: Number of results per page (default: 50) filter: PocketBase filter string sort: Sort order (e.g., "-created" for most recent first) Returns: Dictionary containing historical records of triggered alerts """ client = get_client() await ensure_authenticated(client) return await client.get_list( collection="alerts_history", page=page, per_page=per_page, filter=filter, sort=sort, )