Hi,
zabbix:2.0.6
i have a question about the parameter selectGroups in the json api method host.get
Related to the 2.0 api documentation i can use the selectGroups Parameter in the host.get method to also get the groups to which my host belongs.
But i get a empty groups field back:
available : 1
maintenance_type : 0
groups : [] <--------------------------------------------
maintenances : []
ipmi_username :
snmp_disable_until : 0
ipmi_authtype : -1
ipmi_disable_until : 0
lastaccess : 0
snmp_error :
ipmi_privilege : 2
jmx_error :
jmx_available : 0
ipmi_errors_from : 0
maintenanceid : 0
snmp_available : 0
status : 0
host : allahu.snackbar
disable_until : 0
ipmi_password :
ipmi_available : 0
maintenance_status : 0
snmp_errors_from : 0
ipmi_error :
proxy_hostid : 500500000010088
hostid : 500500000010196
name : allahu.snackbar
jmx_errors_from : 0
jmx_disable_until : 0
error :
maintenance_from : 0
errors_from : 0
my json api request object looks like this:
[{"jsonrpc":"2.0",
"method":"host.get",
"params": {
"output":"extend",
"selectGroups":"true",
"search": {
"host":"allahu"
},
},
"auth":z0r,
"id":1}]
do i understand this parameter wrong or is something wrong with my json request?
edit&fixed:
for sure it works like expected when i do what is written down in the documentation and use a query type instead of a boolean type for selectGroups.....
[{"jsonrpc":"2.0",
"method":"host.get",
"params": {
"output":"extend",
"selectGroups":"refer",
"search": {
"host":"allahu"
},
},
"auth":z0r,
"id":1}]
zabbix:2.0.6
i have a question about the parameter selectGroups in the json api method host.get
Related to the 2.0 api documentation i can use the selectGroups Parameter in the host.get method to also get the groups to which my host belongs.
But i get a empty groups field back:
available : 1
maintenance_type : 0
groups : [] <--------------------------------------------
maintenances : []
ipmi_username :
snmp_disable_until : 0
ipmi_authtype : -1
ipmi_disable_until : 0
lastaccess : 0
snmp_error :
ipmi_privilege : 2
jmx_error :
jmx_available : 0
ipmi_errors_from : 0
maintenanceid : 0
snmp_available : 0
status : 0
host : allahu.snackbar
disable_until : 0
ipmi_password :
ipmi_available : 0
maintenance_status : 0
snmp_errors_from : 0
ipmi_error :
proxy_hostid : 500500000010088
hostid : 500500000010196
name : allahu.snackbar
jmx_errors_from : 0
jmx_disable_until : 0
error :
maintenance_from : 0
errors_from : 0
my json api request object looks like this:
[{"jsonrpc":"2.0",
"method":"host.get",
"params": {
"output":"extend",
"selectGroups":"true",
"search": {
"host":"allahu"
},
},
"auth":z0r,
"id":1}]
do i understand this parameter wrong or is something wrong with my json request?
edit&fixed:
for sure it works like expected when i do what is written down in the documentation and use a query type instead of a boolean type for selectGroups.....
[{"jsonrpc":"2.0",
"method":"host.get",
"params": {
"output":"extend",
"selectGroups":"refer",
"search": {
"host":"allahu"
},
},
"auth":z0r,
"id":1}]
Comment