Skip to main content
Glama
mpeirone

zabbix-mcp-server

host_update

Update an existing host in Zabbix by modifying its ID, name, visible name, or status using the specified parameters. Returns JSON-formatted results for seamless integration.

Instructions

Update an existing host in Zabbix.

Args:
    hostid: Host ID to update
    host: New host name
    name: New visible name
    status: New status (0=enabled, 1=disabled)
    
Returns:
    str: JSON formatted update result

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hostNo
hostidYes
nameNo
statusNo

Implementation Reference

  • The host_update MCP tool handler function that updates an existing host in Zabbix using the Zabbix API client. It validates read-only mode, prepares parameters, calls the API, and formats the response.
    @mcp.tool()
    def host_update(hostid: str, host: Optional[str] = None, 
                    name: Optional[str] = None, status: Optional[int] = None) -> str:
        """Update an existing host in Zabbix.
        
        Args:
            hostid: Host ID to update
            host: New host name
            name: New visible name
            status: New status (0=enabled, 1=disabled)
            
        Returns:
            str: JSON formatted update result
        """
        validate_read_only()
        
        client = get_zabbix_client()
        params = {"hostid": hostid}
        
        if host:
            params["host"] = host
        if name:
            params["name"] = name
        if status is not None:
            params["status"] = status
        
        result = client.host.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