Cannot create host with Zabbix Proxy (ZABBIX 7.0)
NEViLLLLL opened this issue · comments
SUMMARY
Cannot creaty host with proxy or get proxy
{"changed": false, "msg": "connection error occurred: REST API returned {'code': -32602, 'message': 'Invalid params.', 'data': 'Invalid parameter "/filter": unexpected parameter "host".'}
ISSUE TYPE
- Bug Report
COMPONENT NAME
community.zabbix.zabbix_proxy
ANSIBLE VERSION
ansible [core 2.16.5]
config file = /etc/ansible/ansible.cfg
configured module search path = ['/var/lib/jenkins/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/lib/python3.11/site-packages/ansible
ansible collection location = /var/lib/jenkins/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/local/bin/ansible
python version = 3.11.5 (main, Nov 15 2023, 18:13:17) [GCC 8.5.0 20210514 (Red Hat 8.5.0-20.0.1)] (/usr/bin/python3.11)
jinja version = 3.1.3
libyaml = True
CONFIGURATION
CONFIG_FILE() = /etc/ansible/ansible.cfg
DEFAULT_FORKS(/etc/ansible/ansible.cfg) = 15
OS / ENVIRONMENT / Zabbix Version
Zabbix 7, OL8 etc
STEPS TO REPRODUCE
- name: Update Zabbix host
# set task level variables as we change ansible_connection plugin here
vars:
ansible_network_os: community.zabbix.zabbix
ansible_connection: httpapi
ansible_httpapi_port: 443
ansible_httpapi_use_ssl: true
ansible_httpapi_validate_certs: false
ansible_zabbix_url_path: ""
ansible_host: "{{ zabbix_server_url }}"
community.zabbix.zabbix_host:
host_name: "{{ host_name }}"
visible_name: "{{ host_name }}"
description: "{{ host_name }} created by Ansible - {{ ansible_date_time.date }}"
host_groups: "{{ host_groups }}"
link_templates: "{{ link_templates }}"
status: "{{ zabbix_status }}"
state: "{{ zabbix_state }}"
proxy: "{{ zabbix_proxy }}"
macros: "{{ macros }}"
EXPECTED RESULTS
Host should be added
ACTUAL RESULTS
{"changed": false, "msg": "connection error occurred: REST API returned {'code': -32602, 'message': 'Invalid params.', 'data': 'Invalid parameter \"/filter\": unexpected parameter \"host\".'} when sending {\"jsonrpc\": \"2.0\", \"method\": \"proxy.get\", \"id\":)
It doesn't say which version of the collection you're running. We're currently working to release 3.0.0 which will include support for Zabbix 7.0. If you use the current main branch, you will likely be good but if you're using anything 2.X, its not supported.
That would be the error you get trying to use currently released (2.x) version with Zabbix 7.0.
It doesn't say which version of the collection you're running. We're currently working to release 3.0.0 which will include support for Zabbix 7.0. If you use the current main branch, you will likely be good but if you're using anything 2.X, its not supported.
I am using 2.5.1 version
Collection Version
---------------------------------------- -------
community.zabbix 2.5.1
@pyrodie18 do you have any realistic estimate for version 3 release ? Not pushing, just curious what date I can schedule zabbix upgrade. Many thanks
Honestly think we're nearly there. I would say by the end of the week at the latest. Can you watch #1242
@pyrodie18 you are a man of your word, thanks
Glad it worked.