community.zabbix icon indicating copy to clipboard operation
community.zabbix copied to clipboard

community.zabbix.zabbix_host module will send group id and name but only id is allowed in zabbix 7

Open Trikke76 opened this issue 11 months ago • 4 comments

SUMMARY

(https://www.zabbix.com/documentation/devel/en/manual/api/reference/host/create) The host groups must have only the groupid property defined.

before it was allowed now its not allowed anymore

ISSUE TYPE
  • Bug Report
COMPONENT NAME

community.zabbix.zabbix_host module

ANSIBLE VERSION
ansible [core 2.14.13]
OS / ENVIRONMENT / Zabbix Version

rhel 9

STEPS TO REPRODUCE

run the https://docs.ansible.com/ansible/latest/collections/community/zabbix/zabbix_host_module.html to register a new host in zabbix 7

EXPECTED RESULTS

register the host in zabbix 7 and not fail on the error that the name is defined

ACTUAL RESULTS
fatal: [test-backupdb.intrrn.be -> 10.0.243.24({{ zabbix_api_server_host }})]: FAILED! => {"changed": false, "msg": "connection error occurred: REST API returned {'code': -32602, 'message': 'Invalid params.', 'data': 'Invalid parameter \"/1/groups/1\": unexpected parameter \"name\".'} when sending {\"jsonrpc\": \"2.0\", \"method\": \"host.create\", \"id\": \"3de91654-79a6-46b4-812a-2953ef95a2ee\", \"params\": {\"host\": \"xxxxxx\", \"interfaces\": [{\"type\": 1, \"main\": 1, \"useip\": 1, \"ip\": \"xxxxx\", \"dns\": \"xxxxx\", \"port\": \"10050\", \"details\": {}}], \"groups\": [{\"groupid\": \"25\", \"name\": \"Linux Servers\", \"flags\": \"0\", \"uuid\": \"xxxxxxxx\"}], \"status\": 0, \"tls_psk_identity\": \"Test-BackupDB\"}, \"auth\": \"xxxxxxxx\"}"}



Trikke76 avatar Mar 07 '24 13:03 Trikke76

Hi @Trikke76, at the moment we are not doing development for Zabbix 7.0. We'll run all the tests and fix all the issues against 7.0 when it is released.

BGmot avatar Mar 07 '24 13:03 BGmot

I ran into this issue as well when playing around with the community.zabbix.zabbix_host module. Let me know if you would need more data for fixing this when the time comes.

osten33 avatar Apr 08 '24 08:04 osten33

Just came across this breaking change too. Anyone find a workaround? We're starting our testing in preparation for the release of Zabbix 7.0

beerygaz avatar Apr 11 '24 11:04 beerygaz

For anyone interested, i just tested with the new RC release (7.0.0rc1) and the issue is present there as well.

osten33 avatar May 16 '24 10:05 osten33

@BGmot is this closed out based on your previous work?

pyrodie18 avatar Jun 08 '24 18:06 pyrodie18

Yes

BGmot avatar Jun 08 '24 23:06 BGmot