diff --git a/REFERENCE.md b/REFERENCE.md index 539ffcfb3..22a1ed425 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -147,6 +147,7 @@ The following parameters are available in the `zabbix` class: * [`startpollers`](#-zabbix--startpollers) * [`startpreprocessors`](#-zabbix--startpreprocessors) * [`startipmipollers`](#-zabbix--startipmipollers) +* [`startodbcpollers`](#-zabbix--startodbcpollers) * [`startpollersunreachable`](#-zabbix--startpollersunreachable) * [`starttrappers`](#-zabbix--starttrappers) * [`startpingers`](#-zabbix--startpingers) @@ -741,6 +742,14 @@ Number of pre-forked instances of ipmi pollers. Default value: `$zabbix::params::server_startipmipollers` +##### `startodbcpollers` + +Data type: `Integer[0, 1000]` + +Number of pre-forked instances of ODBC pollers. + +Default value: `$zabbix::params::server_startodbcpollers` + ##### `startpollersunreachable` Data type: `Any` @@ -2540,6 +2549,7 @@ The following parameters are available in the `zabbix::proxy` class: * [`startpollers`](#-zabbix--proxy--startpollers) * [`startpreprocessors`](#-zabbix--proxy--startpreprocessors) * [`startipmipollers`](#-zabbix--proxy--startipmipollers) +* [`startodbcpollers`](#-zabbix--proxy--startodbcpollers) * [`startpollersunreachable`](#-zabbix--proxy--startpollersunreachable) * [`starttrappers`](#-zabbix--proxy--starttrappers) * [`startpingers`](#-zabbix--proxy--startpingers) @@ -3026,6 +3036,14 @@ Number of pre-forked instances of ipmi pollers. Default value: `$zabbix::params::proxy_startipmipollers` +##### `startodbcpollers` + +Data type: `Integer[0, 1000]` + +Number of pre-forked instances of ODBC pollers. + +Default value: `$zabbix::params::proxy_startodbcpollers` + ##### `startpollersunreachable` Data type: `Any` @@ -3930,6 +3948,7 @@ The following parameters are available in the `zabbix::server` class: * [`startpollers`](#-zabbix--server--startpollers) * [`startpreprocessors`](#-zabbix--server--startpreprocessors) * [`startipmipollers`](#-zabbix--server--startipmipollers) +* [`startodbcpollers`](#-zabbix--server--startodbcpollers) * [`startpollersunreachable`](#-zabbix--server--startpollersunreachable) * [`starttrappers`](#-zabbix--server--starttrappers) * [`startpingers`](#-zabbix--server--startpingers) @@ -4313,6 +4332,14 @@ Number of pre-forked instances of ipmi pollers. Default value: `$zabbix::params::server_startipmipollers` +##### `startodbcpollers` + +Data type: `Integer[0, 1000]` + +Number of pre-forked instances of ODBC pollers. + +Default value: `$zabbix::params::server_startodbcpollers` + ##### `startpollersunreachable` Data type: `Any` diff --git a/manifests/init.pp b/manifests/init.pp index 2cbd3a86e..830218ccd 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -105,6 +105,7 @@ # @param startpollers Number of pre-forked instances of pollers. # @param startpreprocessors Number of pre-forked instances of preprocessing workers # @param startipmipollers Number of pre-forked instances of ipmi pollers. +# @param startodbcpollers Number of pre-forked instances of ODBC pollers. # @param startpollersunreachable Number of pre-forked instances of pollers for unreachable hosts (including ipmi). # @param starttrappers Number of pre-forked instances of trappers. # @param startpingers Number of pre-forked instances of icmp pingers. @@ -274,6 +275,7 @@ Optional[Stdlib::Absolutepath] $database_tlscafile = $zabbix::params::server_database_tlscafile, $startpollers = $zabbix::params::server_startpollers, $startipmipollers = $zabbix::params::server_startipmipollers, + Integer[0, 1000] $startodbcpollers = $zabbix::params::server_startodbcpollers, $startpollersunreachable = $zabbix::params::server_startpollersunreachable, Integer[1, 1000] $startpreprocessors = $zabbix::params::server_startpreprocessors, $starttrappers = $zabbix::params::server_starttrappers, diff --git a/manifests/params.pp b/manifests/params.pp index 65bfa872c..5e7665a23 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -250,6 +250,7 @@ $server_startipmipollers = '0' $server_startjavapollers = '5' $server_startlldprocessors = 2 + $server_startodbcpollers = 1 $server_startpingers = '1' $server_startpollers = '5' $server_startpollersunreachable = '1' @@ -418,6 +419,7 @@ $proxy_startipmipollers = '0' $proxy_startjavapollers = '5' $proxy_startpingers = '1' + $proxy_startodbcpollers = 1 $proxy_startpollers = '5' $proxy_startpollersunreachable = '1' $proxy_startpreprocessors = 3 diff --git a/manifests/proxy.pp b/manifests/proxy.pp index d39fc71d8..68ddf6f38 100644 --- a/manifests/proxy.pp +++ b/manifests/proxy.pp @@ -63,6 +63,7 @@ # @param startpollers Number of pre-forked instances of pollers. # @param startpreprocessors Number of pre-forked instances of preprocessing workers # @param startipmipollers Number of pre-forked instances of ipmi pollers. +# @param startodbcpollers Number of pre-forked instances of ODBC pollers. # @param startpollersunreachable Number of pre-forked instances of pollers for unreachable hosts (including ipmi). # @param starttrappers Number of pre-forked instances of trappers. # @param startpingers Number of pre-forked instances of icmp pingers. @@ -237,6 +238,7 @@ $datasenderfrequency = $zabbix::params::proxy_datasenderfrequency, $startpollers = $zabbix::params::proxy_startpollers, $startipmipollers = $zabbix::params::proxy_startipmipollers, + Integer[0, 1000] $startodbcpollers = $zabbix::params::proxy_startodbcpollers, $startpollersunreachable = $zabbix::params::proxy_startpollersunreachable, Integer[1, 1000] $startpreprocessors = $zabbix::params::proxy_startpreprocessors, $starttrappers = $zabbix::params::proxy_starttrappers, diff --git a/manifests/server.pp b/manifests/server.pp index 0ea355153..7b53b1aa7 100644 --- a/manifests/server.pp +++ b/manifests/server.pp @@ -50,6 +50,7 @@ # @param startpollers Number of pre-forked instances of pollers. # @param startpreprocessors Number of pre-forked instances of preprocessing workers # @param startipmipollers Number of pre-forked instances of ipmi pollers. +# @param startodbcpollers Number of pre-forked instances of ODBC pollers. # @param startpollersunreachable Number of pre-forked instances of pollers for unreachable hosts (including ipmi). # @param starttrappers Number of pre-forked instances of trappers. # @param startpingers Number of pre-forked instances of icmp pingers. @@ -202,6 +203,7 @@ Optional[String[1]] $database_tlscipher13 = $zabbix::params::server_database_tlscipher13, $startpollers = $zabbix::params::server_startpollers, $startipmipollers = $zabbix::params::server_startipmipollers, + Integer[0, 1000] $startodbcpollers = $zabbix::params::server_startodbcpollers, $startpollersunreachable = $zabbix::params::server_startpollersunreachable, Integer[1, 1000] $startpreprocessors = $zabbix::params::server_startpreprocessors, $starttrappers = $zabbix::params::server_starttrappers, diff --git a/spec/classes/proxy_spec.rb b/spec/classes/proxy_spec.rb index e4aa0b27a..6b38bf58e 100644 --- a/spec/classes/proxy_spec.rb +++ b/spec/classes/proxy_spec.rb @@ -356,11 +356,26 @@ let :params do { socketdir: '/var/run/zabbix', + startodbcpollers: 1, zabbix_version: '5.0' } end it { is_expected.to contain_file('/etc/zabbix/zabbix_proxy.conf').with_content %r{^SocketDir=/var/run/zabbix} } + it { is_expected.to contain_file('/etc/zabbix/zabbix_proxy.conf').without_content %r{^StartODBCPollers=1$} } + end + + context 'with zabbix_proxy.conf and version 6.0' do + let :params do + { + socketdir: '/var/run/zabbix', + startodbcpollers: 1, + zabbix_version: '6.0' + } + end + + it { is_expected.to contain_file('/etc/zabbix/zabbix_proxy.conf').with_content %r{^SocketDir=/var/run/zabbix} } + it { is_expected.to contain_file('/etc/zabbix/zabbix_proxy.conf').with_content %r{^StartODBCPollers=1$} } end context 'with zabbix_proxy.conf and logtype declared' do diff --git a/spec/classes/server_spec.rb b/spec/classes/server_spec.rb index f3f5ebdaa..6de4ba196 100644 --- a/spec/classes/server_spec.rb +++ b/spec/classes/server_spec.rb @@ -363,11 +363,13 @@ let :params do { socketdir: '/var/run/zabbix', + startodbcpollers: 1, zabbix_version: '5.0' } end it { is_expected.to contain_file('/etc/zabbix/zabbix_server.conf').with_content %r{^SocketDir=/var/run/zabbix} } + it { is_expected.to contain_file('/etc/zabbix/zabbix_server.conf').without_content %r{^StartODBCPollers=1} } end context 'with zabbix_server.conf and logtype declared' do diff --git a/templates/zabbix_proxy.conf.erb b/templates/zabbix_proxy.conf.erb index 610d0aeed..49518a96d 100644 --- a/templates/zabbix_proxy.conf.erb +++ b/templates/zabbix_proxy.conf.erb @@ -354,6 +354,17 @@ UnavailableDelay=<%= @unavaliabledelay %> # UnreachableDelay=<%= @unreachabedelay %> +<% if @zabbix_version.to_f >= 6.0 %> +## Option: StartODBCPollers +# Number of pre-forked ODBC poller instances. +# +# Mandatory: no +# Range: 0-1000 +# Default: +# StartODBCPollers=1 +StartODBCPollers=<%= @startodbcpollers %> +<% end %> + ### Option: ExternalScripts # Full path to location of external scripts. # Default depends on compilation options. diff --git a/templates/zabbix_server.conf.erb b/templates/zabbix_server.conf.erb index e0f14d32c..5392ddcd5 100644 --- a/templates/zabbix_server.conf.erb +++ b/templates/zabbix_server.conf.erb @@ -133,6 +133,17 @@ StartIPMIPollers=<%= @startipmipollers %> # StartPollersUnreachable=<%= @startpollersunreachable %> +<% if @zabbix_version.to_f >= 6.0 %> +## Option: StartODBCPollers +# Number of pre-forked ODBC poller instances. +# +# Mandatory: no +# Range: 0-1000 +# Default: +# StartODBCPollers=1 +StartODBCPollers=<%= @startodbcpollers %> +<% end %> + ### Option: StartTrappers # Number of pre-forked instances of trappers. # Trappers accept incoming connections from Zabbix sender, active agents and active proxies.