Add support for [DEFAULT] additional_ingestion_lag
Change-Id: I2b367c92125b0a08d0da1795eda080727bcfa1e5
This commit is contained in:
parent
09c0b80937
commit
89ddb1b8f2
|
@ -25,6 +25,11 @@
|
|||
# (optional) TTL of event alram caches, in seconds.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*additional_ingestion_lag*]
|
||||
# (optional) The number of seconds to extend the evaluation windows to
|
||||
# compensate the reporting/ingestion lag.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# DEPRECATED PARAMETERS
|
||||
#
|
||||
# [*coordination_url*]
|
||||
|
@ -32,14 +37,15 @@
|
|||
# Defaults to undef.
|
||||
#
|
||||
class aodh::evaluator (
|
||||
$manage_service = true,
|
||||
$enabled = true,
|
||||
$package_ensure = 'present',
|
||||
$workers = $::os_workers,
|
||||
$evaluation_interval = $::os_service_default,
|
||||
$event_alarm_cache_ttl = $::os_service_default,
|
||||
$manage_service = true,
|
||||
$enabled = true,
|
||||
$package_ensure = 'present',
|
||||
$workers = $::os_workers,
|
||||
$evaluation_interval = $::os_service_default,
|
||||
$event_alarm_cache_ttl = $::os_service_default,
|
||||
$additional_ingestion_lag = $::os_service_default,
|
||||
# DEPRECATED PARAMETERS
|
||||
$coordination_url = undef,
|
||||
$coordination_url = undef,
|
||||
) {
|
||||
|
||||
include aodh::deps
|
||||
|
@ -51,9 +57,10 @@ class aodh::evaluator (
|
|||
}
|
||||
|
||||
aodh_config {
|
||||
'DEFAULT/evaluation_interval' : value => $evaluation_interval;
|
||||
'DEFAULT/event_alarm_cache_ttl': value => $event_alarm_cache_ttl;
|
||||
'evaluator/workers' : value => $workers;
|
||||
'DEFAULT/evaluation_interval': value => $evaluation_interval;
|
||||
'DEFAULT/event_alarm_cache_ttl': value => $event_alarm_cache_ttl;
|
||||
'DEFAULT/additional_ingestion_lag': value => $additional_ingestion_lag;
|
||||
'evaluator/workers': value => $workers;
|
||||
}
|
||||
|
||||
package { 'aodh-evaluator':
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
features:
|
||||
- |
|
||||
The new ``aodh::evaluator::additional_ingestion_lag`` parameter has been
|
||||
added.
|
|
@ -13,6 +13,7 @@ describe 'aodh::evaluator' do
|
|||
is_expected.to contain_aodh_config('evaluator/workers').with_value(4)
|
||||
is_expected.to contain_aodh_config('DEFAULT/evaluation_interval').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_aodh_config('DEFAULT/event_alarm_cache_ttl').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_aodh_config('DEFAULT/additional_ingestion_lag').with_value('<SERVICE DEFAULT>')
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -29,13 +30,15 @@ describe 'aodh::evaluator' do
|
|||
context 'with parameters defined' do
|
||||
before do
|
||||
params.merge!({
|
||||
:evaluation_interval => 10,
|
||||
:event_alarm_cache_ttl => 60,
|
||||
:evaluation_interval => 10,
|
||||
:event_alarm_cache_ttl => 60,
|
||||
:additional_ingestion_lag => 20,
|
||||
})
|
||||
end
|
||||
it 'configures parameters accordingly' do
|
||||
is_expected.to contain_aodh_config('DEFAULT/evaluation_interval').with_value(10)
|
||||
is_expected.to contain_aodh_config('DEFAULT/event_alarm_cache_ttl').with_value(60)
|
||||
is_expected.to contain_aodh_config('DEFAULT/additional_ingestion_lag').with_value(20)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue