Add StartPreprocessors option
MODIFY
manifests/init.pp
manifests/init.pp
@@ -132,6 +132,7 @@ class zabbix (
$startpollers = $zabbix::params::server_startpollers,
$startipmipollers = $zabbix::params::server_startipmipollers,
$startpollersunreachable = $zabbix::params::server_startpollersunreachable,
+ Integer[1, 1000] $startpreprocessors = $zabbix::params::server_startpreprocessors,
$starttrappers = $zabbix::params::server_starttrappers,
$startpingers = $zabbix::params::server_startpingers,
Integer[1, 100] $startalerters = $zabbix::params::server_startalerters,
@@ -275,6 +276,7 @@ class zabbix (
startpollers => $startpollers,
startipmipollers => $startipmipollers,
startpollersunreachable => $startpollersunreachable,
+ startpreprocessors => $startpreprocessors,
starttrappers => $starttrappers,
startpingers => $startpingers,
startalerters => $startalerters,

MODIFY
manifests/params.pp
manifests/params.pp
@@ -266,6 +266,7 @@ class zabbix::params {
$server_startpingers = '1'
$server_startpollers = '5'
$server_startpollersunreachable = '1'
+ $server_startpreprocessors = 3
$server_startproxypollers = '1'
$server_startsnmptrapper = '0'
$server_starttimers = '1'
@@ -433,6 +434,7 @@ class zabbix::params {
$proxy_startpingers = '1'
$proxy_startpollers = '5'
$proxy_startpollersunreachable = '1'
+ $proxy_startpreprocessors = 3
$proxy_starttrappers = '5'
$proxy_startvmwarecollectors = '0'
$proxy_timeout = '3'

MODIFY
manifests/proxy.pp
manifests/proxy.pp
# [*startpollers*]
# Number of pre-forked instances of pollers.
#
+# [*startpreprocessors*]
+# Number of pre-forked instances of preprocessing workers
+#
# [*startipmipollers*]
# Number of pre-forked instances of ipmi pollers.
#
@@ -401,6 +404,7 @@ class zabbix::proxy (
$startpollers = $zabbix::params::proxy_startpollers,
$startipmipollers = $zabbix::params::proxy_startipmipollers,
$startpollersunreachable = $zabbix::params::proxy_startpollersunreachable,
+ Integer[1, 1000] $startpreprocessors = $zabbix::params::proxy_startpreprocessors,
$starttrappers = $zabbix::params::proxy_starttrappers,
$startpingers = $zabbix::params::proxy_startpingers,
$startdiscoverers = $zabbix::params::proxy_startdiscoverers,

MODIFY
manifests/server.pp
manifests/server.pp
# [*startpollers*]
# Number of pre-forked instances of pollers.
#
+# [*startpreprocessors*]
+# Number of pre-forked instances of preprocessing workers
+#
# [*startipmipollers*]
# Number of pre-forked instances of ipmi pollers.
#
@@ -377,6 +380,7 @@ class zabbix::server (
$startpollers = $zabbix::params::server_startpollers,
$startipmipollers = $zabbix::params::server_startipmipollers,
$startpollersunreachable = $zabbix::params::server_startpollersunreachable,
+ Integer[1, 1000] $startpreprocessors = $zabbix::params::server_startpreprocessors,
$starttrappers = $zabbix::params::server_starttrappers,
$startpingers = $zabbix::params::server_startpingers,
Integer[1, 100] $startalerters = $zabbix::params::server_startalerters,

MODIFY
spec/classes/proxy_spec.rb
spec/classes/proxy_spec.rb
@@ -263,6 +263,7 @@ describe 'zabbix::proxy' do
startpingers: '15',
startpollers: '15',
startpollersunreachable: '15',
+ startpreprocessors: 10,
starttrappers: '15',
startvmwarecollectors: '0',
timeout: '20',
@@ -313,6 +314,7 @@ describe 'zabbix::proxy' do
it { is_expected.to contain_file('/etc/zabbix/zabbix_proxy.conf').with_content %r{^DataSenderFrequency=1$} }
it { is_expected.to contain_file('/etc/zabbix/zabbix_proxy.conf').with_content %r{^StartPollers=15$} }
it { is_expected.to contain_file('/etc/zabbix/zabbix_proxy.conf').with_content %r{^StartIPMIPollers=15$} }
+ it { is_expected.to contain_file('/etc/zabbix/zabbix_proxy.conf').with_content %r{^StartPreprocessors=10$} }
it { is_expected.to contain_file('/etc/zabbix/zabbix_proxy.conf').with_content %r{^StartPollersUnreachable=15$} }
it { is_expected.to contain_file('/etc/zabbix/zabbix_proxy.conf').with_content %r{^StartTrappers=15$} }
it { is_expected.to contain_file('/etc/zabbix/zabbix_proxy.conf').with_content %r{^StartPingers=15$} }

MODIFY
spec/classes/server_spec.rb
spec/classes/server_spec.rb
@@ -247,6 +247,7 @@ describe 'zabbix::server' do
startpingers: '1',
startpollers: '12',
startpollersunreachable: '1',
+ startpreprocessors: 10,
startproxypollers: '1',
startsnmptrapper: '1',
starttimers: '1',
@@ -324,6 +325,7 @@ describe 'zabbix::server' do
it { is_expected.to contain_file('/etc/zabbix/zabbix_server.conf').with_content %r{^StartPingers=1} }
it { is_expected.to contain_file('/etc/zabbix/zabbix_server.conf').with_content %r{^StartPollers=12} }
it { is_expected.to contain_file('/etc/zabbix/zabbix_server.conf').with_content %r{^StartPollersUnreachable=1} }
+ it { is_expected.to contain_file('/etc/zabbix/zabbix_server.conf').with_content %r{^StartPreprocessors=10} }
it { is_expected.to contain_file('/etc/zabbix/zabbix_server.conf').with_content %r{^StartProxyPollers=1} }
it { is_expected.to contain_file('/etc/zabbix/zabbix_server.conf').with_content %r{^StartSNMPTrapper=1} }
it { is_expected.to contain_file('/etc/zabbix/zabbix_server.conf').with_content %r{^StartTimers=1} }

MODIFY
templates/zabbix_proxy.conf.erb
templates/zabbix_proxy.conf.erb
@@ -203,6 +203,16 @@ StartIPMIPollers=<%= @startipmipollers %>
#
StartPollersUnreachable=<%= @startpollersunreachable %>
+### Option: StartPreprocessors
+# Number of pre-forked instances of preprocessing workers.
+# The preprocessing manager process is automatically started when preprocessor worker is started.
+#
+# Mandatory: no
+# Range: 1-1000
+# Default:
+# StartPreprocessors=3
+<% if @startpreprocessors %>StartPreprocessors=<%= @startpreprocessors -%><% end %>
+
### Option: StartTrappers
# Number of pre-forked instances of trappers.
# Trappers accept incoming connections from Zabbix sender and active agents.

MODIFY
templates/zabbix_server.conf.erb
templates/zabbix_server.conf.erb
@@ -116,6 +116,16 @@ StartPollers=<%= @startpollers %>
#
StartIPMIPollers=<%= @startipmipollers %>
+### Option: StartPreprocessors
+# Number of pre-forked instances of preprocessing workers.
+# The preprocessing manager process is automatically started when preprocessor worker is started.
+#
+# Mandatory: no
+# Range: 1-1000
+# Default:
+# StartPreprocessors=3
+<% if @startpreprocessors %>StartPreprocessors=<%= @startpreprocessors -%><% end %>
+
### Option: StartPollersUnreachable
# Number of pre-forked instances of pollers for unreachable hosts (including IPMI and Java).
# At least one poller for unreachable hosts must be running if regular, IPMI or Java pollers

Add StartPreprocessors option

Signed-off-by: Christos Papageorgiou <root.expert.xda@gmail.com>