voxpupuli / puppet-zabbix

Puppet module for creating and maintaining zabbix components with puppet.
https://forge.puppet.com/puppet/zabbix
Apache License 2.0
80 stars 228 forks source link

Add Zabbix 6.0 support #820

Closed root-expert closed 2 years ago

root-expert commented 2 years ago

Pull Request (PR) description

Adds support for Zabbix 6.0 LTS release.

Things that may need to be added to this PR before merging:

This Pull Request (PR) fixes the following issues

Closes #814

SK4ndal commented 2 years ago

Hey guys, Is there any chance of the Zabbix 6 support being merged soon? :-) What is the problem with the arch job? I took a quick look but I can't see an obvious reason.

aclarkee commented 2 years ago

@root-expert Bit confused with your statement here.

Zabbix 6.0 removed the ability to be able to attach Templates directly to host via the API. This automatically renders the zabbix_template_host unsable on Zabbix 6.0 The only way to attach Templates is via attaching them to Host Groups, so possibly a new provider is needed

From my testing, this appears to be incorrect. I'm successfully assigning templates to hosts on zabbix 6.0 through the zabbixapi gem, through this modules exported resources. Using zabbix::agent::zbx_templates

And according to the zabbix 6.0 documentation, assigning templates to host_groups doesn't even link them to a host.

root-expert commented 2 years ago

Hello @aclarkee,

zabbix::agent::zbx_templates uses a different provider, namely zabbix_host, which means when you create a host you assign templates on it.

On my comment I'm talking about the provider zabbix_template_host. In versions before 6.0 you were able to create templates using the API and directly link them to hosts, that was removed in API version 6.0. (see https://www.zabbix.com/documentation/6.0/en/manual/api/changes_5.4_-_6.0, section template 2nd change and on 6.0 hosts parameter is gone compared to 5.4)