history_get
Retrieve historical data from Zabbix by specifying item IDs, time range, history type, and sorting preferences. Outputs JSON-formatted results for analysis or integration.
Instructions
Get history data from Zabbix.
Args:
itemids: List of item IDs to get history for
history: History type (0=float, 1=character, 2=log, 3=unsigned, 4=text)
time_from: Start time (Unix timestamp)
time_till: End time (Unix timestamp)
limit: Maximum number of results
sortfield: Field to sort by
sortorder: Sort order (ASC or DESC)
Returns:
str: JSON formatted history data
Input Schema
Name | Required | Description | Default |
---|---|---|---|
history | No | ||
itemids | Yes | ||
limit | No | ||
sortfield | No | clock | |
sortorder | No | DESC | |
time_from | No | ||
time_till | No |
Input Schema (JSON Schema)
{
"properties": {
"history": {
"default": 0,
"title": "History",
"type": "integer"
},
"itemids": {
"items": {
"type": "string"
},
"title": "Itemids",
"type": "array"
},
"limit": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Limit"
},
"sortfield": {
"default": "clock",
"title": "Sortfield",
"type": "string"
},
"sortorder": {
"default": "DESC",
"title": "Sortorder",
"type": "string"
},
"time_from": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Time From"
},
"time_till": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Time Till"
}
},
"required": [
"itemids"
],
"type": "object"
}