Zabbix icon

Zabbix

Consume Zabbix API (v.0.4.1)

Actions10

Host → Update

AI-generated

Summary

Update a Zabbix host via the Zabbix API method host.update.

Inputs

  • hostid (required) — ID of the host to update. Required when JSON parameters are disabled; ignored when parametersJson is provided.
  • authentication — Authentication method. Options: Credentials (uses n8n credentials) or API Token (uses Zabbix API token). Default: Credentials.
  • jsonParameters — When true, all host parameters are sent as a single JSON object via parametersJson. When false, individual parameter fields are used. Default: false.
  • parametersJson — Parameters as a flat JSON object or string. Used when JSON Parameters is enabled. Accepts any valid host.update API parameter.
  • name — Visible name of the host. Defaults to the host's current property value if omitted.
  • status — Host status and function. 0 = monitored host (default), 1 = unmonitored host.
  • groups — Host groups to replace the current host groups. Multiple groups may be specified; must include groupid property. All groups not listed will be unlinked from the host.
  • interfaces — Host interfaces to replace the current host interfaces. Multiple interfaces may be specified; must include interfaceid property. All interfaces not listed will be removed.
  • tags — Host tags to replace the current host tags. Multiple tags may be specified; each must include a tag property. All tags not listed will be removed.
  • inventory — Host inventory properties. A collection of key-value pairs (e.g., asset_tag, chassis, contact, location, etc.) to replace the host's current inventory.
  • templates — Templates to replace the currently linked templates. Multiple templates may be specified; must include templateid property. All templates not listed will be unlinked.
  • templates_clear — Templates to unlink and clear from the host. Multiple templates may be specified; must include templateid property. These templates are removed from the host without deletion.

Output shape

Updated host object as returned by the Zabbix API host.update method.

The operation returns the updated host record including all property values after the update. Side effects depend on the parameters provided (e.g., groups replace existing groups, interfaces replace existing interfaces, tags replace existing tags).

Examples

Example 1: Update host name and status using individual parameters.

Set hostid, authentication, name to 'Production Server', status to 1.

Example 2: Update host using a full JSON parameters object.

Set authentication, jsonParameters to true, parametersJson to a JSON object containing hostid, name, status, and other desired properties.

Links

Discussion