Hi all,
I'm trying to run API history.get but all outputs is empty. I already try with and without parameters, change parameters, but the output is always empty.
As the first step, I'm running a "item.get" to get item id:
payload = {
"jsonrpc": "2.0",
"method": "item.get",
"params": {
"output": "extend",
"filter": {
"hostids": [
i
]
},
"search": {
"key_": "agent.ping"
},
},
"auth": self.chave,
"id": 1
After this, I'm running the history.get with the output item id of first step:
payload = {
"jsonrpc": "2.0",
"method": "history.get",
"params": {
"output": ["itemid"],
"history": 0,
"itemids": ["10020"],
"hostids": "10612",
#"time_from": "1632713380",
#"time_till": "1632716980",
"sortfield": "clock",
"sortorder": "DESC",
#"limit": 10
},
"auth": self.chave,
"id": 1
}
Result is empty:
{'jsonrpc': '2.0', 'result': [], 'id': 1}
Does anybody can help me, please?
Thanks and regards!
I'm trying to run API history.get but all outputs is empty. I already try with and without parameters, change parameters, but the output is always empty.
As the first step, I'm running a "item.get" to get item id:
payload = {
"jsonrpc": "2.0",
"method": "item.get",
"params": {
"output": "extend",
"filter": {
"hostids": [
i
]
},
"search": {
"key_": "agent.ping"
},
},
"auth": self.chave,
"id": 1
After this, I'm running the history.get with the output item id of first step:
payload = {
"jsonrpc": "2.0",
"method": "history.get",
"params": {
"output": ["itemid"],
"history": 0,
"itemids": ["10020"],
"hostids": "10612",
#"time_from": "1632713380",
#"time_till": "1632716980",
"sortfield": "clock",
"sortorder": "DESC",
#"limit": 10
},
"auth": self.chave,
"id": 1
}
Result is empty:
{'jsonrpc': '2.0', 'result': [], 'id': 1}
Does anybody can help me, please?
Thanks and regards!
Comment