From 82264ab7d6d178b6d69c84016997cd4df34f112a Mon Sep 17 00:00:00 2001 From: Éric Lemoine Date: Wed, 17 Feb 2016 14:26:19 +0100 Subject: Make Heka collect Heat logs Partially implements: blueprint heka Change-Id: Ie22c4326c6ec2a3426b0c3b8fda4554b1b2541b0 --- ansible/roles/common/templates/heka-openstack.toml.j2 | 2 +- ansible/roles/common/templates/rsyslog.conf.j2 | 9 --------- ansible/roles/heat/tasks/bootstrap.yml | 4 +++- ansible/roles/heat/tasks/start.yml | 6 +++--- ansible/roles/heat/templates/heat.conf.j2 | 5 ++--- 5 files changed, 9 insertions(+), 17 deletions(-) (limited to 'ansible') diff --git a/ansible/roles/common/templates/heka-openstack.toml.j2 b/ansible/roles/common/templates/heka-openstack.toml.j2 index 306904f79..dc35cef18 100644 --- a/ansible/roles/common/templates/heka-openstack.toml.j2 +++ b/ansible/roles/common/templates/heka-openstack.toml.j2 @@ -6,5 +6,5 @@ filename = "lua_decoders/os_openstack_log.lua" type = "LogstreamerInput" decoder = "openstack_log_decoder" log_directory = "/var/log/kolla" -file_match = '(?Pnova|glance|keystone|neutron|cinder)/(?P.*)\.log' +file_match = '(?Pnova|glance|keystone|neutron|cinder|heat)/(?P.*)\.log' differentiator = ["Service", "_", "Program"] diff --git a/ansible/roles/common/templates/rsyslog.conf.j2 b/ansible/roles/common/templates/rsyslog.conf.j2 index 7c7660024..91c2c4b99 100644 --- a/ansible/roles/common/templates/rsyslog.conf.j2 +++ b/ansible/roles/common/templates/rsyslog.conf.j2 @@ -7,15 +7,6 @@ $KLogPermitNonKernelFacility on $ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat $RepeatedMsgReduction on -$template HeatAPIFile,"/var/log/heat/heat-api.log" -:syslogtag,contains,"heat-api" ?HeatAPIFile - -$template HeatAPICfnFile,"/var/log/heat/heat-api-cfn.log" -:syslogtag,contains,"heat-api-cfn" ?HeatAPICfnFile - -$template HeatEngineFile,"/var/log/heat/heat-engine.log" -:syslogtag,contains,"heat-engine" ?HeatEngineFile - $template MuranoEngineFile,"/var/log/murano/murano-engine.log" :syslogtag,contains,"murano-engine" ?MuranoEngineFile diff --git a/ansible/roles/heat/tasks/bootstrap.yml b/ansible/roles/heat/tasks/bootstrap.yml index fa6fde538..8429c0414 100644 --- a/ansible/roles/heat/tasks/bootstrap.yml +++ b/ansible/roles/heat/tasks/bootstrap.yml @@ -53,7 +53,9 @@ labels: BOOTSTRAP: name: "bootstrap_heat" - volumes: "{{ node_config_directory }}/heat-api/:{{ container_config_directory }}/:ro" + volumes: + - "{{ node_config_directory }}/heat-api/:{{ container_config_directory }}/:ro" + - "kolla_logs:/var/log/kolla/" run_once: True delegate_to: "{{ groups['heat-api'][0] }}" when: database_created diff --git a/ansible/roles/heat/tasks/start.yml b/ansible/roles/heat/tasks/start.yml index 6699ab472..7ec4a9fae 100644 --- a/ansible/roles/heat/tasks/start.yml +++ b/ansible/roles/heat/tasks/start.yml @@ -7,7 +7,7 @@ name: "heat_api" volumes: - "{{ node_config_directory }}/heat-api/:{{ container_config_directory }}/:ro" - - "rsyslog_socket:/var/lib/kolla/rsyslog/" + - "kolla_logs:/var/log/kolla/" when: inventory_hostname in groups['heat-api'] - name: Starting heat-api-cfn container @@ -18,7 +18,7 @@ name: "heat_api_cfn" volumes: - "{{ node_config_directory }}/heat-api-cfn/:{{ container_config_directory }}/:ro" - - "rsyslog_socket:/var/lib/kolla/rsyslog/" + - "kolla_logs:/var/log/kolla/" when: inventory_hostname in groups['heat-api-cfn'] - name: Starting heat-engine container @@ -29,5 +29,5 @@ name: "heat_engine" volumes: - "{{ node_config_directory }}/heat-engine/:{{ container_config_directory }}/:ro" - - "rsyslog_socket:/var/lib/kolla/rsyslog/" + - "kolla_logs:/var/log/kolla/" when: inventory_hostname in groups['heat-engine'] diff --git a/ansible/roles/heat/templates/heat.conf.j2 b/ansible/roles/heat/templates/heat.conf.j2 index 5d8afa05e..b581cec01 100644 --- a/ansible/roles/heat/templates/heat.conf.j2 +++ b/ansible/roles/heat/templates/heat.conf.j2 @@ -1,6 +1,8 @@ [DEFAULT] debug = {{ heat_logging_debug }} +log_dir = /var/log/kolla/heat + heat_watch_server_url = {{ public_protocol }}://{{ kolla_external_address }}:{{ heat_api_cfn_port }} heat_metadata_server_url = {{ public_protocol }}://{{ kolla_external_address }}:{{ heat_api_cfn_port }} heat_waitcondition_server_url = {{ public_protocol }}://{{ kolla_external_address }}:{{ heat_api_cfn_port }}/v1/waitcondition @@ -14,9 +16,6 @@ notification_driver = noop deferred_auth_method = trusts trusts_delegated_role = heat_stack_owner -syslog_log_facility=LOG_LOCAL0 -use_syslog=yes - [oslo_messaging_rabbit] rabbit_userid = {{ rabbitmq_user }} rabbit_password = {{ rabbitmq_password }} -- cgit v1.2.3