Skip to main content
Glama
mpeirone

zabbix-mcp-server

trigger_update

Update Zabbix triggers by modifying description, expression, priority, or status using trigger ID. Returns JSON-formatted results for streamlined monitoring adjustments.

Instructions

Update an existing trigger in Zabbix.

Args:
    triggerid: Trigger ID to update
    description: New trigger description
    expression: New trigger expression
    priority: New severity level
    status: New status (0=enabled, 1=disabled)
    
Returns:
    str: JSON formatted update result

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
descriptionNo
expressionNo
priorityNo
statusNo
triggeridYes

Implementation Reference

  • The handler function for the 'trigger_update' tool, decorated with @mcp.tool() which also serves as registration. It updates a Zabbix trigger using the ZabbixAPI client, validating read-only mode first.
    @mcp.tool()
    def trigger_update(triggerid: str, description: Optional[str] = None,
                       expression: Optional[str] = None, priority: Optional[int] = None,
                       status: Optional[int] = None) -> str:
        """Update an existing trigger in Zabbix.
        
        Args:
            triggerid: Trigger ID to update
            description: New trigger description
            expression: New trigger expression
            priority: New severity level
            status: New status (0=enabled, 1=disabled)
            
        Returns:
            str: JSON formatted update result
        """
        validate_read_only()
        
        client = get_zabbix_client()
        params = {"triggerid": triggerid}
        
        if description:
            params["description"] = description
        if expression:
            params["expression"] = expression
        if priority is not None:
            params["priority"] = priority
        if status is not None:
            params["status"] = status
        
        result = client.trigger.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