Hi everyone!
Staff need to search the history of an item to generate some graphics in an automated report.
But the API query does not return any value. Let me give you an example:
Follow the query below using host.get
Query:
{
"output":["host"],
"sortfield": "name",
"hostids": "10129",
"selectItems":["itemid","name","key_"]
}
result:
{
"hostid": "10129",
"host": "SRVAD01",
"items": [
{
"itemid": "24687",
"name": "Host name of zabbix_agentd running",
"key_": "agent.hostname"
}
So far so good, more when I query with method history.get using for example the "itemid": "24687" the result is null:
Query:
{
"output": "extend",
"history": 0,
"itemids": "24687",
"sortfield": "clock",
"sortorder": "DESC",
"limit": 10
}
Result:
{
"jsonrpc": "2.0",
"result": [],
"id": 25
}
What was I doing wrong? Could you please help me?
Best Regards,
Breno Padovan
Staff need to search the history of an item to generate some graphics in an automated report.
But the API query does not return any value. Let me give you an example:
Follow the query below using host.get
Query:
{
"output":["host"],
"sortfield": "name",
"hostids": "10129",
"selectItems":["itemid","name","key_"]
}
result:
{
"hostid": "10129",
"host": "SRVAD01",
"items": [
{
"itemid": "24687",
"name": "Host name of zabbix_agentd running",
"key_": "agent.hostname"
}
So far so good, more when I query with method history.get using for example the "itemid": "24687" the result is null:
Query:
{
"output": "extend",
"history": 0,
"itemids": "24687",
"sortfield": "clock",
"sortorder": "DESC",
"limit": 10
}
Result:
{
"jsonrpc": "2.0",
"result": [],
"id": 25
}
What was I doing wrong? Could you please help me?
Best Regards,
Breno Padovan
Comment