Skip to main content
Glama

MCP-Ambari-API

get_alerts_history

Retrieve current or historical alerts from Ambari clusters to monitor health, troubleshoot issues, and analyze trends. Filter by state, service, host, time range, or maintenance status. Supports pagination and multiple output formats for efficient data handling.

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

Args: mode: "current" for active alerts, "history" for past events (default: "current") cluster_name: Name of cluster (uses default if not specified) service_name: Filter by specific service name (e.g., HDFS, YARN) host_name: Filter by specific host name state_filter: Filter by alert state (CRITICAL, WARNING, OK, UNKNOWN) definition_name: Filter by alert definition name maintenance_state: Filter by maintenance state (ON, OFF) - current mode only from_timestamp: Start timestamp in milliseconds (Unix epoch) - history mode only to_timestamp: End timestamp in milliseconds (Unix epoch) - history mode only include_time_context: Add current time information for LLM natural language processing limit: Maximum number of alert entries to return page_size: Number of entries per page (default: 100) - history mode only start_page: Starting page number (default: 0) - history mode only format: Output format - 'detailed', 'summary', 'compact', or 'groupedSummary' (current mode only)

Returns: Alert information (success: formatted alerts, failure: English error message)

Input Schema

NameRequiredDescriptionDefault
cluster_nameNo
definition_nameNo
formatNodetailed
from_timestampNo
host_nameNo
include_time_contextNo
limitNo
maintenance_stateNo
modeNocurrent
page_sizeNo
service_nameNo
start_pageNo
state_filterNo
to_timestampNo

Input Schema (JSON Schema)

{ "properties": { "cluster_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Cluster Name" }, "definition_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Definition Name" }, "format": { "default": "detailed", "title": "Format", "type": "string" }, "from_timestamp": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "From Timestamp" }, "host_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Host Name" }, "include_time_context": { "default": false, "title": "Include Time Context", "type": "boolean" }, "limit": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Limit" }, "maintenance_state": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Maintenance State" }, "mode": { "default": "current", "title": "Mode", "type": "string" }, "page_size": { "default": 100, "title": "Page Size", "type": "integer" }, "service_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Service Name" }, "start_page": { "default": 0, "title": "Start Page", "type": "integer" }, "state_filter": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "State Filter" }, "to_timestamp": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "To Timestamp" } }, "type": "object" }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/call518/MCP-Ambari-API'

If you have feedback or need assistance with the MCP directory API, please join our Discord server