Usermacro Get
usermacro_getRetrieve Zabbix user macros to parameterize monitoring configurations, with filtering by host, template, or global scope and pagination support.
Instructions
Get user macros from Zabbix.
User macros are variables that can be referenced in items, triggers, and scripts. They allow parameterization of monitoring configurations with custom values.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "usermacro_get"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of results to return. Default is 100. | |
| offset | No | Number of matching records to skip. Use with 'limit' to page through results; check 'has_more' and 'total' in the response. | |
| output | No | extend | |
| search | No | Dictionary with search criteria like {'macro': '{$THRESHOLD}'}. | |
| hostids | No | List of host IDs to get macros from. An empty list matches none. | |
| sortfield | No | Field to sort by. usermacro.get only allows 'macro'. | macro |
| sortorder | No | Sort direction - 'ASC' or 'DESC'. | ASC |
| globalmacro | No | Return global macros. | |
| templateids | No | List of template IDs to get macros from. An empty list matches none. | |
| count_output | No | If true, returns only the count of matched objects as an integer. | |
| hostmacroids | No | List of host macro IDs to get. An empty list matches none. | |
| filter_params | No | Additional filter parameters for advanced filtering. | |
| globalmacroids | No | List of global macro IDs to get. An empty list matches none. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||