Skip to main content
Glama
mpeirone

zabbix-mcp-server

maintenance_update

Modify an existing maintenance period in Zabbix by updating details such as name, start/end times, and description. Ensure accurate scheduling and system availability adjustments with this tool on zabbix-mcp-server.

Instructions

Update an existing maintenance period in Zabbix.

Args:
    maintenanceid: Maintenance ID to update
    name: New maintenance name
    active_since: New start time (Unix timestamp)
    active_till: New end time (Unix timestamp)
    description: New maintenance description
    
Returns:
    str: JSON formatted update result

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
active_sinceNo
active_tillNo
descriptionNo
maintenanceidYes
nameNo

Implementation Reference

  • The MCP tool handler for 'maintenance_update', registered via @mcp.tool() decorator. Updates a Zabbix maintenance period using the ZabbixAPI client, with input validation via type hints and docstring serving as schema.
    @mcp.tool()
    def maintenance_update(maintenanceid: str, name: Optional[str] = None,
                           active_since: Optional[int] = None, active_till: Optional[int] = None,
                           description: Optional[str] = None) -> str:
        """Update an existing maintenance period in Zabbix.
        
        Args:
            maintenanceid: Maintenance ID to update
            name: New maintenance name
            active_since: New start time (Unix timestamp)
            active_till: New end time (Unix timestamp)
            description: New maintenance description
            
        Returns:
            str: JSON formatted update result
        """
        validate_read_only()
        
        client = get_zabbix_client()
        params = {"maintenanceid": maintenanceid}
        
        if name:
            params["name"] = name
        if active_since:
            params["active_since"] = active_since
        if active_till:
            params["active_till"] = active_till
        if description:
            params["description"] = description
        
        result = client.maintenance.update(**params)
        return format_response(result)

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/mpeirone/zabbix-mcp-server'

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