From 4e831338359ab5cd9e538992d7be49d986bb12e0 Mon Sep 17 00:00:00 2001 From: lqslan Date: Tue, 7 Apr 2015 23:26:47 +0800 Subject: [PATCH] Enable store_events parameter in notification service Change-Id: I0075ece1afba2bfdf5cb422249a6f0d9072393ab --- README.md | 1 + attributes/default.rb | 3 +++ spec/common_spec.rb | 7 +++++++ templates/default/ceilometer.conf.erb | 3 +++ 4 files changed, 14 insertions(+) diff --git a/README.md b/README.md index 065e887..3338595 100644 --- a/README.md +++ b/README.md @@ -77,6 +77,7 @@ Attributes * `openstack['telemetry']['service-credentials']['insecure']` - Set whether to verify HTTPS connections (for service polling authentication) * `openstack['telemetry']['dbsync_timeout']` - Set dbsync command timeout value * `openstack['telemetry']['database']['time_to_live']` - Set a time_to_live parameter (ttl) for samples. Set -1 for no expiry +* `openstack['telemetry']['notification']['store_events']` - Set a store_events parameter for notification service The following attributes are defined in attributes/default.rb of the common cookbook, but are documented here due to their relevance: diff --git a/attributes/default.rb b/attributes/default.rb index a170ecc..44e8a67 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -146,3 +146,6 @@ end # The time to live value for samples which is specified in seconds, override to -1 if no data expiry is required default['openstack']['telemetry']['database']['time_to_live'] = 1800 + +# Decide whether to store events in notification service or not +default['openstack']['telemetry']['notification']['store_events'] = false diff --git a/spec/common_spec.rb b/spec/common_spec.rb index 2041df0..8b59b1f 100644 --- a/spec/common_spec.rb +++ b/spec/common_spec.rb @@ -349,6 +349,13 @@ describe 'openstack-telemetry::common' do end end + context 'notification' do + it 'has store_events option' do + expect(chef_run).to render_config_file(file.name)\ + .with_section_content('notification', /^store_events = false$/) + end + end + end end end diff --git a/templates/default/ceilometer.conf.erb b/templates/default/ceilometer.conf.erb index aa52209..1695581 100644 --- a/templates/default/ceilometer.conf.erb +++ b/templates/default/ceilometer.conf.erb @@ -134,3 +134,6 @@ os_cacert = <%= node['openstack']['telemetry']['service-credentials']['cafile'] # Verify HTTPS connections. (boolean value, for service polling authentication) insecure = <%= node['openstack']['telemetry']['service-credentials']['insecure'] %> + +[notification] +store_events = <%= node['openstack']['telemetry']['notification']['store_events'] %>