diff --git a/REFERENCE.md b/REFERENCE.md index 357f592a..c5e22e21 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -1400,6 +1400,7 @@ The following parameters are available in the `zabbix::agent` class: * [`server`](#-zabbix--agent--server) * [`listenport`](#-zabbix--agent--listenport) * [`listenip`](#-zabbix--agent--listenip) +* [`statusport`](#-zabbix--agent--statusport) * [`startagents`](#-zabbix--agent--startagents) * [`serveractive`](#-zabbix--agent--serveractive) * [`service_ensure`](#-zabbix--agent--service_ensure) @@ -1413,6 +1414,9 @@ The following parameters are available in the `zabbix::agent` class: * [`refreshactivechecks`](#-zabbix--agent--refreshactivechecks) * [`buffersend`](#-zabbix--agent--buffersend) * [`buffersize`](#-zabbix--agent--buffersize) +* [`enablepersistentbuffer`](#-zabbix--agent--enablepersistentbuffer) +* [`persistentbufferperiod`](#-zabbix--agent--persistentbufferperiod) +* [`persistentbufferfile`](#-zabbix--agent--persistentbufferfile) * [`maxlinespersecond`](#-zabbix--agent--maxlinespersecond) * [`allowroot`](#-zabbix--agent--allowroot) * [`zabbix_user`](#-zabbix--agent--zabbix_user) @@ -1447,6 +1451,7 @@ The following parameters are available in the `zabbix::agent` class: * [`include_dir_purge`](#-zabbix--agent--include_dir_purge) * [`unsafeuserparameters`](#-zabbix--agent--unsafeuserparameters) * [`userparameter`](#-zabbix--agent--userparameter) +* [`controlsocket`](#-zabbix--agent--controlsocket) * [`loadmodulepath`](#-zabbix--agent--loadmodulepath) * [`loadmodule`](#-zabbix--agent--loadmodule) * [`manage_startup_script`](#-zabbix--agent--manage_startup_script) @@ -1721,6 +1726,14 @@ if more than 1 interface is on the server. Default value: `$zabbix::params::agent_listenip` +##### `statusport` + +Data type: `Optional[Integer[1024,32767]]` + +Agent will listen on this port for HTTP status requests. + +Default value: `$zabbix::params::agent_statusport` + ##### `startagents` Data type: `Any` @@ -1827,6 +1840,30 @@ Maximum number of values in a memory buffer. Default value: `$zabbix::params::agent_buffersize` +##### `enablepersistentbuffer` + +Data type: `Optional[Integer[0,1]]` + +Use persistent buffer (set to 1), or in-memory buffer is used (default). + +Default value: `$zabbix::params::agent_enablepersistentbuffer` + +##### `persistentbufferperiod` + +Data type: `Optional[String[1]]` + +Zabbix Agent2 will keep data for this time period in case of no connectivity with Zabbix server or proxy. + +Default value: `$zabbix::params::agent_persistentbufferperiod` + +##### `persistentbufferfile` + +Data type: `Optional[Stdlib::Absolutepath]` + +Full filename. Zabbix Agent2 will keep SQLite database in this file. + +Default value: `$zabbix::params::agent_persistentbufferfile` + ##### `maxlinespersecond` Data type: `Any` @@ -2105,6 +2142,14 @@ User-defined parameter to monitor. Default value: `$zabbix::params::agent_userparameter` +##### `controlsocket` + +Data type: `Optional[Stdlib::Absolutepath]` + +The control socket, used to send runtime commands with '-R' option. + +Default value: `$zabbix::params::agent_controlsocket` + ##### `loadmodulepath` Data type: `Optional[String[1]]` @@ -2565,6 +2610,9 @@ The following parameters are available in the `zabbix::proxy` class: * [`database_tlscipher13`](#-zabbix--proxy--database_tlscipher13) * [`localbuffer`](#-zabbix--proxy--localbuffer) * [`offlinebuffer`](#-zabbix--proxy--offlinebuffer) +* [`buffermode`](#-zabbix--proxy--buffermode) +* [`memorybuffersize`](#-zabbix--proxy--memorybuffersize) +* [`memorybufferage`](#-zabbix--proxy--memorybufferage) * [`heartbeatfrequency`](#-zabbix--proxy--heartbeatfrequency) * [`configfrequency`](#-zabbix--proxy--configfrequency) * [`proxyconfigfrequency`](#-zabbix--proxy--proxyconfigfrequency) @@ -3012,6 +3060,30 @@ Proxy will keep data for N hours in case if no connectivity with Zabbix Server Default value: `$zabbix::params::proxy_offlinebuffer` +##### `buffermode` + +Data type: `Optional[Enum['disk', 'memory', 'hybrid']]` + +Specifies history, discovery and auto registration data storage mechanism: disk, memory, hybrid + +Default value: `$zabbix::params::proxy_buffermode` + +##### `memorybuffersize` + +Data type: `Optional[String[1]]` + +Size of shared memory cache for collected history, discovery and auto registration data, in bytes. + +Default value: `$zabbix::params::proxy_memorybuffersize` + +##### `memorybufferage` + +Data type: `Optional[Variant[Integer[0], Integer[600, 864000]]]` + +Maximum age of data in proxy memory buffer, in seconds. + +Default value: `$zabbix::params::proxy_memorybufferage` + ##### `heartbeatfrequency` Data type: `Any` @@ -4013,6 +4085,7 @@ The following parameters are available in the `zabbix::server` class: * [`startalerters`](#-zabbix--server--startalerters) * [`startdiscoverers`](#-zabbix--server--startdiscoverers) * [`startescalators`](#-zabbix--server--startescalators) +* [`starthistorypollers`](#-zabbix--server--starthistorypollers) * [`starthttppollers`](#-zabbix--server--starthttppollers) * [`starttimers`](#-zabbix--server--starttimers) * [`javagateway`](#-zabbix--server--javagateway) @@ -4040,6 +4113,7 @@ The following parameters are available in the `zabbix::server` class: * [`historycachesize`](#-zabbix--server--historycachesize) * [`historyindexcachesize`](#-zabbix--server--historyindexcachesize) * [`trendcachesize`](#-zabbix--server--trendcachesize) +* [`trendfunctioncachesize`](#-zabbix--server--trendfunctioncachesize) * [`valuecachesize`](#-zabbix--server--valuecachesize) * [`timeout`](#-zabbix--server--timeout) * [`tlscafile`](#-zabbix--server--tlscafile) @@ -4450,6 +4524,14 @@ Number of pre-forked instances of escalators. Default value: `$zabbix::params::server_startescalators` +##### `starthistorypollers` + +Data type: `Optional[Integer[0, 100]]` + +Number of pre-forked instances of history pollers. + +Default value: `$zabbix::params::server_starthistorypollers` + ##### `starthttppollers` Data type: `Any` @@ -4672,6 +4754,14 @@ Size of trend cache, in bytes. Default value: `$zabbix::params::server_trendcachesize` +##### `trendfunctioncachesize` + +Data type: `Optional[String[1]]` + +Size of trend function cache, in bytes. + +Default value: `$zabbix::params::server_trendfunctioncachesize` + ##### `valuecachesize` Data type: `Any` diff --git a/manifests/agent.pp b/manifests/agent.pp index 9db33a8e..c1352267 100644 --- a/manifests/agent.pp +++ b/manifests/agent.pp @@ -53,6 +53,7 @@ # It will find out which ip is configured for this ipaddress. Can be handy # if more than 1 interface is on the server. # +# @param statusport Agent will listen on this port for HTTP status requests. # @param startagents Number of pre-forked instances of zabbix_agentd that process passive checks. # @param serveractive List of comma delimited ip:port (or hostname:port) pairs of zabbix servers for active checks. # @param service_ensure Start / stop the agent service. E.g. to preconfigure a hosts agent and turn on the service at a later time (when the server reaches production SLA) @@ -70,6 +71,9 @@ # @param refreshactivechecks How often list of active checks is refreshed, in seconds. # @param buffersend Do not keep data longer than n seconds in buffer. # @param buffersize Maximum number of values in a memory buffer. +# @param enablepersistentbuffer Use persistent buffer (set to 1), or in-memory buffer is used (default). +# @param persistentbufferperiod Zabbix Agent2 will keep data for this time period in case of no connectivity with Zabbix server or proxy. +# @param persistentbufferfile Full filename. Zabbix Agent2 will keep SQLite database in this file. # @param maxlinespersecond Maximum number of new lines the agent will send per second to zabbix server or proxy processing. # @param allowroot Allow the agent to run as 'root'. # @param zabbix_user Drop privileges to a specific, existing user on the system. Only has effect if run as 'root' and AllowRoot is disabled. @@ -116,6 +120,7 @@ # @param include_dir_purge Include dir to purge. # @param unsafeuserparameters Allow all characters to be passed in arguments to user-defined parameters. # @param userparameter User-defined parameter to monitor. +# @param controlsocket The control socket, used to send runtime commands with '-R' option. # @param loadmodulepath Full path to location of agent modules. # @param loadmodule Module to load at agent startup. # @param manage_startup_script @@ -179,6 +184,7 @@ $server = $zabbix::params::agent_server, $listenport = $zabbix::params::agent_listenport, $listenip = $zabbix::params::agent_listenip, + Optional[Integer[1024,32767]] $statusport = $zabbix::params::agent_statusport, $startagents = $zabbix::params::agent_startagents, $serveractive = $zabbix::params::agent_serveractive, Stdlib::Ensure::Service $service_ensure = $zabbix::params::agent_service_ensure, @@ -192,6 +198,9 @@ $refreshactivechecks = $zabbix::params::agent_refreshactivechecks, $buffersend = $zabbix::params::agent_buffersend, $buffersize = $zabbix::params::agent_buffersize, + Optional[Integer[0,1]] $enablepersistentbuffer = $zabbix::params::agent_enablepersistentbuffer, + Optional[Stdlib::Absolutepath] $persistentbufferfile = $zabbix::params::agent_persistentbufferfile, + Optional[String[1]] $persistentbufferperiod = $zabbix::params::agent_persistentbufferperiod, $maxlinespersecond = $zabbix::params::agent_maxlinespersecond, Optional[Array] $zabbix_alias = $zabbix::params::agent_zabbix_alias, $timeout = $zabbix::params::agent_timeout, @@ -201,6 +210,7 @@ $include_dir_purge = $zabbix::params::agent_include_purge, $unsafeuserparameters = $zabbix::params::agent_unsafeuserparameters, $userparameter = $zabbix::params::agent_userparameter, + Optional[Stdlib::Absolutepath] $controlsocket = $zabbix::params::agent_controlsocket, Optional[String[1]] $loadmodulepath = $zabbix::params::agent_loadmodulepath, $loadmodule = $zabbix::params::agent_loadmodule, Optional[Variant[Array[Enum['unencrypted','psk','cert']],Enum['unencrypted','psk','cert']]] $tlsaccept = $zabbix::params::agent_tlsaccept, diff --git a/manifests/params.pp b/manifests/params.pp index baf616c4..15ab4e03 100755 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -248,6 +248,7 @@ $server_startalerters = 3 $server_startdiscoverers = '1' $server_startescalators = 1 + $server_starthistorypollers = 5 $server_starthttppollers = '1' $server_startipmipollers = '0' $server_startjavapollers = '5' @@ -283,6 +284,7 @@ $server_tmpdir = '/tmp' $server_trappertimeout = '300' $server_trendcachesize = '4M' + $server_trendfunctioncachesize = undef $server_unavailabledelay = '60' $server_unreachabledelay = '15' $server_unreachableperiod = '45' @@ -301,9 +303,11 @@ $agent_allowroot = '0' $agent_buffersend = '5' $agent_buffersize = '100' + $agent_controlsocket = undef $agent_debuglevel = '3' $agent_allowkey = undef $agent_denykey = undef + $agent_enablepersistentbuffer = undef $agent_enableremotecommands = '0' $agent_hostmetadata = undef $agent_hostmetadataitem = undef @@ -314,9 +318,12 @@ $agent_include_purge = true $agent_listenip = undef $agent_listenport = '10050' + $agent_statusport = undef $agent_loadmodule = undef $agent_logremotecommands = '0' $agent_maxlinespersecond = '100' + $agent_persistentbufferfile = undef + $agent_persistentbufferperiod = undef $agent_refreshactivechecks = '120' $agent_server = '127.0.0.1' $agent_serveractive = undef @@ -369,6 +376,7 @@ # Proxy specific params $proxy_allowroot = '0' + $proxy_buffermode = 'disk' $proxy_cachesize = '32M' $proxy_configfile_path = '/etc/zabbix/zabbix_proxy.conf' $proxy_configfrequency = '3600' @@ -408,6 +416,8 @@ $proxy_logfilesize = '10' $proxy_logremotecommands = 0 $proxy_logslowqueries = '0' + $proxy_memorybufferage = 0 + $proxy_memorybuffersize = '0' $proxy_mode = '0' $proxy_offlinebuffer = '1' $proxy_pidfile = '/var/run/zabbix/zabbix_proxy.pid' diff --git a/manifests/proxy.pp b/manifests/proxy.pp index f0116998..6071655d 100755 --- a/manifests/proxy.pp +++ b/manifests/proxy.pp @@ -57,6 +57,9 @@ # @param database_tlscipher13 The list of encryption ciphersuites that Zabbix server permits for TLSv1.3 protocol. # @param localbuffer Proxy will keep data locally for N hours, even if the data have already been synced with the server # @param offlinebuffer Proxy will keep data for N hours in case if no connectivity with Zabbix Server +# @param buffermode Specifies history, discovery and auto registration data storage mechanism: disk, memory, hybrid +# @param memorybuffersize Size of shared memory cache for collected history, discovery and auto registration data, in bytes. +# @param memorybufferage Maximum age of data in proxy memory buffer, in seconds. # @param heartbeatfrequency Unique nodeid in distributed setup. # @param configfrequency How often proxy retrieves configuration data from Zabbix Server in seconds. # @param proxyconfigfrequency How often proxy retrieves configuration data from Zabbix Server in seconds (Zabbix 6.4). @@ -235,6 +238,9 @@ Optional[String[1]] $database_tlscipher13 = $zabbix::params::proxy_database_tlscipher13, $localbuffer = $zabbix::params::proxy_localbuffer, $offlinebuffer = $zabbix::params::proxy_offlinebuffer, + Optional[Enum['disk', 'memory', 'hybrid']] $buffermode = $zabbix::params::proxy_buffermode, + Optional[String[1]] $memorybuffersize = $zabbix::params::proxy_memorybuffersize, + Optional[Variant[Integer[0], Integer[600, 864000]]] $memorybufferage = $zabbix::params::proxy_memorybufferage, $heartbeatfrequency = $zabbix::params::proxy_heartbeatfrequency, $configfrequency = $zabbix::params::proxy_configfrequency, Optional[Integer[1,604800]] $proxyconfigfrequency = $zabbix::params::proxy_proxyconfigfrequency, diff --git a/manifests/server.pp b/manifests/server.pp index 83b496ed..90f40ff1 100755 --- a/manifests/server.pp +++ b/manifests/server.pp @@ -57,6 +57,7 @@ # @param startalerters Number of pre-forked instances of alerters. # @param startdiscoverers Number of pre-forked instances of discoverers. # @param startescalators Number of pre-forked instances of escalators. +# @param starthistorypollers Number of pre-forked instances of history pollers. # @param starthttppollers Number of pre-forked instances of http pollers. # @param starttimers Number of pre-forked instances of timers. # @param javagateway IP address (or hostname) of zabbix java gateway. @@ -92,6 +93,7 @@ # @param historycachesize Size of history cache, in bytes. # @param historyindexcachesize Size of history index cache, in bytes. # @param trendcachesize Size of trend cache, in bytes. +# @param trendfunctioncachesize Size of trend function cache, in bytes. # @param valuecachesize Size of history value cache, in bytes. # @param timeout Specifies how long we wait for agent, snmp device or external check (in seconds). # @param tlscafile Full pathname of a file containing the top-level CA(s) certificates for peer certificate verification. @@ -216,6 +218,7 @@ Integer[1, 100] $startalerters = $zabbix::params::server_startalerters, $startdiscoverers = $zabbix::params::server_startdiscoverers, Integer[1, 100] $startescalators = $zabbix::params::server_startescalators, + Optional[Integer[0, 100]] $starthistorypollers = $zabbix::params::server_starthistorypollers, $starthttppollers = $zabbix::params::server_starthttppollers, $starttimers = $zabbix::params::server_starttimers, $javagateway = $zabbix::params::server_javagateway, @@ -241,6 +244,7 @@ $historycachesize = $zabbix::params::server_historycachesize, $historyindexcachesize = $zabbix::params::server_historyindexcachesize, $trendcachesize = $zabbix::params::server_trendcachesize, + Optional[String[1]] $trendfunctioncachesize = $zabbix::params::server_trendfunctioncachesize, $valuecachesize = $zabbix::params::server_valuecachesize, $timeout = $zabbix::params::server_timeout, $tlscafile = $zabbix::params::server_tlscafile, diff --git a/spec/classes/agent_spec.rb b/spec/classes/agent_spec.rb index 1f23d224..b128c8af 100644 --- a/spec/classes/agent_spec.rb +++ b/spec/classes/agent_spec.rb @@ -292,6 +292,7 @@ agent_configfile_path: '/etc/zabbix/zabbix_agentd.conf', buffersend: '5', buffersize: '100', + controlsocket: '/tmp/agent.sock', debuglevel: '4', allowkey: 'system.run[*]', denykey: 'system.run[*]', @@ -334,6 +335,7 @@ it { is_expected.to contain_file('/etc/zabbix/zabbix_agentd.conf').with_content %r{^AllowRoot=0$} } it { is_expected.to contain_file('/etc/zabbix/zabbix_agentd.conf').with_content %r{^BufferSend=5$} } it { is_expected.to contain_file('/etc/zabbix/zabbix_agentd.conf').with_content %r{^BufferSize=100$} } + it { is_expected.to contain_file('/etc/zabbix/zabbix_agentd.conf').with_content %r{^ControlSocket=/tmp/agent.sock$} } it { is_expected.to contain_file('/etc/zabbix/zabbix_agentd.conf').with_content %r{^DebugLevel=4$} } it { is_expected.to contain_file('/etc/zabbix/zabbix_agentd.conf').with_content %r{^AllowKey=system.run\[\*\]$} } it { is_expected.to contain_file('/etc/zabbix/zabbix_agentd.conf').with_content %r{^DenyKey=system.run\[\*\]$} } @@ -499,7 +501,9 @@ maxlinespersecond: 1, allowroot: 1, zabbix_user: 'root', loadmodulepath: '/tmp', allowkey: 'system.run[*]', denykey: 'system.run[*]', enableremotecommands: 1, - logremotecommands: 1 + logremotecommands: 1, enablepersistentbuffer: 1, + persistentbufferfile: '/var/lib/zabbix/zabbix_agent2.zbxtmp', + persistentbufferperiod: '1h', } end @@ -509,7 +513,9 @@ is_expected.not_to contain_file(config_path).with_content( %r{^(LogRemoteCommands|StartAgents|MaxLinesPerSecond |AllowRoot|User|LoadModulePath| - EnableRemoteCommands|LogRemoteCommands)} + EnableRemoteCommands|LogRemoteCommands| + EnablePersistentBuffer|PersistentBufferFile| + PersistentBufferPeriod)} ) end end diff --git a/spec/classes/proxy_spec.rb b/spec/classes/proxy_spec.rb index a6122c9d..4b987e38 100644 --- a/spec/classes/proxy_spec.rb +++ b/spec/classes/proxy_spec.rb @@ -368,6 +368,25 @@ it { is_expected.to contain_file('/etc/zabbix/zabbix_proxy.conf').with_content %r{^StartODBCPollers=1$} } end + context 'with zabbix_proxy.conf and version 7.0' do + let :params do + { + buffermode: 'disk', + memorybufferage: 0, + memorybuffersize: '0', + socketdir: '/var/run/zabbix', + startodbcpollers: 1, + zabbix_version: '7.0' + } + end + + it { is_expected.to contain_file('/etc/zabbix/zabbix_proxy.conf').with_content %r{^ProxyBufferMode=disk$} } + it { is_expected.to contain_file('/etc/zabbix/zabbix_proxy.conf').with_content %r{^ProxyMemoryBufferSize=0$} } + it { is_expected.to contain_file('/etc/zabbix/zabbix_proxy.conf').with_content %r{^ProxyMemoryBufferAge=0$} } + 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 describe 'as system' do let :params do diff --git a/spec/classes/server_spec.rb b/spec/classes/server_spec.rb index c4059c39..2322254f 100644 --- a/spec/classes/server_spec.rb +++ b/spec/classes/server_spec.rb @@ -261,6 +261,7 @@ tmpdir: '/tmp', trappertimeout: '30', trendcachesize: '4M', + trendfunctioncachesize: '4M', unavailabledelay: '30', unreachabledelay: '30', unreachableperiod: '30', @@ -338,6 +339,7 @@ it { is_expected.to contain_file('/etc/zabbix/zabbix_server.conf').with_content %r{^TmpDir=/tmp} } it { is_expected.to contain_file('/etc/zabbix/zabbix_server.conf').with_content %r{^TrapperTimeout=30} } it { is_expected.to contain_file('/etc/zabbix/zabbix_server.conf').with_content %r{^TrendCacheSize=4M} } + it { is_expected.to contain_file('/etc/zabbix/zabbix_server.conf').with_content %r{^TrendFunctionCacheSize=4M} } it { is_expected.to contain_file('/etc/zabbix/zabbix_server.conf').with_content %r{^UnavailableDelay=30} } it { is_expected.to contain_file('/etc/zabbix/zabbix_server.conf').with_content %r{^UnreachableDelay=30} } it { is_expected.to contain_file('/etc/zabbix/zabbix_server.conf').with_content %r{^UnreachablePeriod=30} } @@ -352,6 +354,17 @@ it { is_expected.to contain_file('/etc/zabbix/zabbix_server.conf').with_content %r{^TLSCipherAll13=EECDH\+aRSA\+AES128:RSA\+aRSA\+AES128:kECDHEPSK\+AES128:kPSK\+AES128$} } end + context 'with zabbix_server.conf, version 7.0 and historypoller' do + let :params do + { + starthistorypollers: 5, + zabbix_version: '7.0' + } + end + + it { is_expected.to contain_file('/etc/zabbix/zabbix_server.conf').with_content %r{^StartHistoryPollers=5} } + end + context 'with zabbix_server.conf and version 5.0' do next if facts[:os]['family'] == 'RedHat' && facts[:os]['release']['major'] == '9' diff --git a/templates/zabbix_agentd.conf.erb b/templates/zabbix_agentd.conf.erb index d4d509db..a357ebb6 100644 --- a/templates/zabbix_agentd.conf.erb +++ b/templates/zabbix_agentd.conf.erb @@ -126,6 +126,13 @@ ListenPort=<%= @listenport %> # Mandatory: no <% if @listen_ip %>ListenIP=<%= @listen_ip %><% end %> +### Option: StatusPort +# Agent will listen on this port for HTTP status requests. +# +# Mandatory: no +# Range: 1024-32767 +<% if @statusport %>StatusPort=<%= @statusport %><% end %> + <% unless @agent2 %> ### Option: StartAgents # Number of pre-forked instances of zabbix_agentd that process passive checks. @@ -241,6 +248,31 @@ BufferSend=<%= @buffersend %> # Range: 2-65535 BufferSize=<%= @buffersize %> +### Option: EnablePersistentBuffer: +# 0 - disabled, in-memory buffer is used (default); +# 1 - use persistent buffer +# Mandatory: no +# Range: 0-1 +<% if @enablepersistentbuffer %>EnablePersistentBuffer=<%= @enablepersistentbuffer %><% end %> + +<% unless @enablepersistentbuffer %> +### Option: PersistentBufferPeriod +# Zabbix Agent2 will keep data for this time period in case of no +# connectivity with Zabbix server or proxy. Older data will be lost. Log data will be preserved. +# Option is valid if EnablePersistentBuffer=1 +# +# Mandatory: no +# Range: 1m-365d +<% if @persistentbufferperiod %>PersistentBufferPeriod=<%= @persistentbufferperiod %><% end %> + +### Option: PersistentBufferFile +# full filename. Zabbix Agent2 will keep SQLite database in this file +# Option is valid if EnablePersistentBuffer=1 +# +# Mandatory: no +<% if @persistentbufferfile %>PersistentBufferFile=<%= @persistentbufferfile %><% end %> + +<% end %> <% unless @agent2 %> ### Option: MaxLinesPerSecond # Maximum number of new lines the agent will send per second to Zabbix Server @@ -326,6 +358,12 @@ UnsafeUserParameters=<%= @unsafeuserparameters %> # # Disabled. A configuration file should be placed on directory: <%= @include %> +### Option: ControlSocket +# The control socket, used to send runtime commands with '-R' option. +# +# Mandatory: no +<% if @controlsocket %>ControlSocket=<%= @controlsocket %><% end %> + ####### LOADABLE MODULES ####### <% if @kernel != 'windows' and !@agent2 %> ### Option: LoadModulePath diff --git a/templates/zabbix_proxy.conf.erb b/templates/zabbix_proxy.conf.erb index 03c044cb..8c20cf28 100755 --- a/templates/zabbix_proxy.conf.erb +++ b/templates/zabbix_proxy.conf.erb @@ -212,6 +212,7 @@ ProxyLocalBuffer=<%= @localbuffer %> # Range: 1-720 ProxyOfflineBuffer=<%= @offlinebuffer %> +<% if @zabbix_version.to_f >= 7.0 %> ### Option: ProxyBufferMode # Specifies history, discovery and auto registration data storage mechanism: # disk - data are stored in database and uploaded from database @@ -227,7 +228,7 @@ ProxyOfflineBuffer=<%= @offlinebuffer %> # Mandatory: no # Values: disk, memory, hybrid # Default: -# ProxyBufferMode=disk +ProxyBufferMode=<%= @buffermode %> ### Option: ProxyMemoryBufferSize # Size of shared memory cache for collected history, discovery and auto registration data, in bytes. @@ -238,7 +239,7 @@ ProxyOfflineBuffer=<%= @offlinebuffer %> # Mandatory: no # Range: 0,128K-2G # Default: -# ProxyMemoryBufferSize=0 +ProxyMemoryBufferSize=<%= @memorybuffersize %> ### Option: ProxyMemoryBufferAge # Maximum age of data in proxy memory buffer, in seconds. @@ -249,7 +250,8 @@ ProxyOfflineBuffer=<%= @offlinebuffer %> # Mandatory: no # Range: 0,600-864000 # Default: -# ProxyMemoryBufferAge=0 +ProxyMemoryBufferAge=<%= @memorybufferage %> +<% end %> <% if @zabbix_version.to_f < 6.4 %> ### Option: HeartbeatFrequency @@ -969,4 +971,4 @@ LoadModulePath=<%= @loadmodulepath %> # Default: # StartBrowserPollers=1 -<% end %> \ No newline at end of file +<% end %> diff --git a/templates/zabbix_server.conf.erb b/templates/zabbix_server.conf.erb index db4a64c1..61c8937d 100755 --- a/templates/zabbix_server.conf.erb +++ b/templates/zabbix_server.conf.erb @@ -251,6 +251,7 @@ StartPollersUnreachable=<%= @startpollersunreachable %> # Range: 0-1000 # Default: # StartHistoryPollers=5 +<% if @starthistorypollers %>StartHistoryPollers=<%= @starthistorypollers %><% end %> <% end %> <% if @zabbix_version.to_f >= 6.0 %> @@ -472,6 +473,14 @@ HistoryCacheSize=<%= @historycachesize %> # Range: 128K-2G TrendCacheSize=<%= @trendcachesize %> +### Option: TrendFunctionCacheSize +# Size of trend function cache, in bytes. +# Shared memory size for caching calculated trend function data +# +# Mandatory: no +# Range: 128K-2G +<% if @trendfunctioncachesize %>TrendFunctionCacheSize=<%= @trendfunctioncachesize %><% end %> + ### Option: ValueCacheSize # Size of history value cache, in bytes. # Shared memory size for caching item history data requests.