Hello, i'm on linux and i decide to go and give a try to the zabbix API.
No problem getting a list of host/host group/template. No problem to add a host to an host group but I didn't manage to remove a host from a group. I used to functions, the two of them didn't work. See the message below.
for host.massremove I send:
and I got:
I'm logged into Admin and I have no problem removinf from host by the web frontend with the same account.
More disturbing is the hostgroup.massremove method when I send:
I got:
So I don't understand what's going on with these remove functions. I saw several bug reporting about this kind of behavior but all for 2.0.x and 1.8.x and all fix. I didn't found any log on the zabbix server showing something in particular.
Can you please help me with this problem ?
No problem getting a list of host/host group/template. No problem to add a host to an host group but I didn't manage to remove a host from a group. I used to functions, the two of them didn't work. See the message below.
for host.massremove I send:
Code:
{
'method': 'host.massremove',
'params': {
'groups': [{'groupid': '17'}],
'hosts': [{'hostid': '10205'}]
},
'jsonrpc': '2.0',
'id': 4,
'auth': '10ad0fac3d0e6a75237b3af6a6837183'
}
Code:
{
"id": 4,
"jsonrpc": "2.0",
"error": {
"code": -32500,
"message": "Application error.",
"data": "You do not have permission to perform this operation."
}
}
More disturbing is the hostgroup.massremove method when I send:
Code:
{
'method': 'hostgroup.massremove',
'params': {
'groups': [{'groupid': '17'}],
'hosts': [{'hostid': '10205'}]
},
'jsonrpc': '2.0',
'id': 4,
'auth': '6aa88a60ff12f502ab73b36fb1c86176'
}
Code:
{
"result": {
"groupids": null
},
"jsonrpc": "2.0",
"id": 4
}
Can you please help me with this problem ?
Comment