Hi,
When I want to get the information of host with 192.171.44.145 ip, Zabbix API returns more than one records. One of the record is expected result but others are not. What should I do for correct search or is the host.get working correctly in API version 1.1? (apiinfo.version returns "result=1.1")
Note: I don't want to use limit=1 option to get only one record.
Thanks...
response:
When I want to get the information of host with 192.171.44.145 ip, Zabbix API returns more than one records. One of the record is expected result but others are not. What should I do for correct search or is the host.get working correctly in API version 1.1? (apiinfo.version returns "result=1.1")
Note: I don't want to use limit=1 option to get only one record.
Thanks...
Code:
{
"jsonrpc":"2.0",
"method":"host.get",
"params":{
"output":"extend",
"filter":{
"ip":"192.171.44.145"
}
},
"auth":"6cbe0ddab3e9095877d11507d3fdb4af",
"id":1
}
Code:
{"jsonrpc":"2.0","result":[
{"hostid":"10761","proxy_hostid":"0","host":"192.171.44.145","dns":"","useip":"1","ip":"192.171.44.145",...},
{"hostid":"10760","proxy_hostid":"0","host":"192.171.44.144","dns":"","useip":"1","ip":"192.171.44.144",...},
{"hostid":"10759","proxy_hostid":"0","host":"192.171.44.143","dns":"","useip":"1","ip":"192.171.44.143",...},
{"hostid":"10758","proxy_hostid":"0","host":"192.171.44.142","dns":"","useip":"1","ip":"192.171.44.142",...},
........
........
........
],"id":1}