Skip to content

Commit 24479d6

Browse files
committed
add support for ODBC pollers in Zabbix >= 6.0
1 parent 1aa215e commit 24479d6

File tree

9 files changed

+74
-0
lines changed

9 files changed

+74
-0
lines changed

REFERENCE.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ The following parameters are available in the `zabbix` class:
146146
* [`startpollers`](#-zabbix--startpollers)
147147
* [`startpreprocessors`](#-zabbix--startpreprocessors)
148148
* [`startipmipollers`](#-zabbix--startipmipollers)
149+
* [`startodbcpollers`](#-zabbix--startodbcpollers)
149150
* [`startpollersunreachable`](#-zabbix--startpollersunreachable)
150151
* [`starttrappers`](#-zabbix--starttrappers)
151152
* [`startpingers`](#-zabbix--startpingers)
@@ -740,6 +741,14 @@ Number of pre-forked instances of ipmi pollers.
740741

741742
Default value: `$zabbix::params::server_startipmipollers`
742743

744+
##### <a name="-zabbix--startodbcpollers"></a>`startodbcpollers`
745+
746+
Data type: `Integer[0, 1000]`
747+
748+
Number of pre-forked instances of ODBC pollers.
749+
750+
Default value: `$zabbix::params::server_startodbcpollers`
751+
743752
##### <a name="-zabbix--startpollersunreachable"></a>`startpollersunreachable`
744753

745754
Data type: `Any`
@@ -2548,6 +2557,7 @@ The following parameters are available in the `zabbix::proxy` class:
25482557
* [`startpollers`](#-zabbix--proxy--startpollers)
25492558
* [`startpreprocessors`](#-zabbix--proxy--startpreprocessors)
25502559
* [`startipmipollers`](#-zabbix--proxy--startipmipollers)
2560+
* [`startodbcpollers`](#-zabbix--proxy--startodbcpollers)
25512561
* [`startpollersunreachable`](#-zabbix--proxy--startpollersunreachable)
25522562
* [`starttrappers`](#-zabbix--proxy--starttrappers)
25532563
* [`startpingers`](#-zabbix--proxy--startpingers)
@@ -3034,6 +3044,14 @@ Number of pre-forked instances of ipmi pollers.
30343044

30353045
Default value: `$zabbix::params::proxy_startipmipollers`
30363046

3047+
##### <a name="-zabbix--proxy--startodbcpollers"></a>`startodbcpollers`
3048+
3049+
Data type: `Integer[0, 1000]`
3050+
3051+
Number of pre-forked instances of ODBC pollers.
3052+
3053+
Default value: `$zabbix::params::proxy_startodbcpollers`
3054+
30373055
##### <a name="-zabbix--proxy--startpollersunreachable"></a>`startpollersunreachable`
30383056

30393057
Data type: `Any`
@@ -3947,6 +3965,7 @@ The following parameters are available in the `zabbix::server` class:
39473965
* [`startpollers`](#-zabbix--server--startpollers)
39483966
* [`startpreprocessors`](#-zabbix--server--startpreprocessors)
39493967
* [`startipmipollers`](#-zabbix--server--startipmipollers)
3968+
* [`startodbcpollers`](#-zabbix--server--startodbcpollers)
39503969
* [`startpollersunreachable`](#-zabbix--server--startpollersunreachable)
39513970
* [`starttrappers`](#-zabbix--server--starttrappers)
39523971
* [`startpingers`](#-zabbix--server--startpingers)
@@ -4330,6 +4349,14 @@ Number of pre-forked instances of ipmi pollers.
43304349

43314350
Default value: `$zabbix::params::server_startipmipollers`
43324351

4352+
##### <a name="-zabbix--server--startodbcpollers"></a>`startodbcpollers`
4353+
4354+
Data type: `Integer[0, 1000]`
4355+
4356+
Number of pre-forked instances of ODBC pollers.
4357+
4358+
Default value: `$zabbix::params::server_startodbcpollers`
4359+
43334360
##### <a name="-zabbix--server--startpollersunreachable"></a>`startpollersunreachable`
43344361

43354362
Data type: `Any`

manifests/init.pp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@
105105
# @param startpollers Number of pre-forked instances of pollers.
106106
# @param startpreprocessors Number of pre-forked instances of preprocessing workers
107107
# @param startipmipollers Number of pre-forked instances of ipmi pollers.
108+
# @param startodbcpollers Number of pre-forked instances of ODBC pollers.
108109
# @param startpollersunreachable Number of pre-forked instances of pollers for unreachable hosts (including ipmi).
109110
# @param starttrappers Number of pre-forked instances of trappers.
110111
# @param startpingers Number of pre-forked instances of icmp pingers.
@@ -274,6 +275,7 @@
274275
Optional[Stdlib::Absolutepath] $database_tlscafile = $zabbix::params::server_database_tlscafile,
275276
$startpollers = $zabbix::params::server_startpollers,
276277
$startipmipollers = $zabbix::params::server_startipmipollers,
278+
Integer[0, 1000] $startodbcpollers = $zabbix::params::server_startodbcpollers,
277279
$startpollersunreachable = $zabbix::params::server_startpollersunreachable,
278280
Integer[1, 1000] $startpreprocessors = $zabbix::params::server_startpreprocessors,
279281
$starttrappers = $zabbix::params::server_starttrappers,

manifests/params.pp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,7 @@
253253
$server_startipmipollers = '0'
254254
$server_startjavapollers = '5'
255255
$server_startlldprocessors = 2
256+
$server_startodbcpollers = 1
256257
$server_startpingers = '1'
257258
$server_startpollers = '5'
258259
$server_startpollersunreachable = '1'
@@ -422,6 +423,7 @@
422423
$proxy_startipmipollers = '0'
423424
$proxy_startjavapollers = '5'
424425
$proxy_startpingers = '1'
426+
$proxy_startodbcpollers = 1
425427
$proxy_startpollers = '5'
426428
$proxy_startpollersunreachable = '1'
427429
$proxy_startpreprocessors = 3

manifests/proxy.pp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
# @param startpollers Number of pre-forked instances of pollers.
6464
# @param startpreprocessors Number of pre-forked instances of preprocessing workers
6565
# @param startipmipollers Number of pre-forked instances of ipmi pollers.
66+
# @param startodbcpollers Number of pre-forked instances of ODBC pollers.
6667
# @param startpollersunreachable Number of pre-forked instances of pollers for unreachable hosts (including ipmi).
6768
# @param starttrappers Number of pre-forked instances of trappers.
6869
# @param startpingers Number of pre-forked instances of icmp pingers.
@@ -237,6 +238,7 @@
237238
$datasenderfrequency = $zabbix::params::proxy_datasenderfrequency,
238239
$startpollers = $zabbix::params::proxy_startpollers,
239240
$startipmipollers = $zabbix::params::proxy_startipmipollers,
241+
Integer[0, 1000] $startodbcpollers = $zabbix::params::proxy_startodbcpollers,
240242
$startpollersunreachable = $zabbix::params::proxy_startpollersunreachable,
241243
Integer[1, 1000] $startpreprocessors = $zabbix::params::proxy_startpreprocessors,
242244
$starttrappers = $zabbix::params::proxy_starttrappers,

manifests/server.pp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
# @param startpollers Number of pre-forked instances of pollers.
5151
# @param startpreprocessors Number of pre-forked instances of preprocessing workers
5252
# @param startipmipollers Number of pre-forked instances of ipmi pollers.
53+
# @param startodbcpollers Number of pre-forked instances of ODBC pollers.
5354
# @param startpollersunreachable Number of pre-forked instances of pollers for unreachable hosts (including ipmi).
5455
# @param starttrappers Number of pre-forked instances of trappers.
5556
# @param startpingers Number of pre-forked instances of icmp pingers.
@@ -202,6 +203,7 @@
202203
Optional[String[1]] $database_tlscipher13 = $zabbix::params::server_database_tlscipher13,
203204
$startpollers = $zabbix::params::server_startpollers,
204205
$startipmipollers = $zabbix::params::server_startipmipollers,
206+
Integer[0, 1000] $startodbcpollers = $zabbix::params::server_startodbcpollers,
205207
$startpollersunreachable = $zabbix::params::server_startpollersunreachable,
206208
Integer[1, 1000] $startpreprocessors = $zabbix::params::server_startpreprocessors,
207209
$starttrappers = $zabbix::params::server_starttrappers,

spec/classes/proxy_spec.rb

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,11 +366,26 @@
366366
let :params do
367367
{
368368
socketdir: '/var/run/zabbix',
369+
startodbcpollers: 1,
369370
zabbix_version: '5.0'
370371
}
371372
end
372373

373374
it { is_expected.to contain_file('/etc/zabbix/zabbix_proxy.conf').with_content %r{^SocketDir=/var/run/zabbix} }
375+
it { is_expected.to contain_file('/etc/zabbix/zabbix_proxy.conf').without_content %r{^StartODBCPollers=1$} }
376+
end
377+
378+
context 'with zabbix_proxy.conf and version 6.0' do
379+
let :params do
380+
{
381+
socketdir: '/var/run/zabbix',
382+
startodbcpollers: 1,
383+
zabbix_version: '6.0'
384+
}
385+
end
386+
387+
it { is_expected.to contain_file('/etc/zabbix/zabbix_proxy.conf').with_content %r{^SocketDir=/var/run/zabbix} }
388+
it { is_expected.to contain_file('/etc/zabbix/zabbix_proxy.conf').with_content %r{^StartODBCPollers=1$} }
374389
end
375390

376391
context 'with zabbix_proxy.conf and logtype declared' do

spec/classes/server_spec.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,11 +367,13 @@
367367
let :params do
368368
{
369369
socketdir: '/var/run/zabbix',
370+
startodbcpollers: 1,
370371
zabbix_version: '5.0'
371372
}
372373
end
373374

374375
it { is_expected.to contain_file('/etc/zabbix/zabbix_server.conf').with_content %r{^SocketDir=/var/run/zabbix} }
376+
it { is_expected.to contain_file('/etc/zabbix/zabbix_server.conf').without_content %r{^StartODBCPollers=1} }
375377
end
376378

377379
context 'with zabbix_server.conf and logtype declared' do

templates/zabbix_proxy.conf.erb

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,17 @@ UnavailableDelay=<%= @unavaliabledelay %>
356356
#
357357
UnreachableDelay=<%= @unreachabedelay %>
358358

359+
<% if @zabbix_version.to_f >= 6.0 %>
360+
## Option: StartODBCPollers
361+
# Number of pre-forked ODBC poller instances.
362+
#
363+
# Mandatory: no
364+
# Range: 0-1000
365+
# Default:
366+
# StartODBCPollers=1
367+
StartODBCPollers=<%= @startodbcpollers %>
368+
<% end %>
369+
359370
### Option: ExternalScripts
360371
# Full path to location of external scripts.
361372
# Default depends on compilation options.

templates/zabbix_server.conf.erb

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,17 @@ StartIPMIPollers=<%= @startipmipollers %>
133133
#
134134
StartPollersUnreachable=<%= @startpollersunreachable %>
135135

136+
<% if @zabbix_version.to_f >= 6.0 %>
137+
## Option: StartODBCPollers
138+
# Number of pre-forked ODBC poller instances.
139+
#
140+
# Mandatory: no
141+
# Range: 0-1000
142+
# Default:
143+
# StartODBCPollers=1
144+
StartODBCPollers=<%= @startodbcpollers %>
145+
<% end %>
146+
136147
### Option: StartTrappers
137148
# Number of pre-forked instances of trappers.
138149
# Trappers accept incoming connections from Zabbix sender, active agents and active proxies.

0 commit comments

Comments
 (0)