MCP cover image
See in Github
2025-03-29

Un serveur de protocole de contexte de modèle (MCP) qui s'intègre à Prometheus alertmanager

1

Github Watches

2

Github Forks

0

Github Stars

Prometheus Alertmanager MCP Server

This project implements a Model Context Protocol (MCP) server that integrates with Prometheus Alertmanager. It serves as a bridge between Claude AI and Alertmanager, allowing Claude to interact with and manage alerts through a standardized interface.

Core Features

  1. Alert Retrieval: Fetches and formats current alerts from Alertmanager with optional filtering capabilities.

  2. Alert Details: Provides detailed information about specific alerts when referenced by their fingerprint.

  3. Silence Management: Offers tools to create, list, and delete silences that suppress notifications for specific alerts.

  4. Alert Grouping: Retrieves alert groups as organized by Alertmanager.

Technical Implementation

Installation

Prerequisites

Setup

The package is available on npm and can be used directly with npx:

npx alertmanager-mcp

For global installation:

npm install -g alertmanager-mcp
alertmanager-mcp

Usage with Claude for Desktop

  1. Configure Claude for Desktop to use the MCP server by editing the configuration file:
{
  "mcpServers": {
    "alertmanager": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "--network=host",
        "-e", "ALERTMANAGER_URL=http://your-alertmanager-url:9093",
        "ghcr.io/kaznak/alertmanager-mcp:latest"
      ],
      "env": {}
    }
  }
}
  1. Restart Claude for Desktop to load the new configuration.

  2. You can now ask Claude to interact with Alertmanager using natural language:

    • "Show me current alerts"
    • "Filter alerts related to CPU issues"
    • "Get details for this alert"
    • "Create a silence for this alert for the next 2 hours"

Available Tools

get-alerts

Retrieves a list of alerts with optional filtering.

Parameters:

  • filter: (optional) Filtering query (e.g., alertname=~'.*CPU.*')
  • silenced: (optional) Include silenced alerts
  • inhibited: (optional) Include inhibited alerts
  • active: (optional) Include active alerts (default: true)

get-alert-details

Gets detailed information about a specific alert.

Parameters:

  • fingerprint: Alert fingerprint

create-silence

Creates a silence for alerts matching specified criteria.

Parameters:

  • matchers: List of matchers for alerts
  • startsAt: (optional) Silence start time (ISO8601 format, default is current time)
  • endsAt: Silence end time (ISO8601 format)
  • createdBy: Username who created the silence
  • comment: Reason or explanation for the silence

get-silences

Retrieves a list of silences with optional filtering.

Parameters:

  • filter: (optional) Filtering query (e.g., createdBy=~'.*admin.*')

delete-silence

Deletes a silence by ID.

Parameters:

  • silenceId: ID of the silence to delete

get-alert-groups

Gets alert groups with optional filtering.

Parameters:

  • active: (optional) Include active alerts (default: true)
  • silenced: (optional) Include silenced alerts
  • inhibited: (optional) Include inhibited alerts

Extending the Server

This MCP server can be extended with additional features such as:

  • Alert trend analysis
  • Automatic response suggestions
  • Integration with incident management systems
  • Custom dashboards for specific alert types

Resources

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Yusuf Emre Yeşilyurt
  • I find academic articles and books for research and literature reviews.

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • Carlos Ferrin
  • Encuentra películas y series en plataformas de streaming.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • Contraband Interactive
  • Emulating Dr. Jordan B. Peterson's style in providing life advice and insights.

  • rustassistant.com
  • Your go-to expert in the Rust ecosystem, specializing in precise code interpretation, up-to-date crate version checking, and in-depth source code analysis. I offer accurate, context-aware insights for all your Rust programming questions.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • apappascs
  • Découvrez la collection la plus complète et la plus à jour de serveurs MCP sur le marché. Ce référentiel sert de centre centralisé, offrant un vaste catalogue de serveurs MCP open-source et propriétaires, avec des fonctionnalités, des liens de documentation et des contributeurs.

  • modelcontextprotocol
  • Serveurs de protocole de contexte modèle

  • Mintplex-Labs
  • L'application tout-en-un desktop et Docker AI avec chiffon intégré, agents AI, constructeur d'agent sans code, compatibilité MCP, etc.

  • ShrimpingIt
  • Manipulation basée sur Micropython I2C de l'exposition GPIO de la série MCP, dérivée d'Adafruit_MCP230XX

  • OffchainLabs
  • Aller la mise en œuvre de la preuve de la participation Ethereum

  • n8n-io
  • Plateforme d'automatisation de workflow à code équitable avec des capacités d'IA natives. Combinez le bâtiment visuel avec du code personnalisé, de l'auto-hôte ou du cloud, 400+ intégrations.

  • huahuayu
  • Une passerelle API unifiée pour intégrer plusieurs API d'explorateur de blockchain de type étherscan avec la prise en charge du protocole de contexte modèle (MCP) pour les assistants d'IA.

    Reviews

    4 (1)
    Avatar
    user_fY5onT1L
    2025-04-18

    I've been using alertmanager-mcp for a while now, and it has greatly streamlined our monitoring operations. The integration capabilities and ease of configuration are impressive. The support from kaznak is top-notch and the documentation is thorough, making implementation a breeze. Highly recommended for anyone looking to improve their alert management system!