Improve Apache logging
Currently we don't put global Apache error logs into /var/log/kolla, this change adds statements that redirect those logs there. Adapted the logfile names to catch into openstack wsgi logging fluentd input config and existing logrotate cron entries. Change-Id: I21216e688a1993239e3e81411a4e8b6f13e138c2
This commit is contained in:
parent
f52082abf7
commit
3f55b87069
@ -1,3 +1,4 @@
|
||||
{% set aodh_log_dir = '/var/log/kolla/aodh' %}
|
||||
{% if aodh_install_type == 'binary' %}
|
||||
{% set python_path = '/usr/lib/python3/dist-packages' if kolla_base_distro in ['debian', 'ubuntu'] else '/usr/lib/python2.7/site-packages' %}
|
||||
{% else %}
|
||||
@ -10,6 +11,11 @@ ServerSignature Off
|
||||
ServerTokens Prod
|
||||
TraceEnable off
|
||||
|
||||
ErrorLog "{{ aodh_log_dir }}/apache-error.log"
|
||||
<IfModule log_config_module>
|
||||
CustomLog "{{ aodh_log_dir }}/apache-access.log" common
|
||||
</IfModule>
|
||||
|
||||
{% if aodh_logging_debug | bool %}
|
||||
LogLevel info
|
||||
{% endif %}
|
||||
@ -24,10 +30,10 @@ LogLevel info
|
||||
|
||||
<VirtualHost *:{{ aodh_api_listen_port }}>
|
||||
## Logging
|
||||
ErrorLog "/var/log/kolla/aodh/aodh_wsgi_error.log"
|
||||
ErrorLog "{{ aodh_log_dir }}/aodh_wsgi_error.log"
|
||||
ServerSignature Off
|
||||
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b %D \"%{Referer}i\" \"%{User-Agent}i\"" logformat
|
||||
CustomLog "/var/log/kolla/aodh/aodh_wsgi_access.log" logformat
|
||||
CustomLog "{{ aodh_log_dir }}/aodh_wsgi_access.log" logformat
|
||||
WSGIApplicationGroup %{GLOBAL}
|
||||
WSGIDaemonProcess aodh group=aodh processes={{ openstack_service_workers }} threads=1 user=aodh python-path={{ python_path }}
|
||||
WSGIProcessGroup aodh
|
||||
|
@ -1,3 +1,4 @@
|
||||
{% set cloudkitty_log_dir = '/var/log/kolla/cloudkitty' %}
|
||||
{% set python_path = '/usr/lib/python2.7/site-packages' if cloudkitty_install_type == 'binary' else '/var/lib/kolla/venv/lib/python2.7/site-packages' %}
|
||||
{% set binary_path = '/usr/bin' if cloudkitty_install_type == 'binary' else '/var/lib/kolla/venv/bin' %}
|
||||
Listen {{ api_interface_address | put_address_in_context('url') }}:{{ cloudkitty_api_port }}
|
||||
@ -6,15 +7,20 @@ ServerSignature Off
|
||||
ServerTokens Prod
|
||||
TraceEnable off
|
||||
|
||||
ErrorLog "{{ cloudkitty_log_dir }}/apache-error.log"
|
||||
<IfModule log_config_module>
|
||||
CustomLog "{{ cloudkitty_log_dir }}/apache-access.log" common
|
||||
</IfModule>
|
||||
|
||||
{% if cloudkitty_logging_debug | bool %}
|
||||
LogLevel info
|
||||
{% endif %}
|
||||
|
||||
<VirtualHost *:{{ cloudkitty_api_port }}>
|
||||
|
||||
ErrorLog "/var/log/kolla/cloudkitty/cloudkitty-api-error.log"
|
||||
ErrorLog "{{ cloudkitty_log_dir }}/cloudkitty-api-error.log"
|
||||
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b %D \"%{Referer}i\" \"%{User-Agent}i\"" logformat
|
||||
CustomLog "/var/log/kolla/cloudkitty/cloudkitty-api-access.log" logformat
|
||||
CustomLog "{{ cloudkitty_log_dir }}/cloudkitty-api-access.log" logformat
|
||||
WSGIApplicationGroup %{GLOBAL}
|
||||
WSGIDaemonProcess cloudkitty group=cloudkitty processes={{ openstack_service_workers }} threads=1 user=cloudkitty python-path={{ python_path }}
|
||||
WSGIProcessGroup cloudkitty
|
||||
|
@ -6,6 +6,11 @@ ServerSignature Off
|
||||
ServerTokens Prod
|
||||
TraceEnable off
|
||||
|
||||
ErrorLog "{{ freezer_log_dir }}/apache-error.log"
|
||||
<IfModule log_config_module>
|
||||
CustomLog "{{ freezer_log_dir }}/apache-access.log" common
|
||||
</IfModule>
|
||||
|
||||
{% if freezer_logging_debug | bool %}
|
||||
LogLevel info
|
||||
{% endif %}
|
||||
|
@ -1,3 +1,4 @@
|
||||
{% set gnocchi_log_dir = '/var/log/kolla/gnocchi' %}
|
||||
{% if gnocchi_install_type == 'binary' %}
|
||||
{% set python_path = '/usr/lib/python3/dist-packages' if kolla_base_distro in ['debian', 'ubuntu'] else '/usr/lib/python2.7/site-packages' %}
|
||||
{% else %}
|
||||
@ -10,15 +11,20 @@ ServerSignature Off
|
||||
ServerTokens Prod
|
||||
TraceEnable off
|
||||
|
||||
ErrorLog "{{ gnocchi_log_dir }}/apache-error.log"
|
||||
<IfModule log_config_module>
|
||||
CustomLog "{{ gnocchi_log_dir }}/apache-access.log" common
|
||||
</IfModule>
|
||||
|
||||
{% if gnocchi_logging_debug | bool %}
|
||||
LogLevel info
|
||||
{% endif %}
|
||||
|
||||
<VirtualHost *:{{ gnocchi_api_listen_port }}>
|
||||
|
||||
ErrorLog "/var/log/kolla/gnocchi/gnocchi-api-error.log"
|
||||
ErrorLog "{{ gnocchi_log_dir }}/gnocchi-api-error.log"
|
||||
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b %D \"%{Referer}i\" \"%{User-Agent}i\"" logformat
|
||||
CustomLog "/var/log/kolla/gnocchi/gnocchi-api-access.log" logformat
|
||||
CustomLog "{{ gnocchi_log_dir }}/gnocchi-api-access.log" logformat
|
||||
WSGIApplicationGroup %{GLOBAL}
|
||||
WSGIDaemonProcess gnocchi group=gnocchi processes={{ openstack_service_workers }} threads=1 user=gnocchi python-path={{ python_path }}
|
||||
WSGIProcessGroup gnocchi
|
||||
|
@ -12,6 +12,11 @@ ServerSignature Off
|
||||
ServerTokens Prod
|
||||
TraceEnable off
|
||||
|
||||
ErrorLog "{{ keystone_log_dir }}/apache-error.log"
|
||||
<IfModule log_config_module>
|
||||
CustomLog "{{ keystone_log_dir }}/apache-access.log" common
|
||||
</IfModule>
|
||||
|
||||
{% if keystone_logging_debug | bool %}
|
||||
LogLevel info
|
||||
{% endif %}
|
||||
|
@ -1,3 +1,4 @@
|
||||
{% set masakari_log_dir = '/var/log/kolla/masakari' %}
|
||||
{% if kolla_base_distro in ['debian', 'ubuntu'] %}
|
||||
{% set python_path = '/usr/lib/python3/dist-packages' if masakari_install_type == 'binary' else '/var/lib/kolla/venv/lib/python' + distro_python_version + '/site-packages' %}
|
||||
{% else %}
|
||||
@ -11,6 +12,11 @@ ServerSignature Off
|
||||
ServerTokens Prod
|
||||
TraceEnable off
|
||||
|
||||
ErrorLog "{{ masakari_log_dir }}/apache-error.log"
|
||||
<IfModule log_config_module>
|
||||
CustomLog "{{ masakari_log_dir }}/apache-access.log" common
|
||||
</IfModule>
|
||||
|
||||
{% if masakari_logging_debug | bool %}
|
||||
LogLevel info
|
||||
{% endif %}
|
||||
@ -24,9 +30,9 @@ LogLevel info
|
||||
|
||||
<VirtualHost *:{{ masakari_api_port }}>
|
||||
## Logging
|
||||
ErrorLog "/var/log/kolla/masakari/masakari_wsgi_error.log"
|
||||
ErrorLog "{{ masakari_log_dir }}/masakari_wsgi_error.log"
|
||||
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b %D \"%{Referer}i\" \"%{User-Agent}i\"" logformat
|
||||
CustomLog "/var/log/kolla/masakari/masakari_wsgi_access.log" logformat
|
||||
CustomLog "{{ masakari_log_dir }}/masakari_wsgi_access.log" logformat
|
||||
WSGIApplicationGroup %{GLOBAL}
|
||||
WSGIDaemonProcess masakari group=masakari processes={{ openstack_service_workers }} threads=1 user=masakari python-path={{ python_path }}
|
||||
WSGIProcessGroup masakari
|
||||
|
@ -1,3 +1,4 @@
|
||||
{% set monasca_log_path = '/var/log/kolla/monasca' %}
|
||||
{% set python_path = '/usr/lib/python2.7/site-packages' if monasca_install_type == 'binary' else '/var/lib/kolla/venv/lib/python2.7/site-packages' %}
|
||||
{% set wsgi_path = '/usr/bin' if monasca_install_type == 'binary' else '/monasca-api/monasca_api/api' %}
|
||||
|
||||
@ -5,15 +6,20 @@ Listen {{ api_interface_address | put_address_in_context('url') }}:{{ monasca_ap
|
||||
|
||||
TraceEnable off
|
||||
|
||||
ErrorLog "{{ monasca_log_dir }}/apache-api-error.log"
|
||||
<IfModule log_config_module>
|
||||
CustomLog "{{ monasca_log_dir }}/apache-api-access.log" common
|
||||
</IfModule>
|
||||
|
||||
{% if monasca_logging_debug | bool %}
|
||||
LogLevel info
|
||||
{% endif %}
|
||||
|
||||
<VirtualHost *:{{ monasca_api_port }}>
|
||||
|
||||
ErrorLog "/var/log/kolla/monasca/monasca-api-error.log"
|
||||
ErrorLog "{{ monasca_log_dir }}/monasca-api-error.log"
|
||||
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b %D \"%{Referer}i\" \"%{User-Agent}i\"" logformat
|
||||
CustomLog "/var/log/kolla/monasca/monasca-api-access.log" logformat
|
||||
CustomLog "{{ monasca_log_dir }}/monasca-api-access.log" logformat
|
||||
WSGIApplicationGroup %{GLOBAL}
|
||||
WSGIDaemonProcess monasca-api group=monasca processes={{ openstack_service_workers }} threads=1 user=monasca python-path={{ python_path }}
|
||||
WSGIProcessGroup monasca-api
|
||||
|
@ -1,3 +1,4 @@
|
||||
{% set monasca_log_path = '/var/log/kolla/monasca' %}
|
||||
{% set python_path = '/usr/lib/python2.7/site-packages' if monasca_install_type == 'binary' else '/var/lib/kolla/venv/lib/python2.7/site-packages' %}
|
||||
{% set wsgi_path = '/usr/bin' if monasca_install_type == 'binary' else '/monasca-log/monasca_log_api/app' %}
|
||||
|
||||
@ -5,15 +6,20 @@ Listen {{ api_interface_address | put_address_in_context('url') }}:{{ monasca_lo
|
||||
|
||||
TraceEnable off
|
||||
|
||||
ErrorLog "{{ monasca_log_dir }}/apache-logapi-error.log"
|
||||
<IfModule log_config_module>
|
||||
CustomLog "{{ monasca_log_dir }}/apache-logapi-access.log" common
|
||||
</IfModule>
|
||||
|
||||
{% if monasca_logging_debug | bool %}
|
||||
LogLevel info
|
||||
{% endif %}
|
||||
|
||||
<VirtualHost *:{{ monasca_log_api_port }}>
|
||||
|
||||
ErrorLog "/var/log/kolla/monasca/monasca-log-api-error.log"
|
||||
ErrorLog "{{ monasca_log_dir }}/monasca-log-api-error.log"
|
||||
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b %D \"%{Referer}i\" \"%{User-Agent}i\"" logformat
|
||||
CustomLog "/var/log/kolla/monasca/monasca-log-api-access.log" logformat
|
||||
CustomLog "{{ monasca_log_dir }}/monasca-log-api-access.log" logformat
|
||||
WSGIApplicationGroup %{GLOBAL}
|
||||
WSGIDaemonProcess monasca-log-api group=monasca processes={{ openstack_service_workers }} threads=1 user=monasca python-path={{ python_path }}
|
||||
WSGIProcessGroup monasca-log-api
|
||||
|
@ -1,3 +1,4 @@
|
||||
{% set panko_log_dir = '/var/log/kolla/panko' %}
|
||||
{% set python_path = '/usr/lib/python2.7/site-packages' if panko_install_type == 'binary' else '/var/lib/kolla/venv/lib/python2.7/site-packages' %}
|
||||
{% set binary_path = '/usr/bin' if panko_install_type == 'binary' else '/var/lib/kolla/venv/bin' %}
|
||||
Listen {{ api_interface_address | put_address_in_context('url') }}:{{ panko_api_port }}
|
||||
@ -6,6 +7,11 @@ ServerSignature Off
|
||||
ServerTokens Prod
|
||||
TraceEnable off
|
||||
|
||||
ErrorLog "{{ panko_log_dir }}/apache-error.log"
|
||||
<IfModule log_config_module>
|
||||
CustomLog "{{ panko_log_dir }}/apache-access.log" common
|
||||
</IfModule>
|
||||
|
||||
{% if panko_logging_debug | bool %}
|
||||
LogLevel info
|
||||
{% endif %}
|
||||
@ -18,9 +24,9 @@ LogLevel info
|
||||
|
||||
<VirtualHost *:{{ panko_api_port }}>
|
||||
|
||||
ErrorLog "/var/log/kolla/panko/panko-api-error.log"
|
||||
ErrorLog "{{ panko_log_dir }}/panko-api-error.log"
|
||||
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b %D \"%{Referer}i\" \"%{User-Agent}i\"" logformat
|
||||
CustomLog "/var/log/kolla/panko/panko-api-access.log" logformat
|
||||
CustomLog "{{ panko_log_dir }}/panko-api-access.log" logformat
|
||||
WSGIApplicationGroup %{GLOBAL}
|
||||
WSGIDaemonProcess panko group=panko processes={{ openstack_service_workers }} threads=1 user=panko python-path={{ python_path }}
|
||||
WSGIProcessGroup panko
|
||||
|
@ -1,3 +1,4 @@
|
||||
{% set qinling_log_dir = '/var/log/kolla/qinling' %}
|
||||
{% if kolla_base_distro == 'ubuntu' %}
|
||||
{% set python_path = '/usr/lib/python3/dist-packages' if qinling_install_type == 'binary' else '/var/lib/kolla/venv/lib/python3.6/site-packages' %}
|
||||
{% else %}
|
||||
@ -10,6 +11,11 @@ ServerSignature Off
|
||||
ServerTokens Prod
|
||||
TraceEnable off
|
||||
|
||||
ErrorLog "{{ qinling_log_dir }}/apache-error.log"
|
||||
<IfModule log_config_module>
|
||||
CustomLog "{{ qinling_log_dir }}/apache-access.log" common
|
||||
</IfModule>
|
||||
|
||||
{% if qinling_logging_debug | bool %}
|
||||
LogLevel info
|
||||
{% endif %}
|
||||
@ -27,9 +33,9 @@ LogLevel info
|
||||
</Directory>
|
||||
|
||||
## Logging
|
||||
ErrorLog "/var/log/kolla/qinling/qinling_api_wsgi_error.log"
|
||||
ErrorLog "{{ qinling_log_dir }}/qinling_api_wsgi_error.log"
|
||||
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b %D \"%{Referer}i\" \"%{User-Agent}i\"" logformat
|
||||
CustomLog "/var/log/kolla/qinling/qinling_api_wsgi_access.log" logformat
|
||||
CustomLog "{{ qinling_log_dir }}/qinling_api_wsgi_access.log" logformat
|
||||
WSGIApplicationGroup %{GLOBAL}
|
||||
WSGIDaemonProcess qinling group=qinling processes={{ openstack_service_workers }} threads=1 user=qinling python-path={{ python_path }}
|
||||
WSGIProcessGroup qinling
|
||||
|
@ -1,3 +1,4 @@
|
||||
{% set vitrage_log_dir = '/var/log/kolla/vitrage' %}
|
||||
{% set python_path = '/usr/lib/python2.7/site-packages' if vitrage_install_type == 'binary' else '/var/lib/kolla/venv/lib/python2.7/site-packages' %}
|
||||
Listen {{ 'api' | kolla_address | put_address_in_context('url') }}:{{ vitrage_api_port }}
|
||||
|
||||
@ -5,6 +6,11 @@ ServerSignature Off
|
||||
ServerTokens Prod
|
||||
TraceEnable off
|
||||
|
||||
ErrorLog "{{ vitrage_log_dir }}/apache-error.log"
|
||||
<IfModule log_config_module>
|
||||
CustomLog "{{ vitrage_log_dir }}/apache-access.log" common
|
||||
</IfModule>
|
||||
|
||||
{% if vitrage_logging_debug | bool %}
|
||||
LogLevel info
|
||||
{% endif %}
|
||||
@ -23,9 +29,9 @@ LogLevel info
|
||||
</Directory>
|
||||
|
||||
## Logging
|
||||
ErrorLog "/var/log/kolla/vitrage/vitrage_wsgi_error.log"
|
||||
ErrorLog "{{ vitrage_log_dir }}/vitrage_wsgi_error.log"
|
||||
ServerSignature Off
|
||||
CustomLog "/var/log/kolla/vitrage/vitrage_wsgi_access.log" combined
|
||||
CustomLog "{{ vitrage_log_dir }}/vitrage_wsgi_access.log" combined
|
||||
WSGIApplicationGroup %{GLOBAL}
|
||||
WSGIDaemonProcess vitrage group=vitrage processes={{ openstack_service_workers }} threads=1 user=vitrage python-path={{ python_path }}
|
||||
WSGIProcessGroup vitrage
|
||||
|
@ -1,3 +1,4 @@
|
||||
{% set zun_log_dir = '/var/log/kolla/zun' %}
|
||||
{% set python_path = '/usr/lib/python2.7/site-packages' if zun_install_type == 'binary' else '/var/lib/kolla/venv/lib/python2.7/site-packages' %}
|
||||
Listen {{ api_interface_address | put_address_in_context('url') }}:{{ zun_api_port }}
|
||||
|
||||
@ -5,6 +6,11 @@ ServerSignature Off
|
||||
ServerTokens Prod
|
||||
TraceEnable off
|
||||
|
||||
ErrorLog "{{ zun_log_dir }}/apache-error.log"
|
||||
<IfModule log_config_module>
|
||||
CustomLog "{{ zun_log_dir }}/apache-access.log" common
|
||||
</IfModule>
|
||||
|
||||
{% if zun_logging_debug | bool %}
|
||||
LogLevel info
|
||||
{% endif %}
|
||||
@ -23,10 +29,10 @@ LogLevel info
|
||||
</Directory>
|
||||
|
||||
## Logging
|
||||
ErrorLog "/var/log/kolla/zun/zun_api_wsgi_error.log"
|
||||
ErrorLog "{{ zun_log_dir }}/zun_api_wsgi_error.log"
|
||||
ServerSignature Off
|
||||
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b %D \"%{Referer}i\" \"%{User-Agent}i\"" logformat
|
||||
CustomLog "/var/log/kolla/zun/zun_api_wsgi_access.log" logformat
|
||||
CustomLog "{{ zun_log_dir }}/zun_api_wsgi_access.log" logformat
|
||||
WSGIApplicationGroup %{GLOBAL}
|
||||
WSGIDaemonProcess zun group=zun processes={{ openstack_service_workers }} threads=1 user=zun python-path={{ python_path }}
|
||||
WSGIProcessGroup zun
|
||||
|
Loading…
Reference in New Issue
Block a user