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
| Name | Required | Description | Default |
|---|---|---|---|
| description | No | ||
| expression | No | ||
| priority | No | ||
| status | No | ||
| triggerid | Yes |
Input Schema (JSON Schema)
{
"properties": {
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Description"
},
"expression": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Expression"
},
"priority": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Priority"
},
"status": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Status"
},
"triggerid": {
"title": "Triggerid",
"type": "string"
}
},
"required": [
"triggerid"
],
"type": "object"
}
Implementation Reference
- src/zabbix_mcp_server.py:542-574 (handler)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)