trend_get
Retrieve hourly aggregated min/avg/max trend data to analyze long-term metric behavior and reduce data volume. Filter by item IDs and time range.
Instructions
Retrieve trend data (hourly aggregated min/avg/max values). Trends are calculated from history and provide a compact, long-term view of metric behaviour. Each record covers a one-hour period and includes the minimum, average, and maximum values as well as the number of values collected. Use trends instead of history for time ranges spanning days or more to reduce data volume. Filter by 'itemids' and use 'time_from' / 'time_till' to bound the time range.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of results to return. | |
| output | No | Properties of the trend object to return. Pass 'extend' for all, 'count' for the number of matches only, or a comma-separated list of property names. Default when omitted: 'extend'. Properties: clock, itemid, num, value_avg, value_max, value_min. | |
| server | No | Target Zabbix server. Available: default. Defaults to 'default' if omitted. | |
| itemids | No | Return only trend data for the given item IDs. | |
| raw_json | No | Strips the security disclaimer preamble from the response so it is pure JSON. Default: false. Requires the bearer token to have 'allow_raw_json' explicitly enabled by an operator in the admin portal - tokens without that policy receive a PolicyError instead. WARNING: setting true bypasses the prompt-injection mitigation marker that wraps untrusted Zabbix data (host names, item descriptions, problem text). LLM clients (Claude, GPT, Cursor, ...) should leave this false; only programmatic non-LLM consumers (Python scripts, n8n workflows that json.loads the result) should set true. | |
| time_from | No | Return only trend data after this time (Unix timestamp, ISO 8601 date-time such as 2026-04-01T08:00:00Z, or a relative time such as now-1h, now/d or now-7d/d; a value without a zone is read in the zone resolved for the call) (inclusive). | |
| time_till | No | Return only trend data before this time (Unix timestamp, ISO 8601 date-time such as 2026-04-01T08:00:00Z, or a relative time such as now-1h, now/d or now-7d/d; a value without a zone is read in the zone resolved for the call) (inclusive). | |
| countOutput | No | Return the count of matching results instead of the actual data. | |
| extra_params | No | Other native trend.get parameters, merged into the request as-is. trend.get has no parameters beyond the typed ones. Any other key is refused here, because Zabbix would silently ignore it. For a parameter you are sure exists on your release but is not listed, use zabbix_raw_api_call. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |