Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot create host with Zabbix Proxy (ZABBIX 7.0) #1287

Closed
NEViLLLLL opened this issue Jun 10, 2024 · 8 comments
Closed

Cannot create host with Zabbix Proxy (ZABBIX 7.0) #1287

NEViLLLLL opened this issue Jun 10, 2024 · 8 comments
Labels
module The issue or pull request is related to Zabbix module Zabbix 7.0

Comments

@NEViLLLLL
Copy link

NEViLLLLL commented Jun 10, 2024

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\":)

@NEViLLLLL NEViLLLLL changed the title Zabbix Proxy (ZABBIX 7.0) Cannot create host with Zabbix Proxy (ZABBIX 7.0) Jun 10, 2024
@pyrodie18
Copy link
Collaborator

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.

@pyrodie18 pyrodie18 added module The issue or pull request is related to Zabbix module Zabbix 7.0 labels Jun 10, 2024
@BGmot
Copy link
Collaborator

BGmot commented Jun 10, 2024

That would be the error you get trying to use currently released (2.x) version with Zabbix 7.0.

@NEViLLLLL
Copy link
Author

NEViLLLLL commented Jun 11, 2024

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

image

@chladic
Copy link

chladic commented Jun 11, 2024

@pyrodie18 do you have any realistic estimate for version 3 release ? Not pushing, just curious what date I can schedule zabbix upgrade. Many thanks

@pyrodie18
Copy link
Collaborator

Honestly think we're nearly there. I would say by the end of the week at the latest. Can you watch #1242

@pyrodie18
Copy link
Collaborator

@chladic just dropped 3.0.0. Give it a try

@chladic
Copy link

chladic commented Jun 14, 2024

@pyrodie18 you are a man of your word, thanks

@pyrodie18
Copy link
Collaborator

Glad it worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module The issue or pull request is related to Zabbix module Zabbix 7.0
Projects
None yet
Development

No branches or pull requests

4 participants