diff --git a/chef/cookbooks/monasca/templates/default/monasca-reconfigure.erb b/chef/cookbooks/monasca/templates/default/monasca-reconfigure.erb index 5362d18eb9..30d89c8063 100644 --- a/chef/cookbooks/monasca/templates/default/monasca-reconfigure.erb +++ b/chef/cookbooks/monasca/templates/default/monasca-reconfigure.erb @@ -18,6 +18,7 @@ <% if @agent_settings["system_only"] -%> --system_only <% end -%> \ <% if @agent_settings["overwrite_config"] -%> --overwrite <% end -%> \ <% if @agent_settings["ca_file"].length > 0 -%> --ca_file '<%= @agent_settings["ca_file"] %>' <% end -%> \ + --log_dir '<%= @agent_settings["log_dir"] %>' \ --log_level '<%= @agent_settings["log_level"] %>' \ --monasca_statsd_port '<%= @agent_settings["statsd_port"].to_i %>' \ --check_frequency '<%= @agent_settings["check_frequency"].to_i %>' \ diff --git a/chef/data_bags/crowbar/template-monasca.json b/chef/data_bags/crowbar/template-monasca.json index 61115efc1d..ae5904ea88 100644 --- a/chef/data_bags/crowbar/template-monasca.json +++ b/chef/data_bags/crowbar/template-monasca.json @@ -14,6 +14,7 @@ "system_only": false, "overwrite_config": false, "ca_file": "", + "log_dir": "/var/log/monasca-agent/", "log_level": "INFO", "statsd_port": 8125, "check_frequency": 15, diff --git a/chef/data_bags/crowbar/template-monasca.schema b/chef/data_bags/crowbar/template-monasca.schema index 8105eb6456..de8ad99ccb 100644 --- a/chef/data_bags/crowbar/template-monasca.schema +++ b/chef/data_bags/crowbar/template-monasca.schema @@ -30,6 +30,7 @@ "system_only": { "type": "bool", "required": true }, "overwrite_config": { "type": "bool", "required": true }, "ca_file": { "type": "str", "required": true }, + "log_dir": { "type": "str", "required": true }, "log_level": { "type": "str", "required": true }, "statsd_port": { "type": "int", "required": true }, "check_frequency": { "type": "int", "required": true }, diff --git a/crowbar_framework/app/views/barclamp/monasca/_edit_attributes.html.haml b/crowbar_framework/app/views/barclamp/monasca/_edit_attributes.html.haml index 31510cfdda..5f8f92cfc5 100644 --- a/crowbar_framework/app/views/barclamp/monasca/_edit_attributes.html.haml +++ b/crowbar_framework/app/views/barclamp/monasca/_edit_attributes.html.haml @@ -9,6 +9,7 @@ = t(".metric_agent_header") = boolean_field %w(metric_agent system_only) + = string_field %w(metric_agent log_dir) = select_field %w(metric_agent log_level), :collection => :log_levels = integer_field %w(metric_agent statsd_port) = integer_field %w(metric_agent check_frequency) diff --git a/crowbar_framework/config/locales/monasca/en.yml b/crowbar_framework/config/locales/monasca/en.yml index 7ca98ea710..7d0c33b2bd 100644 --- a/crowbar_framework/config/locales/monasca/en.yml +++ b/crowbar_framework/config/locales/monasca/en.yml @@ -32,6 +32,7 @@ en: system_only: 'Setting to true will cause Monasca setup to run in `system_only` mode only, configure the base config and system metrics (cpu, disk, load, memory, network)' insecure: 'Do you want insecure connection?' ca_file: 'Sets the path to the ca certs file if using certificates. Required only if insecure is set to False (ca_file)' + log_dir: 'Log directory' log_level: 'Log level' statsd_port: 'Monasca Statsd port' check_frequency: 'Time to wait between collection runs (check_frequency)'