diff --git a/manifests/agent/notification.pp b/manifests/agent/notification.pp index e417ef62..eafd571d 100644 --- a/manifests/agent/notification.pp +++ b/manifests/agent/notification.pp @@ -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; } } diff --git a/releasenotes/notes/notification-batch-opts-c9284092587ca561.yaml b/releasenotes/notes/notification-batch-opts-c9284092587ca561.yaml new file mode 100644 index 00000000..f952ca00 --- /dev/null +++ b/releasenotes/notes/notification-batch-opts-c9284092587ca561.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + The ``ceilometer::agent::notification`` class now supports the + ``batch_size`` parameter and the ``batch_timeout`` parameter. diff --git a/spec/classes/ceilometer_agent_notification_spec.rb b/spec/classes/ceilometer_agent_notification_spec.rb index 16bc8112..681375c8 100644 --- a/spec/classes/ceilometer_agent_notification_spec.rb +++ b/spec/classes/ceilometer_agent_notification_spec.rb @@ -48,6 +48,8 @@ describe 'ceilometer::agent::notification' do is_expected.to contain_ceilometer_config('notification/workers').with_value('') is_expected.to contain_ceilometer_config('notification/ack_on_event_error').with_value('') is_expected.to contain_ceilometer_config('notification/disable_non_metric_meters').with_value('') + is_expected.to contain_ceilometer_config('notification/batch_size').with_value('') + is_expected.to contain_ceilometer_config('notification/batch_timeout').with_value('') end context 'with disabled non-metric meters' do