notification: Support tuning batch processing

This change introduces support for the option to tune batch processing
by notification agent.

Change-Id: I9cdbbe9becfffce68966a29b9e803218637d7714
This commit is contained in:
Takashi Kajinami 2023-01-23 16:11:38 +09:00
parent a6126de126
commit fa2b78f2ea
3 changed files with 21 additions and 0 deletions

View File

@ -49,6 +49,16 @@
# The format should be transport://user:pass@host1:port[,hostN:portN]/virtual_host
# Defaults to $::os_service_default.
#
# [*batch_size*]
# (Optional) Number of notification messages to wait before publishing
# them.
# Defaults to $::os_service_default.
#
# [*batch_timeout*]
# (Optional) Number of seconds to wait before dispatching samples when
# batch_size is not reached.
# Defaults to $::os_service_default.
#
# [*package_ensure*]
# (Optional) ensure state for package.
# Defaults to 'present'.
@ -90,6 +100,8 @@ class ceilometer::agent::notification (
$disable_non_metric_meters = $::os_service_default,
$workers = $::os_service_default,
$messaging_urls = $::os_service_default,
$batch_size = $::os_service_default,
$batch_timeout = $::os_service_default,
$package_ensure = 'present',
$manage_event_pipeline = false,
$event_pipeline_publishers = ['gnocchi://'],
@ -172,5 +184,7 @@ class ceilometer::agent::notification (
'notification/disable_non_metric_meters': value => $disable_non_metric_meters;
'notification/workers' : value => $workers;
'notification/messaging_urls' : value => $messaging_urls, secret => true;
'notification/batch_size' : value => $batch_size;
'notification/batch_timeout' : value => $batch_timeout;
}
}

View File

@ -0,0 +1,5 @@
---
features:
- |
The ``ceilometer::agent::notification`` class now supports the
``batch_size`` parameter and the ``batch_timeout`` parameter.

View File

@ -48,6 +48,8 @@ describe 'ceilometer::agent::notification' do
is_expected.to contain_ceilometer_config('notification/workers').with_value('<SERVICE DEFAULT>')
is_expected.to contain_ceilometer_config('notification/ack_on_event_error').with_value('<SERVICE DEFAULT>')
is_expected.to contain_ceilometer_config('notification/disable_non_metric_meters').with_value('<SERVICE DEFAULT>')
is_expected.to contain_ceilometer_config('notification/batch_size').with_value('<SERVICE DEFAULT>')
is_expected.to contain_ceilometer_config('notification/batch_timeout').with_value('<SERVICE DEFAULT>')
end
context 'with disabled non-metric meters' do