get_alerts_history
Retrieve current or historical Ambari cluster alerts by service, host, state, or time range to monitor health, investigate incidents, and analyze alert trends.
Instructions
Retrieve current alerts or alert history from Ambari cluster.
[Tool Role]: Unified tool for retrieving both current/active alert status and historical alert events from Ambari cluster
[Core Functions]:
Current mode: Retrieve current alerts for entire cluster, specific service, or specific host
History mode: Retrieve alert history for entire cluster, specific service, or specific host
Support filtering by alert state (CRITICAL, WARNING, OK, UNKNOWN)
Support filtering by definition name
Current mode: Support filtering by maintenance state (ON, OFF)
History mode: Support filtering by time range with from_timestamp/to_timestamp
Support different output formats (detailed, summary, compact, groupedSummary for current)
History mode: Provide pagination support for large datasets
Provide current time context for LLM natural language time calculations
[Required Usage Scenarios]:
Current mode: When users request current alerts, active alerts, or alert status
Current mode: When monitoring immediate cluster health
Current mode: When investigating current issues or troubleshooting active problems
History mode: When users request alert history, past alerts, or historical alert data
History mode: When monitoring alert trends or analyzing alert patterns
History mode: When investigating past alert incidents or troubleshooting
When users mention alert status, current problems, cluster health, alert events, alert timeline, or alert logs
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_alerts_history"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | "current" for active alerts, "history" for past events (default: "current") | current |
| limit | No | Maximum number of alert entries to return | |
| format | No | Output format - 'detailed', 'summary', 'compact', or 'groupedSummary' (current mode only) | detailed |
| host_name | No | Filter by specific host name | |
| page_size | No | Number of entries per page (default: 100) - history mode only | |
| start_page | No | Starting page number (default: 0) - history mode only | |
| cluster_name | No | Name of cluster (uses default if not specified) | |
| service_name | No | Filter by specific service name (e.g., HDFS, YARN) | |
| state_filter | No | Filter by alert state (CRITICAL, WARNING, OK, UNKNOWN) | |
| to_timestamp | No | End timestamp in milliseconds (Unix epoch) - history mode only | |
| from_timestamp | No | Start timestamp in milliseconds (Unix epoch) - history mode only | |
| definition_name | No | Filter by alert definition name | |
| maintenance_state | No | Filter by maintenance state (ON, OFF) - current mode only | |
| include_time_context | No | Add current time information for LLM natural language processing |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |