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

zabbix_host fails when try to create with SNMP interface and zabbix 5 #70383

Closed
evgenyidf opened this issue Jun 30, 2020 · 1 comment
Closed

Comments

@evgenyidf
Copy link

SUMMARY

Zabbix 5 API has changed their API and now when you add SNMP interfaces, SNMP details should be provided too:

        "interfaces": [
            {
                "type": 2,
                "main": 1,
                "useip": 1,
                "ip": "10.200.200.6",
                "dns": "",
                "port": "161",
                "details": {
                    "version": 2,
                    "community": "public"
                }
            }
        ],

Please update ansible/modules/monitoring/zabbix/zabbix_host.py

For reference:
https://www.zabbix.com/forum/zabbix-help/401836-version-5-0-api-host-create
https://docs.ansible.com/ansible/latest/modules/zabbix_host_module.html
https://www.zabbix.com/documentation/current/manual/api/reference/hostinterface/create

ISSUE TYPE
  • Bug Report
COMPONENT NAME

zabbix_host monitoring module

ANSIBLE VERSION
2.9.9
CONFIGURATION

OS / ENVIRONMENT

Mac OS
Python 3.6

STEPS TO REPRODUCE
EXPECTED RESULTS

Host created/updated

ACTUAL RESULTS

Host not updated, ansible fails with error:

    "msg": "Failed to create host XXXX.host: (u'Error -32602: Invalid params., Incorrect arguments passed to function. while sending 
    { "params": {"status": 0, "proxy_hostid": 10328, "name": "XXXX.host", "interfaces": [{"ip": "", "useip": 0, "dns": "XXXX.host", "main": 1, "type": 2, "port": "161"}], "tls_connect": 1, "tls_accept": 1, "host": "XXXX.host", "groups": [{"groupid": "21"}]}, "jsonrpc": "2.0", "method": "host.create", "auth": "xxxxx", "id": 1}', -32602)"
}
@Shrews
Copy link
Contributor

Shrews commented Jun 30, 2020

Thank you very much for your interest in Ansible. This plugin is no longer maintained in this repository and has been migrated to https://github.com/ansible-collections/community.zabbix

Please re-submit this issue in the above repository.

If you have further questions please stop by IRC or the mailing list:

IRC: #ansible on irc.freenode.net
mailing list: https://groups.google.com/forum/#!forum/ansible-project

@Shrews Shrews closed this as completed Jun 30, 2020
@ansible ansible locked and limited conversation to collaborators Jul 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants