From ad0ace791e9fa0aafa7e7d496e9ec6bbf96f1190 Mon Sep 17 00:00:00 2001 From: Trent Anderson Date: Thu, 24 Oct 2024 21:01:15 +1100 Subject: [PATCH] Enable 4 new 7+ server parameters --- REFERENCE.md | 72 ++++++++++++ manifests/init.pp | 192 ++++++++++++++++--------------- manifests/params.pp | 4 + manifests/server.pp | 8 ++ templates/zabbix_server.conf.erb | 8 +- 5 files changed, 190 insertions(+), 94 deletions(-) diff --git a/REFERENCE.md b/REFERENCE.md index 92e260d75..d2a483ce1 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -145,6 +145,10 @@ The following parameters are available in the `zabbix` class: * [`database_tlsconnect`](#-zabbix--database_tlsconnect) * [`database_tlscafile`](#-zabbix--database_tlscafile) * [`startpollers`](#-zabbix--startpollers) +* [`startagentpollers`](#-zabbix--startagentpollers) +* [`starthttpagentpollers`](#-zabbix--starthttpagentpollers) +* [`startsnmppollers`](#-zabbix--startsnmppollers) +* [`maxconcurrentchecksperpoller`](#-zabbix--maxconcurrentchecksperpoller) * [`startpreprocessors`](#-zabbix--startpreprocessors) * [`startipmipollers`](#-zabbix--startipmipollers) * [`startodbcpollers`](#-zabbix--startodbcpollers) @@ -726,6 +730,38 @@ Number of pre-forked instances of pollers. Default value: `$zabbix::params::server_startpollers` +##### `startagentpollers` + +Data type: `Integer[1, 100]` + +Number of pre-forked instances of asynchronous Zabbix agent pollers. Also see MaxConcurrentChecksPerPoller. + +Default value: `$zabbix::params::server_startagentpollers` + +##### `starthttpagentpollers` + +Data type: `Integer[1, 100]` + +Number of pre-forked instances of asynchronous HTTP agent pollers. Also see MaxConcurrentChecksPerPoller. + +Default value: `$zabbix::params::server_starthttpagentpollers` + +##### `startsnmppollers` + +Data type: `Integer[1, 100]` + +Number of pre-forked instances of asynchronous SNMP pollers. Also see MaxConcurrentChecksPerPoller. + +Default value: `$zabbix::params::server_startsnmppollers` + +##### `maxconcurrentchecksperpoller` + +Data type: `Integer[1, 1000]` + +Maximum number of asynchronous checks that can be executed at once by each HTTP agent poller or agent poller. + +Default value: `$zabbix::params::server_maxconcurrentchecksperpoller` + ##### `startpreprocessors` Data type: `Integer[1, 1000]` @@ -3977,6 +4013,10 @@ The following parameters are available in the `zabbix::server` class: * [`database_tlscipher`](#-zabbix--server--database_tlscipher) * [`database_tlscipher13`](#-zabbix--server--database_tlscipher13) * [`startpollers`](#-zabbix--server--startpollers) +* [`startagentpollers`](#-zabbix--server--startagentpollers) +* [`starthttpagentpollers`](#-zabbix--server--starthttpagentpollers) +* [`startsnmppollers`](#-zabbix--server--startsnmppollers) +* [`maxconcurrentchecksperpoller`](#-zabbix--server--maxconcurrentchecksperpoller) * [`startpreprocessors`](#-zabbix--server--startpreprocessors) * [`startipmipollers`](#-zabbix--server--startipmipollers) * [`startodbcpollers`](#-zabbix--server--startodbcpollers) @@ -4350,6 +4390,38 @@ Number of pre-forked instances of pollers. Default value: `$zabbix::params::server_startpollers` +##### `startagentpollers` + +Data type: `Integer[1, 100]` + +Number of pre-forked instances of asynchronous Zabbix agent pollers. Also see MaxConcurrentChecksPerPoller. + +Default value: `$zabbix::params::server_startagentpollers` + +##### `starthttpagentpollers` + +Data type: `Integer[1, 100]` + +Number of pre-forked instances of asynchronous HTTP agent pollers. Also see MaxConcurrentChecksPerPoller. + +Default value: `$zabbix::params::server_starthttpagentpollers` + +##### `startsnmppollers` + +Data type: `Integer[1, 100]` + +Number of pre-forked instances of asynchronous SNMP pollers. Also see MaxConcurrentChecksPerPoller. + +Default value: `$zabbix::params::server_startsnmppollers` + +##### `maxconcurrentchecksperpoller` + +Data type: `Integer[1, 1000]` + +Maximum number of asynchronous checks that can be executed at once by each HTTP agent poller or agent poller. + +Default value: `$zabbix::params::server_maxconcurrentchecksperpoller` + ##### `startpreprocessors` Data type: `Integer[1, 1000]` diff --git a/manifests/init.pp b/manifests/init.pp index 830218ccd..17ed72894 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -103,6 +103,10 @@ # * verify_full - connect using TLS, verify certificate and verify that database identity specified by DBHost matches its certificate # @param database_tlscafile Full pathname of a file containing the top-level CA(s) certificates for database certificate verification. # @param startpollers Number of pre-forked instances of pollers. +# @param startagentpollers Number of pre-forked instances of asynchronous Zabbix agent pollers. Also see MaxConcurrentChecksPerPoller. +# @param starthttpagentpollers Number of pre-forked instances of asynchronous HTTP agent pollers. Also see MaxConcurrentChecksPerPoller. +# @param startsnmppollers Number of pre-forked instances of asynchronous SNMP pollers. Also see MaxConcurrentChecksPerPoller. +# @param maxconcurrentchecksperpoller Maximum number of asynchronous checks that can be executed at once by each HTTP agent poller or agent poller. # @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. @@ -274,6 +278,10 @@ Optional[Enum['required', 'verify_ca', 'verify_full']] $database_tlsconnect = $zabbix::params::server_database_tlsconnect, Optional[Stdlib::Absolutepath] $database_tlscafile = $zabbix::params::server_database_tlscafile, $startpollers = $zabbix::params::server_startpollers, + Integer[1, 100] $startagentpollers = $zabbix::params::server_startagentpollers, + Integer[1, 100] $starthttpagentpollers = $zabbix::params::server_starthttpagentpollers, + Integer[1, 100] $startsnmppollers = $zabbix::params::server_startsnmppollers, + Integer[1, 1000] $maxconcurrentchecksperpoller = $zabbix::params::server_maxconcurrentchecksperpoller, $startipmipollers = $zabbix::params::server_startipmipollers, Integer[0, 1000] $startodbcpollers = $zabbix::params::server_startodbcpollers, $startpollersunreachable = $zabbix::params::server_startpollersunreachable, @@ -399,96 +407,100 @@ } class { 'zabbix::server': - database_type => $database_type, - database_path => $database_path, - zabbix_version => $zabbix_version, - zabbix_package_state => $zabbix_package_state, - manage_firewall => $manage_firewall, - manage_repo => $manage_repo, - manage_database => $manage_database, - manage_service => $manage_service, - listenport => $listenport, - sourceip => $sourceip, - logfile => $logfile, - logfilesize => $logfilesize, - logtype => $logtype, - debuglevel => $debuglevel, - pidfile => $pidfile, - database_host => $database_host, - database_name => $database_name, - database_schema => $database_schema, - database_user => $database_user, - database_password => $database_password, - database_socket => $database_socket, - database_port => $database_port, - database_tlsconnect => $database_tlsconnect, - database_tlscafile => $database_tlscafile, - startpollers => $startpollers, - startipmipollers => $startipmipollers, - startpollersunreachable => $startpollersunreachable, - startpreprocessors => $startpreprocessors, - starttrappers => $starttrappers, - startpingers => $startpingers, - startalerters => $startalerters, - startdiscoverers => $startdiscoverers, - startescalators => $startescalators, - starthttppollers => $starthttppollers, - starttimers => $starttimers, - javagateway => $javagateway, - javagatewayport => $javagatewayport, - startjavapollers => $startjavapollers, - startlldprocessors => $startlldprocessors, - startvmwarecollectors => $startvmwarecollectors, - vaultdbpath => $vaultdbpath, - vaulttoken => $vaulttoken, - vaulturl => $vaulturl, - vmwarefrequency => $vmwarefrequency, - vmwarecachesize => $vmwarecachesize, - vmwaretimeout => $vmwaretimeout, - snmptrapperfile => $snmptrapperfile, - startsnmptrapper => $startsnmptrapper, - listenip => $listenip, - housekeepingfrequency => $housekeepingfrequency, - maxhousekeeperdelete => $maxhousekeeperdelete, - cachesize => $cachesize, - cacheupdatefrequency => $cacheupdatefrequency, - startdbsyncers => $startdbsyncers, - historycachesize => $historycachesize, - trendcachesize => $trendcachesize, - historyindexcachesize => $historyindexcachesize, - valuecachesize => $valuecachesize, - timeout => $timeout, - tlscafile => $tlscafile, - tlscertfile => $tlscertfile, - tlscrlfile => $tlscrlfile, - tlskeyfile => $tlskeyfile, - tlscipherall => $tlscipherall, - tlscipherall13 => $tlscipherall13, - tlsciphercert => $tlsciphercert, - tlsciphercert13 => $tlsciphercert13, - tlscipherpsk => $tlscipherpsk, - tlscipherpsk13 => $tlscipherpsk13, - trappertimeout => $trappertimeout, - unreachableperiod => $unreachableperiod, - unavailabledelay => $unavailabledelay, - unreachabledelay => $unreachabledelay, - alertscriptspath => $alertscriptspath, - externalscripts => $externalscripts, - fpinglocation => $fpinglocation, - fping6location => $fping6location, - sshkeylocation => $sshkeylocation, - logslowqueries => $logslowqueries, - tmpdir => $tmpdir, - startproxypollers => $startproxypollers, - proxyconfigfrequency => $proxyconfigfrequency, - proxydatafrequency => $proxydatafrequency, - allowroot => $allowroot, - include_dir => $include_dir, - loadmodulepath => $loadmodulepath, - loadmodule => $loadmodule, - manage_selinux => $manage_selinux, - additional_service_params => $additional_service_params, - require => Class['zabbix::database'], + database_type => $database_type, + database_path => $database_path, + zabbix_version => $zabbix_version, + zabbix_package_state => $zabbix_package_state, + manage_firewall => $manage_firewall, + manage_repo => $manage_repo, + manage_database => $manage_database, + manage_service => $manage_service, + listenport => $listenport, + sourceip => $sourceip, + logfile => $logfile, + logfilesize => $logfilesize, + logtype => $logtype, + debuglevel => $debuglevel, + pidfile => $pidfile, + database_host => $database_host, + database_name => $database_name, + database_schema => $database_schema, + database_user => $database_user, + database_password => $database_password, + database_socket => $database_socket, + database_port => $database_port, + database_tlsconnect => $database_tlsconnect, + database_tlscafile => $database_tlscafile, + startpollers => $startpollers, + startagentpollers => $startagentpollers, + starthttpagentpollers => $starthttpagentpollers, + startsnmppollers => $startsnmppollers, + maxconcurrentchecksperpoller => $maxconcurrentchecksperpoller, + startipmipollers => $startipmipollers, + startpollersunreachable => $startpollersunreachable, + startpreprocessors => $startpreprocessors, + starttrappers => $starttrappers, + startpingers => $startpingers, + startalerters => $startalerters, + startdiscoverers => $startdiscoverers, + startescalators => $startescalators, + starthttppollers => $starthttppollers, + starttimers => $starttimers, + javagateway => $javagateway, + javagatewayport => $javagatewayport, + startjavapollers => $startjavapollers, + startlldprocessors => $startlldprocessors, + startvmwarecollectors => $startvmwarecollectors, + vaultdbpath => $vaultdbpath, + vaulttoken => $vaulttoken, + vaulturl => $vaulturl, + vmwarefrequency => $vmwarefrequency, + vmwarecachesize => $vmwarecachesize, + vmwaretimeout => $vmwaretimeout, + snmptrapperfile => $snmptrapperfile, + startsnmptrapper => $startsnmptrapper, + listenip => $listenip, + housekeepingfrequency => $housekeepingfrequency, + maxhousekeeperdelete => $maxhousekeeperdelete, + cachesize => $cachesize, + cacheupdatefrequency => $cacheupdatefrequency, + startdbsyncers => $startdbsyncers, + historycachesize => $historycachesize, + trendcachesize => $trendcachesize, + historyindexcachesize => $historyindexcachesize, + valuecachesize => $valuecachesize, + timeout => $timeout, + tlscafile => $tlscafile, + tlscertfile => $tlscertfile, + tlscrlfile => $tlscrlfile, + tlskeyfile => $tlskeyfile, + tlscipherall => $tlscipherall, + tlscipherall13 => $tlscipherall13, + tlsciphercert => $tlsciphercert, + tlsciphercert13 => $tlsciphercert13, + tlscipherpsk => $tlscipherpsk, + tlscipherpsk13 => $tlscipherpsk13, + trappertimeout => $trappertimeout, + unreachableperiod => $unreachableperiod, + unavailabledelay => $unavailabledelay, + unreachabledelay => $unreachabledelay, + alertscriptspath => $alertscriptspath, + externalscripts => $externalscripts, + fpinglocation => $fpinglocation, + fping6location => $fping6location, + sshkeylocation => $sshkeylocation, + logslowqueries => $logslowqueries, + tmpdir => $tmpdir, + startproxypollers => $startproxypollers, + proxyconfigfrequency => $proxyconfigfrequency, + proxydatafrequency => $proxydatafrequency, + allowroot => $allowroot, + include_dir => $include_dir, + loadmodulepath => $loadmodulepath, + loadmodule => $loadmodule, + manage_selinux => $manage_selinux, + additional_service_params => $additional_service_params, + require => Class['zabbix::database'], } class { 'zabbix::database': diff --git a/manifests/params.pp b/manifests/params.pp index 9e6718570..f5b84285d 100755 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -252,6 +252,10 @@ $server_startodbcpollers = 1 $server_startpingers = '1' $server_startpollers = '5' + $server_startagentpollers = 1 + $server_starthttpagentpollers = 1 + $server_startsnmppollers = 1 + $server_maxconcurrentchecksperpoller = 1000 $server_startpollersunreachable = '1' $server_startpreprocessors = 3 $server_startproxypollers = '1' diff --git a/manifests/server.pp b/manifests/server.pp index 1aea87800..92976d13e 100755 --- a/manifests/server.pp +++ b/manifests/server.pp @@ -48,6 +48,10 @@ # @param database_tlscipher The list of encryption ciphers that Zabbix server permits for TLS protocols up through TLSv1.2. # @param database_tlscipher13 The list of encryption ciphersuites that Zabbix server permits for TLSv1.3 protocol. # @param startpollers Number of pre-forked instances of pollers. +# @param startagentpollers Number of pre-forked instances of asynchronous Zabbix agent pollers. Also see MaxConcurrentChecksPerPoller. +# @param starthttpagentpollers Number of pre-forked instances of asynchronous HTTP agent pollers. Also see MaxConcurrentChecksPerPoller. +# @param startsnmppollers Number of pre-forked instances of asynchronous SNMP pollers. Also see MaxConcurrentChecksPerPoller. +# @param maxconcurrentchecksperpoller Maximum number of asynchronous checks that can be executed at once by each HTTP agent poller or agent poller. # @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. @@ -205,6 +209,10 @@ Optional[String[1]] $database_tlscipher = $zabbix::params::server_database_tlscipher, Optional[String[1]] $database_tlscipher13 = $zabbix::params::server_database_tlscipher13, $startpollers = $zabbix::params::server_startpollers, + Integer[1, 100] $startagentpollers = $zabbix::params::server_startagentpollers, + Integer[1, 100] $starthttpagentpollers = $zabbix::params::server_starthttpagentpollers, + Integer[1, 100] $startsnmppollers = $zabbix::params::server_startsnmppollers, + Integer[1, 1000] $maxconcurrentchecksperpoller = $zabbix::params::server_maxconcurrentchecksperpoller, $startipmipollers = $zabbix::params::server_startipmipollers, Integer[0, 1000] $startodbcpollers = $zabbix::params::server_startodbcpollers, $startpollersunreachable = $zabbix::params::server_startpollersunreachable, diff --git a/templates/zabbix_server.conf.erb b/templates/zabbix_server.conf.erb index 9aaba7fd3..20954dd13 100755 --- a/templates/zabbix_server.conf.erb +++ b/templates/zabbix_server.conf.erb @@ -190,7 +190,7 @@ StartPollers=<%= @startpollers %> # Mandatory: no # Range: 0-1000 # Default: -# StartAgentPollers=1 +StartAgentPollers=<%= @startagentpollers %> ### Option: StartHTTPAgentPollers # Number of pre-forked instances of asynchronous HTTP agent pollers. Also see MaxConcurrentChecksPerPoller. @@ -198,7 +198,7 @@ StartPollers=<%= @startpollers %> # Mandatory: no # Range: 0-1000 # Default: -# StartHTTPAgentPollers=1 +StartHTTPAgentPollers=<%= @starthttpagentpollers %> ### Option: StartSNMPPollers # Number of pre-forked instances of asynchronous SNMP pollers. Also see MaxConcurrentChecksPerPoller. @@ -206,7 +206,7 @@ StartPollers=<%= @startpollers %> # Mandatory: no # Range: 0-1000 # Default: -# StartSNMPPollers=1 +StartSNMPPollers=<%= @startsnmppollers %> ### Option: MaxConcurrentChecksPerPoller # Maximum number of asynchronous checks that can be executed at once by each HTTP agent poller or agent poller. @@ -214,7 +214,7 @@ StartPollers=<%= @startpollers %> # Mandatory: no # Range: 1-1000 # Default: -# MaxConcurrentChecksPerPoller=1000 +MaxConcurrentChecksPerPoller=<%= @maxconcurrentchecksperpoller %> <% end %> ### Option: StartIPMIPollers