[ZBX-7660] host.get strange output Created: 2014 Jan 15  Updated: 2017 May 30  Resolved: 2014 Jan 21

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: API (A)
Affects Version/s: 2.2.1
Fix Version/s: 2.2.2rc1

Type: Incident report Priority: Major
Reporter: Andrei Gushchin (Inactive) Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: documentation, host
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate

 Description   

In documentation output like this:
{
"jsonrpc": "2.0",
"method": "host.get",
"params": {
"output": "extend",
"filter":

{ "host": [ "Zabbix server", "Linux server" ] }


},
"auth": "038e1d7b1735c6a5436ee9eae095879e",
"id": 1
}

{
"jsonrpc": "2.0",
"result": [

{ "maintenances": [], "hostid": "10167", "proxy_hostid": "0", "host": "Linux server", "status": "0", "disable_until": "0", "error": "", "available": "0", "errors_from": "0", "lastaccess": "0", "ipmi_authtype": "-1", "ipmi_privilege": "2", "ipmi_username": "", "ipmi_password": "", "ipmi_disable_until": "0", "ipmi_available": "0", "snmp_disable_until": "0", "snmp_available": "0", "maintenanceid": "0", "maintenance_status": "0", "maintenance_type": "0", "maintenance_from": "0", "ipmi_errors_from": "0", "snmp_errors_from": "0", "ipmi_error": "", "snmp_error": "", "jmx_disable_until": "0", "jmx_available": "0", "jmx_errors_from": "0", "jmx_error": "", "name": "Linux server" }

],
"id": 1
}

The true result is:

{
"jsonrpc": "2.0",
"result": [{
"templates":[

{"templateid":"0","hostid":"0"}

],
"maintenances": [],
"hostid": "10167",
"proxy_hostid": "0",
"host": "Linux server",
"status": "0",
"disable_until": "0",
"error": "",
"available": "0",
"errors_from": "0",
"lastaccess": "0",
"ipmi_authtype": "-1",
"ipmi_privilege": "2",
"ipmi_username": "",
"ipmi_password": "",
"ipmi_disable_until": "0",
"ipmi_available": "0",
"snmp_disable_until": "0",
"snmp_available": "0",
"maintenanceid": "0",
"maintenance_status": "0",
"maintenance_type": "0",
"maintenance_from": "0",
"ipmi_errors_from": "0",
"snmp_errors_from": "0",
"ipmi_error": "",
"snmp_error": "",
"jmx_disable_until": "0",
"jmx_available": "0",
"jmx_errors_from": "0",
"jmx_error": "",
"name": "Linux server"
}
],
"id": 1
}



 Comments   
Comment by Andrei Gushchin (Inactive) [ 2014 Jan 16 ]

AFAIK this line shouldn't be there.
"templates":[

{"templateid":"0","hostid":"0"}

],

Comment by Pavels Jelisejevs (Inactive) [ 2014 Jan 17 ]

This issue has been fixed for 2.3 in ZBXNEXT-2017.

CLOSED.

Comment by Alexander Vladishev [ 2014 Jan 18 ]

Reopening. It should be fixed for 2.2.x.

Comment by Pavels Jelisejevs (Inactive) [ 2014 Jan 21 ]

RESOLVED for 2.2 in svn://svn.zabbix.com/branches/dev/ZBX-7660.

Comment by Eduards Samersovs (Inactive) [ 2014 Jan 21 ]

(1) Will be nice to use "parentTemplateId" in $sqlParts['select']['templateid']

jelisejev RESOLVED in r41720.
Eduards CLOSED

Comment by Eduards Samersovs (Inactive) [ 2014 Jan 22 ]

Tested

Comment by Pavels Jelisejevs (Inactive) [ 2014 Jan 22 ]

Fixed in 2.2.2rc1 r41728.

Comment by Pavels Jelisejevs (Inactive) [ 2014 Jan 22 ]

CLOSED.

Generated at Fri Mar 29 08:13:18 EET 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.