-
Notifications
You must be signed in to change notification settings - Fork 295
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
host.create with SNMP interface not working with Zabbix 5.0 #46
Comments
This is the structure needed for creating a host with snmp interface in Zabbix 5.0:
|
Hey guys, thanks for reporting this issue. I will try to look at it asap. For more info about zabbix 5 support see my latest comment in #45 |
Interestingly since the interfaces are just passed as is we can workaround this bug by adding zabbix_host:
server_url: '{{ monitoring_server }}'
login_user: '{{ monitoring_user }}'
login_password: '{{ monitoring_password }}'
host_name: '{{ ilo_ip }}'
visible_name: '{{ dns_fqdn }}'
host_groups: '{{ monitoring_groups | default(["iLO"]) }}'
link_templates: '{{ monitoring_templates | default(["Template Server HP iLO SNMPv2"]) }}'
interfaces:
- type: 2
main: 1
useip: 1
ip: '{{ ilo_ip }}'
dns: ""
details:
version: 2
community: "{$SNMP_COMMUNITY}"
status: '{{ monitoring_status | default("enabled") }}'
state: '{{ monitoring_state | default("present") }}'
validate_certs: no |
Can confirm that this is valid. Additional information in the interfaces dictionary will just miss any error checking and documentation which will come eventually. |
Adding new hosts with zabbix_host works fine with this environment. So there seems to be something amiss with the check if the host should be changed. |
SUMMARY
Zabbix 5.0 introduced a change in the host interface handling. The new documentation mentions a new
details
parameter which is used only for SNMP interfaces.In order to create a new host with a SNMP interface this new property has to be set. Unfortunately the documentation seems to be not clear about which fields are mandatory and which are optional. There is ZBX-17719 handling this topic.
ISSUE TYPE
COMPONENT NAME
zabbix_host
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
STEPS TO REPRODUCE
I am trying to create zabbix hosts for our HPE iLOs. They are being monitored via SNMP.
For this procedure I am using the following task in an ansible playbook.
EXPECTED RESULTS
The playbook should create the host. That has worked on Zabbix 4.4, while it is not working on Zabbix 5.0.
ACTUAL RESULTS
I get an error stating "Error -32602: Invalid params., Incorrect arguments passed to function."
The text was updated successfully, but these errors were encountered: