You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a node specifies a hostgroup that does not exist the following failure occurs.
Error: Could not set'present'onensure: ServeranswerAPIerror:
{"code": -32500,"message": "Application error.","data": "No permissions to referred object or it does not exist!"}onrequest:
{"method": "host.create","params": [{"host": "cent7test.example.edu","interfaces": [{"type": 1,"main": 1,"ip": "","dns": "cent7test.example.edu","port": "10050","useip": 0}],"status": 0,"available": 1,"groups": [{"groupid": null}],"proxy_hostid": null,"templates": [10001,10102]}],"id": 80395,"jsonrpc": "2.0","auth": "ae774e8c6af9b0790929ab1019109332"}at37:/etc/puppet/environments/feature_zabbix_agent/modules/zabbix/manifests/resources/agent.ppError: Could not set'present'onensure: ServeranswerAPIerror:
{"code": -32500,"message": "Application error.","data": "No permissions to referred object or it does not exist!"}onrequest:
{"method": "host.create","params": [{"host": "cent7test.example.edu","interfaces": [{"type": 1,"main": 1,"ip": "","dns": "cent7test.example.edu","port": "10050","useip": 0}],"status": 0,"available": 1,"groups": [{"groupid": null}],"proxy_hostid": null,"templates": [10001,10102]}],"id": 80395,"jsonrpc": "2.0","auth": "ae774e8c6af9b0790929ab1019109332"}at37:/etc/puppet/environments/feature_zabbix_agent/modules/zabbix/manifests/resources/agent.ppWrappedexception:
ServeranswerAPIerror:
{"code": -32500,"message": "Application error.","data": "No permissions to referred object or it does not exist!"}onrequest:
{"method": "host.create","params": [{"host": "cent7test.example.edu","interfaces": [{"type": 1,"main": 1,"ip": "","dns": "cent7test.example.edu","port": "10050","useip": 0}],"status": 0,"available": 1,"groups": [{"groupid": null}],"proxy_hostid": null,"templates": [10001,10102]}],"id": 80395,"jsonrpc": "2.0","auth": "ae774e8c6af9b0790929ab1019109332"}Error: /Stage[main]/Zabbix::Resources::Agent/Zabbix_host[cent7test.example.edu]/ensure: changefromabsenttopresentfailed: Could not set'present'onensure: ServeranswerAPIerror:
{"code": -32500,"message": "Application error.","data": "No permissions to referred object or it does not exist!"}onrequest:
{"method": "host.create","params": [{"host": "cent7test.example.edu","interfaces": [{"type": 1,"main": 1,"ip": "","dns": "cent7test.example.edu","port": "10050","useip": 0}],"status": 0,"available": 1,"groups": [{"groupid": null}],"proxy_hostid": null,"templates": [10001,10102]}],"id": 80395,"jsonrpc": "2.0","auth": "ae774e8c6af9b0790929ab1019109332"}at37:/etc/puppet/environments/feature_zabbix_agent/modules/zabbix/manifests/resources/agent.pp
The text was updated successfully, but these errors were encountered:
I do now see that you have in the docs that this should already exist... if you don't want to create the host group then it would be great if the puppet run stopped with a fail message that said the host group doesn't exist rather than the run continuing and all this be spewed by the api gem. Of course, this is just my two cents...
I just updated the provider, I've added the following:
# First check if we have an correct hostgroup and if not, we raise an error.
search_hostgroup = zbx.hostgroups.get_id(:name => hostgroup)
if search_hostgroup.nil?
raise Puppet::Error, "The hostgroup (" + hostgroup + ") does not exist in zabbix. Please use the correct one."
end
You'll get this error instead of the one mentioned in this issue.
If a node specifies a hostgroup that does not exist the following failure occurs.
The text was updated successfully, but these errors were encountered: