usermacro_create
Create a host macro in Zabbix to define custom variables referenced in items and triggers via {$MACRO} syntax for dynamic configuration without editing items.
Instructions
Create a new host macro in Zabbix.
Host macros define custom variables for specific hosts. They can be referenced in items and triggers using {$MACRO_NAME} syntax, allowing dynamic configuration without editing items.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| macro | Yes | Macro name (e.g., {$MYMACRO}). | |
| type_ | No | 0=text, 1=secret, 2=vault. | |
| value | Yes | Macro value. | |
| hostid | Yes | Host ID for the macro. | |
| description | No | Optional description explaining the macro's purpose. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||