Skip to main content
Glama
ntk148v

alertmanager-mcp-server

get_alert_groups

Retrieve a list of alert groups based on their status, including silenced, inhibited, or active, for efficient monitoring and management in alertmanager-mcp-server.

Instructions

Get a list of alert groups

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
activeNo
inhibitedNo
silencedNo

Implementation Reference

  • The handler function for the 'get_alert_groups' tool. It constructs query parameters based on optional silenced, inhibited, and active flags (defaulting active to True), then calls make_request to GET /api/v2/alerts/groups from the Alertmanager API.
    @mcp.tool(description="Get a list of alert groups") async def get_alert_groups(silenced: Optional[bool] = None, inhibited: Optional[bool] = None, active: Optional[bool] = None): """Get a list of alert groups Params ------ silenced If true, include silenced alerts. inhibited If true, include inhibited alerts. active If true, include active alerts. Returns ------- list Return a list of AlertGroup objects from Alertmanager instance. """ params = {"active": True} if silenced is not None: params["silenced"] = silenced if inhibited is not None: params["inhibited"] = inhibited if active is not None: params["active"] = active return make_request(method="GET", route="/api/v2/alerts/groups", params=params)

Other Tools

Related Tools

Latest Blog Posts

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/ntk148v/alertmanager-mcp-server'

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