Closed mergwyn closed 2 years ago
class { 'zabbix::agent': manage_resources => true, agent_use_ip => false, }
API error caused by ipaddress set to 0 rather than an empty string as per zabbix API docs
ipaddress
Successful API call
Error: /Stage[main]/Zabbix::Resources::Web/Zabbix_host[india.xxx]/ensure: change from 'absent' to 'present' failed: Could not set 'present' on ensure: Server answer API error { "code": -32602, "message": "Invalid params.", "data": "Incorrect arguments passed to function." } on request: { "method": "host.create", "params": [ { "host": "india.xxx", "interfaces": [ { "type": 1, "main": 1, "ip": null, "dns": "india.xxx", "port": "10050", "useip": 0 } ], "status": 0, "available": 1, "groups": [ { "groupid": 2 } ], "proxy_hostid": null, "templates": [ { "templateid": 10391 }, { "templateid": 10351 }, { "templateid": 10336 }, { "templateid": 10380 } ] } ], "id": 3027, "jsonrpc": "2.0", "auth": "4eb8de6f34fcd6f2501add2d704dcb84" }
Affected Puppet, Ruby, OS and module versions/distributions
How to reproduce (e.g Puppet code you use)
What are you seeing
API error caused by
ipaddress
set to 0 rather than an empty string as per zabbix API docsWhat behaviour did you expect instead
Successful API call
Output log
Any additional information you'd like to impart