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

API host.create() interface should not require a blank IP if DNS provided. #9

Open
matthewsht opened this issue Mar 6, 2024 · 0 comments

Comments

@matthewsht
Copy link

for the host.create() call, at least one interface is required.

At the moment, all of our interfaces are DNS base - but the IP address must still be passed along.
Example:

interface = [ { "type": 1, # 1 is 'agent', 2 is 'SNMP', 3 is 'IPMI', 4 is 'JMX' "main": 1, # 0 is 'not default', 1 is 'default' "useip": 0, # 0 is 'use DNS', 1 is 'use IP' "ip": "", # doc says can be blank but not _undefined_ if using DNS "dns": f"{host['name']}.{hg_config['dns_domain']}", "port": "10050", # default port for zabbix agent # BUG: this is wrong for other template types } ]

The documentation (IMHO) implies that this is true - at:
https://www.zabbix.com/documentation/6.4/en/manual/api/reference/hostinterface/object
We get

Can be empty if the connection is made via DNS.

But the API would make more sense if this field could be left blank.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant