diff --git a/chef/cookbooks/ceilometer/recipes/common.rb b/chef/cookbooks/ceilometer/recipes/common.rb index c7fae21799..babe974ad7 100644 --- a/chef/cookbooks/ceilometer/recipes/common.rb +++ b/chef/cookbooks/ceilometer/recipes/common.rb @@ -129,6 +129,18 @@ end end +template "/etc/ceilometer/polling_pipeline.yaml" do + source "polling_pipeline.yaml.erb" + owner "root" + group "root" + mode "0644" + variables( + swift_interval: node[:ceilometer][:swift_interval], + monasca_api_url: monasca_api_url + ) + notifies :restart, "service[swift-proxy]" if is_swift_proxy +end + template "/etc/ceilometer/event_pipeline.yaml" do source "event_pipeline.yaml.erb" owner "root" diff --git a/chef/cookbooks/ceilometer/templates/default/ceilometer.conf.erb b/chef/cookbooks/ceilometer/templates/default/ceilometer.conf.erb index 7eb2675fff..629d3c06dc 100644 --- a/chef/cookbooks/ceilometer/templates/default/ceilometer.conf.erb +++ b/chef/cookbooks/ceilometer/templates/default/ceilometer.conf.erb @@ -54,10 +54,10 @@ interface = internalURL auth_type = password auth_url = <%= @keystone_settings['internal_auth_url'] %> project_name = <%= @monasca_project %> -default_domain_id = <%= @keystone_settings["admin_domain_id"] %> -default_domain_name = <%= @keystone_settings["admin_domain"] %> username = <%= @keystone_settings['service_user'] %> password = <%= @keystone_settings['service_password'] %> +user_domain_name = <%= @keystone_settings["admin_domain"] %> +project_domain_name = <%= @keystone_settings["admin_domain"]%> [service_types] neutron_lbaas_version = v2 @@ -105,3 +105,6 @@ service_region_name= <%= @keystone_settings['endpoint_region'] %> [publisher_notifier] metering_topic=metering + +[polling] +cfg_file=/etc/ceilometer/polling_pipeline.yaml \ No newline at end of file diff --git a/chef/cookbooks/ceilometer/templates/default/polling_pipeline.yaml.erb b/chef/cookbooks/ceilometer/templates/default/polling_pipeline.yaml.erb new file mode 100644 index 0000000000..691cfa70f3 --- /dev/null +++ b/chef/cookbooks/ceilometer/templates/default/polling_pipeline.yaml.erb @@ -0,0 +1,15 @@ +--- +sources: + - name: swift_source + interval: <%= @swift_interval %> + meters: + - "storage.objects" + - "storage.objects.size" + - "storage.objects.containers" + sinks: + - meter_sink +sinks: + - name: meter_sink + transformers: + publishers: + - monasca://<%= @monasca_api_url %>