voxpupuli / puppet-zabbix

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

Add and remove Zabbix 6.0 + 6.4 options (HA mode, StatsAllowedIP, ProxyConfigFrequency, HeartbeatFrequency) #921

Closed geirra closed 4 months ago

geirra commented 4 months ago

Pull Request (PR) description

This PR adds some new 6.0 + 6.4 functions and removes config values that have been Deprecated.

  1. Add missing parameter StatsAllowedIP for Zabbix Server + Proxys This is a rebase of an earlier attempt #869
    The parameter has been supported since version 4.2
  2. HA Mode for Zabbix: This adds HANodeName + NodeAddress to Zabbix server.
  3. Since Zabbix 6.0 and the support for HA setup of Zabbix, the webconfig does not require $ZBX_SERVER_PORT and $ZBX_SERVER. In cases where HA is used these values have to be removed. Offical Zabbix deployments from 6.0 has these values disabled by default, the connection details is now pulled by DB.
  4. As of Zabbix 6.4 ConfigFrequency has been Deprecated and has been replaced with ProxyConfigFrequency, so the same value is now used in Server and Proxy.
    
    ### Option: ConfigFrequency - Deprecated, use ProxyConfigFrequency
    #   How often proxy retrieves configuration data from Zabbix Server in seconds.
    #   For a proxy in the passive mode this parameter will be ignored.
    # Mandatory: no

This is not to be confused with the existing server parameter ProxyConfigFrequency:

**From Zabbix wiki**

Note that ProxyConfigFrequency is:

the server parameter for passive proxies; the proxy parameter for active proxies.

5. HeartbeatFrequency has been removed from 6.4 and up 

The heartbeat sender has been removed from the proxy. Therefore, Zabbix proxy item zabbix [process,heartbeat sender] is no longer supported and has been removed from templates. The HeartbeatFrequency parameter has been deprecated.



#### This Pull Request (PR) fixes the following issues
geirra commented 4 months ago

Seem like this one should be fine now.

The failed tests are due to broken postgresql gpg keys, needs to fixed upstream.

Public key for postgresql13-13.14-1PGDG.rhel7.x86_64.rpm is not installed Importing GPG key 0x442DF0F8: Userid : "PostgreSQL RPM Building Project <pgsqlrpms-hackers@pgfoundry.org>" Fingerprint: 68c9 e2b9 1a37 d136 fe74 d176 1f16 d2e1 442d f0f8 From : /etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG-13

Probably related to https://yum.postgresql.org/news/pgdg-rpm-repo-gpg-key-update/

Should be fixed here: https://github.com/puppetlabs/puppetlabs-postgresql/pull/1566

But this module locks it to 10.0.0 metadata.json: "version_requirement": ">= 6.4.0 < 10.0.0"

root-expert commented 4 months ago

@geirra Hey! Thanks for the PR. Would mind rebasing with our master branch? It should fix the acceptance tests, postgresql module was bumped at 327a043484856edcae2451f4c977246dfec4570f

geirra commented 4 months ago

So this sould be rebased and the empty line is removed, i have not fixed the issue about ProxyConfigFrequency, see the comment about that one.

Mind taking a look @root-expert ?