Skip to content

Commit 6ec8f5c

Browse files
authored
Merge pull request #586 from Ordnaxz/historyindexcachesize2
Added historyindexcachesize to class zabbix (part2)
2 parents 641d942 + a42d3c7 commit 6ec8f5c

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

manifests/init.pp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@
146146
$cacheupdatefrequency = $zabbix::params::server_cacheupdatefrequency,
147147
$startdbsyncers = $zabbix::params::server_startdbsyncers,
148148
$historycachesize = $zabbix::params::server_historycachesize,
149+
Zabbix::Historyics $historyindexcachesize = $zabbix::params::server_historyindexcachesize,
149150
$trendcachesize = $zabbix::params::server_trendcachesize,
150151
$historytextcachesize = $zabbix::params::server_historytextcachesize,
151152
$valuecachesize = $zabbix::params::server_valuecachesize,
@@ -270,6 +271,7 @@
270271
historycachesize => $historycachesize,
271272
trendcachesize => $trendcachesize,
272273
historytextcachesize => $historytextcachesize,
274+
historyindexcachesize => $historyindexcachesize,
273275
valuecachesize => $valuecachesize,
274276
nodenoevents => $nodenoevents,
275277
nodenohistory => $nodenohistory,

spec/classes/server_spec.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,7 @@
331331
tlscrlfile: '/etc/zabbix/keys/zabbix-server.crl',
332332
tlscertfile: '/etc/zabbix/keys/zabbix-server.crt',
333333
tlskeyfile: '/etc/zabbix/keys/zabbix-server.key',
334+
historyindexcachesize: '4M',
334335
zabbix_version: '3.0'
335336
}
336337
end
@@ -341,6 +342,7 @@
341342
it { is_expected.to contain_file('/etc/zabbix/zabbix_server.conf').with_content %r{^TLSKeyFile=/etc/zabbix/keys/zabbix-server.key$} }
342343
it { is_expected.to contain_file('/etc/zabbix/zabbix_server.conf').with_content %r{^SSLCertLocation=/usr/lib/zabbix/ssl/certs} }
343344
it { is_expected.to contain_file('/etc/zabbix/zabbix_server.conf').with_content %r{^SSLKeyLocation=/usr/lib/zabbix/ssl/keys} }
345+
it { is_expected.to contain_file('/etc/zabbix/zabbix_server.conf').with_content %r{^HistoryIndexCacheSize=4M} }
344346
end
345347
context 'with zabbix_server.conf and version 3.2' do
346348
let :params do
@@ -349,6 +351,7 @@
349351
tlscrlfile: '/etc/zabbix/keys/zabbix-server.crl',
350352
tlscertfile: '/etc/zabbix/keys/zabbix-server.crt',
351353
tlskeyfile: '/etc/zabbix/keys/zabbix-server.key',
354+
historyindexcachesize: '4M',
352355
zabbix_version: '3.2'
353356
}
354357
end
@@ -357,6 +360,7 @@
357360
it { is_expected.to contain_file('/etc/zabbix/zabbix_server.conf').with_content %r{^TLSCRLFile=/etc/zabbix/keys/zabbix-server.crl$} }
358361
it { is_expected.to contain_file('/etc/zabbix/zabbix_server.conf').with_content %r{^TLSCertFile=/etc/zabbix/keys/zabbix-server.crt$} }
359362
it { is_expected.to contain_file('/etc/zabbix/zabbix_server.conf').with_content %r{^TLSKeyFile=/etc/zabbix/keys/zabbix-server.key$} }
363+
it { is_expected.to contain_file('/etc/zabbix/zabbix_server.conf').with_content %r{^HistoryIndexCacheSize=4M} }
360364
end
361365
end
362366
end

types/historyics.pp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
type Zabbix::Historyics = Optional[Pattern[/^\d+[k|K|m|M]?$/]]

0 commit comments

Comments
 (0)