ansible-collections / community.zabbix

Zabbix Ansible modules
http://galaxy.ansible.com/community/zabbix
Other
329 stars 285 forks source link

Support new method of getting proxy information for Zabbix 7.0.0alpha4 #1078

Closed tikfj closed 1 year ago

tikfj commented 1 year ago
SUMMARY

Current zabbix_host module fails to get proxy information because of new change in Zabbix 7.0.0alpha4.

This can be improved, for example, if the DB table column search can be defined, or if it can search multiple table columns for the proxy information.

ISSUE TYPE
COMPONENT NAME
ADDITIONAL INFORMATION

Failed to get proxy information for existing hosts due to change from proxy_hostid to proxyid in hosts table in Zabbix 7.0.0alpha4 DB.

For more details:

Ansible error message is:

failed: [10.2.188.24] (item={'ip': '10.2.188.27', 'port': 10052, 'host_name': 'test-agent', 'visible_name': 'Test Agent', 'certificate': False}) => {"ansible_loop_var": "item", "changed": false, "item": {"certificate": false, "host_name": "test-agent", "ip": "10.2.188.27", "port": 10052, "visible_name": "Test Agent"}, "module_stderr": "Traceback (most recent call last):\n  File \"<stdin>\", line 107, in <module>\n  File \"<stdin>\", line 99, in _ansiballz_main\n  File \"<stdin>\", line 47, in invoke_module\n  File \"<frozen runpy>\", line 226, in run_module\n  File \"<frozen runpy>\", line 98, in _run_module_code\n  File \"<frozen runpy>\", line 88, in _run_code\n  File \"/tmp/ansible_community.zabbix.zabbix_host_payload_9_7yybl2/ansible_community.zabbix.zabbix_host_payload.zip/ansible_collections/community/zabbix/plugins/modules/zabbix_host.py\", line 1250, in <module>\n  File \"/tmp/ansible_community.zabbix.zabbix_host_payload_9_7yybl2/ansible_community.zabbix.zabbix_host_payload.zip/ansible_collections/community/zabbix/plugins/modules/zabbix_host.py\", line 1093, in main\nKeyError: 'proxy_hostid'\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}
pyrodie18 commented 1 year ago

@tikfj, thanks for the ticket. We only support official releases of Zabbix and have not even begun to look at 7.0. Once it actually drops, we'll spend some time looking at changes and incorporate them as possible.