Add metric_processing_delay param
Expose this param to tweak the delay between processing
metrics in gnocchi.
Change-Id: I5de5283d1b14e0bba63d6d9a440611914ba86ca4
(cherry picked from commit 315733a00c
)
This commit is contained in:
parent
c2ac6f23df
commit
74c06950a1
|
@ -24,10 +24,15 @@
|
|||
# (optional) The url to use for distributed group membership coordination.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*metric_processing_delay*]
|
||||
# (optional) Delay between processng metrics
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
|
||||
class gnocchi::storage(
|
||||
$package_ensure = 'present',
|
||||
$coordination_url = $::os_service_default,
|
||||
$package_ensure = 'present',
|
||||
$coordination_url = $::os_service_default,
|
||||
$metric_processing_delay = $::os_service_default,
|
||||
) inherits gnocchi::params {
|
||||
|
||||
include ::gnocchi::deps
|
||||
|
@ -35,7 +40,8 @@ class gnocchi::storage(
|
|||
if $coordination_url {
|
||||
|
||||
gnocchi_config {
|
||||
'storage/coordination_url' : value => $coordination_url;
|
||||
'storage/coordination_url' : value => $coordination_url;
|
||||
'storage/metric_processing_delay' : value => $metric_processing_delay;
|
||||
}
|
||||
|
||||
if ($coordination_url =~ /^redis/ ) {
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
fixes:
|
||||
- Expose metric processing delay param.
|
|
@ -13,11 +13,15 @@ describe 'gnocchi::storage' do
|
|||
|
||||
context 'with coordination' do
|
||||
before do
|
||||
params.merge!({ :coordination_url => 'redis://localhost:6379' })
|
||||
params.merge!({
|
||||
:coordination_url => 'redis://localhost:6379',
|
||||
:metric_processing_delay => 30,
|
||||
})
|
||||
end
|
||||
|
||||
it 'configures backend_url' do
|
||||
is_expected.to contain_gnocchi_config('storage/coordination_url').with_value('redis://localhost:6379')
|
||||
is_expected.to contain_gnocchi_config('storage/metric_processing_delay').with_value(30)
|
||||
end
|
||||
|
||||
it 'installs python-redis package' do
|
||||
|
|
Loading…
Reference in New Issue