Nagios MCP

Created By
PROSPIRE-TECHNOLOGY-SERVICESa year ago
MCP Server for Nagios Core.
Overview

nagios-mcp

PyPI - Version Python Version from PEP 621 TOML

MCP Server for Nagios Core.

This server is built by us for the Nagios Core web-client. The code for the server can be found here. The server utilizes the CGI binaries located at the cgi-bin or sbin folder in your Nagios folder. More specifically the statusjson.cgi and objectjson.cgi files for the purpose of the status and configuration tooling.

List of Tools:

Tool NameTool Description
get_host_statusRetrieves status for all hosts or a specific host.
get_service_statusRetrieves status for services using statusjson.cgi.
get_alertsRetrieves current problematic host and service states (alerts).
get_program_statusRetrieves the Nagios Core program status from statusjson.cgi
get_hosts_in_group_statusRetrieves status for all hosts within a specific host group.
get_services_in_group_statusRetrieves status for all services within a specific service group.
get_services_on_host_in_group_statusRetrieves status for all the services with a specific host group.
get_overall_health_summaryRetrieves overall health summary for all the hosts and services.
get_unhandled_problemsRetrieves all the unhandled problems for all the hosts and services.
get_object_list_configRetrieves configuration list for object types like "hosts", "services", "hostgroups", etc.
get_single_object_configRetrieves configuration for a single specific object.
get_host_dependenciesRetrieves host dependencies for the given host.
get_service_dependenciesRetrieves service dependencies for the given host.
get_contacts_for_objectRetrieves the list of contacts to inform for an object.
get_commentsRetrieves comments based on the host and service.
get_comment_by_idRetrieves comments for the given comment id.
get_downtimesRetrieves the information for the downtimes in the Nagios Host Process.
get_nagios_process_infoReturns the information for the Nagios process. (Alias for get_program_status function)
  • Currently all the tools use GET requests. Other useful tools and tools requiring POST requests will be added soon.

How the MCP server works?

  • Nagios Core web-client is typically hosted on http://YOUR_HOST/nagios/
  • The MCP server reads the details about the processes and services using the CGI binaries, they can be found in the cgi-bin or sbin sub-directory in your Nagios main directory.
  • The Status Tools and Config Tools use the cgi-bin/statusjson.cgi and cgi-bin/objectjson.cgi files respectively for retrieving the information.

Server Config

{
  "mcpServers": {
    "nagios-mcp-stdio": {
      "command": "uvx",
      "args": [
        "nagios-mcp",
        "--config",
        "ABSOLUTE_PATH_TO/nagios_config.yaml"
      ]
    },
    "nagios-mcp-sse": {
      "url": "http://localhost:8000/sse"
    }
  }
}
Project Info
Created At
a year ago
Updated At
a year ago
Author Name
PROSPIRE-TECHNOLOGY-SERVICES
Star
-
Language
-
License
-
Category

Recommend Servers

View All