Hello,
I am using the Zabbix API through Ansible... it's basically python generating JSON and sending it to the API.
My zabbix server is version 6.4 .
I have the issue that my request is failing:
(I have tried to minimize the code to avoid potential issues, but even this is not working.)
The error I get is: No permissions to call "host.create".
Now, ok I was willing to entertain that the permissions are somehow missing on this user, but the user is the same one I used on version 5.0 of this server before an upgrade and it worked fine. Just to be thorough though: User is in the "Zabbix administrators" group and has set Permissions "Super admin role". I have also checked the user role as per the instructions to verify it has access to host.create, but it looks like those options cannot be disabled for the Super admin role anyway.
I have also verified that the user group has "Host permissions" to the group "Linux servers".
I know that the API key is correct, because the code does other operations (like looking up the group data indicated in the above code sample) without issue.
What am I missing?
LP,
Jure
I am using the Zabbix API through Ansible... it's basically python generating JSON and sending it to the API.
My zabbix server is version 6.4 .
I have the issue that my request is failing:
Code:
{
"jsonrpc": "2.0",
"method": "host.create",
"id": "b7c77f0c-a027-4fe3-87a9-d7853f270cae",
"params": {
"host": "myserver.domain.local",
"interfaces": [],
"groups": [
{
"groupid": "2",
"name": "Linux servers",
"flags": "0",
"uuid": "dc579cd7a1a34222933f24f52a68bcd8"
}
],
"status": 0
},
"auth": "myhexadecimalAPIkeyhere"
}
The error I get is: No permissions to call "host.create".
Now, ok I was willing to entertain that the permissions are somehow missing on this user, but the user is the same one I used on version 5.0 of this server before an upgrade and it worked fine. Just to be thorough though: User is in the "Zabbix administrators" group and has set Permissions "Super admin role". I have also checked the user role as per the instructions to verify it has access to host.create, but it looks like those options cannot be disabled for the Super admin role anyway.
I have also verified that the user group has "Host permissions" to the group "Linux servers".
I know that the API key is correct, because the code does other operations (like looking up the group data indicated in the above code sample) without issue.
What am I missing?
LP,
Jure
Comment