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 228 forks source link

Proper configuration for reverse proxy setup #825

Open ikcalB opened 1 year ago

ikcalB commented 1 year ago

Running zabbix behind a reverse proxy / loadbalancer (LB) ist not currently possible:

The parameter zabbix_url is not only used as the frontend-URL, but also the server name. Behind an LB these 2 are different, i.e:

In such a setup zabbix would run without TLS on :80. The LB is taking care of the TLS handshake. zabbixapi will try to use the current zabbix_url to connect to the /api_jsonrpc.php path. When it hits a permanent redirect (301) it exits with an error.

Workaround

For the workaround to work, (Not a permanent solution:!)_:

Affected Puppet, Ruby, OS and module versions/distributions

presumably all, if not a regression

How to reproduce (e.g Puppet code you use)

see initial description. puppet snippet:

  class { 'zabbix':
    zabbix_version => '6.0',
    #default_vhost  => true,   # FIXME: parameter is not passed to zabbix::web!
    zabbix_url    => 'my-host.localdomain.com',

    manage_resources => true,
  }

What are you seeing

parameter zabbix{default_vhost} has no effect.

What behaviour did you expect instead

the parameter zabbix{default_vhost} should work as intended.