Glance logging to rsyslog
Configure glance to use rsyslog container as logging mechanism Change-Id: I60f604d7a85bb4309b26be03cd6b8aac14840fe7 Implements: bp logging-container
This commit is contained in:
parent
4a75d05de1
commit
943ffd76ed
@ -9,6 +9,12 @@ $RepeatedMsgReduction on
|
|||||||
$template KollaAnsibleFile,"/var/log/kolla_ansible.log"
|
$template KollaAnsibleFile,"/var/log/kolla_ansible.log"
|
||||||
:syslogtag,contains,"ansible" ?KollaAnsibleFile
|
:syslogtag,contains,"ansible" ?KollaAnsibleFile
|
||||||
|
|
||||||
|
$template GlanceApiFile,"/var/log/glance/glance_api.log"
|
||||||
|
:syslogtag,contains,"glance-api" ?GlanceApiFile
|
||||||
|
|
||||||
|
$template GlanceRegistryFile,"/var/log/glance/glance_registry.log"
|
||||||
|
:syslogtag,contains,"glance-registry" ?GlanceRegistryFile
|
||||||
|
|
||||||
$template DynFile,"/var/log/syslog.log"
|
$template DynFile,"/var/log/syslog.log"
|
||||||
*.* ?DynFile
|
*.* ?DynFile
|
||||||
& ~
|
& ~
|
||||||
|
@ -13,7 +13,9 @@
|
|||||||
insecure_registry: "{{ docker_insecure_registry }}"
|
insecure_registry: "{{ docker_insecure_registry }}"
|
||||||
name: glance_registry
|
name: glance_registry
|
||||||
image: "{{ glance_registry_image_full }}"
|
image: "{{ glance_registry_image_full }}"
|
||||||
volumes: "{{ node_config_directory }}/glance-registry/:/opt/kolla/config_files/:ro"
|
volumes:
|
||||||
|
- "{{ node_config_directory }}/glance-registry/:/opt/kolla/config_files/:ro"
|
||||||
|
- "/var/lib/kolla/dev/log:/dev/log"
|
||||||
volumes_from:
|
volumes_from:
|
||||||
- glance_data
|
- glance_data
|
||||||
env:
|
env:
|
||||||
@ -34,7 +36,9 @@
|
|||||||
insecure_registry: "{{ docker_insecure_registry }}"
|
insecure_registry: "{{ docker_insecure_registry }}"
|
||||||
name: glance_api
|
name: glance_api
|
||||||
image: "{{ glance_api_image_full }}"
|
image: "{{ glance_api_image_full }}"
|
||||||
volumes: "{{ node_config_directory }}/glance-api/:/opt/kolla/config_files/:ro"
|
volumes:
|
||||||
|
- "{{ node_config_directory }}/glance-api/:/opt/kolla/config_files/:ro"
|
||||||
|
- "/var/lib/kolla/dev/log:/dev/log"
|
||||||
env:
|
env:
|
||||||
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
|
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
|
||||||
when: inventory_hostname in groups['glance-api']
|
when: inventory_hostname in groups['glance-api']
|
||||||
|
3
ansible/roles/glance/templates/glance-api.conf.j2
Normal file → Executable file
3
ansible/roles/glance/templates/glance-api.conf.j2
Normal file → Executable file
@ -9,6 +9,9 @@ notification_driver = noop
|
|||||||
|
|
||||||
registry_host = {{ kolla_internal_address }}
|
registry_host = {{ kolla_internal_address }}
|
||||||
|
|
||||||
|
use_syslog = True
|
||||||
|
syslog_log_facility = LOG_LOCAL0
|
||||||
|
|
||||||
[database]
|
[database]
|
||||||
connection = mysql://{{ glance_database_user }}:{{ glance_database_password }}@{{ glance_database_address }}/{{ glance_database_name }}
|
connection = mysql://{{ glance_database_user }}:{{ glance_database_password }}@{{ glance_database_address }}/{{ glance_database_name }}
|
||||||
|
|
||||||
|
3
ansible/roles/glance/templates/glance-registry.conf.j2
Normal file → Executable file
3
ansible/roles/glance/templates/glance-registry.conf.j2
Normal file → Executable file
@ -7,6 +7,9 @@ bind_port = {{ glance_registry_port }}
|
|||||||
|
|
||||||
notification_driver = noop
|
notification_driver = noop
|
||||||
|
|
||||||
|
use_syslog = True
|
||||||
|
syslog_log_facility = LOG_LOCAL0
|
||||||
|
|
||||||
[database]
|
[database]
|
||||||
connection = mysql://{{ glance_database_user }}:{{ glance_database_password }}@{{ glance_database_address }}/{{ glance_database_name }}
|
connection = mysql://{{ glance_database_user }}:{{ glance_database_password }}@{{ glance_database_address }}/{{ glance_database_name }}
|
||||||
|
|
||||||
|
@ -1,4 +1,9 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [[ -f "/dev/log" ]]; then
|
||||||
|
rm "/dev/log"
|
||||||
|
fi
|
||||||
|
|
||||||
SOURCE="/opt/kolla/rsyslog/rsyslog.conf"
|
SOURCE="/opt/kolla/rsyslog/rsyslog.conf"
|
||||||
TARGET="/etc/rsyslog.conf"
|
TARGET="/etc/rsyslog.conf"
|
||||||
OWNER="root"
|
OWNER="root"
|
||||||
|
Loading…
Reference in New Issue
Block a user