Enable default nginx paths on hosts where nginx is running
The nginx module setup in filebeat currently only looks for nginx logs within containers. This commit also enables the default nginx log paths (/var/log/nginx/*.log) when nginx is running directly on the physical host. This allows e.g. filebeat to access nginx logs from Kibana when kibana is not running in an openstack container. Change-Id: Ieec4c185206a0d1d44e04d1667a6ecdfd18bb46e
This commit is contained in:
parent
2a40936187
commit
a4181c96ae
@ -84,6 +84,7 @@
|
||||
logstash_enabled: "{{ ((ansible_facts.services['logstash.service'] | default({}) )['state'] | default('')) == 'running' }}"
|
||||
kibana_enabled: "{{ ((ansible_facts.services['kibana.service'] | default({}) )['state'] | default('')) == 'running' }}"
|
||||
haproxy_enabled: "{{ ((ansible_facts.services['haproxy.service'] | default({}) )['state'] | default('')) == 'running' }}"
|
||||
nginx_enabled: "{{ ((ansible_facts.services['nginx.service'] | default({}) )['state'] | default('')) == 'running' }}"
|
||||
|
||||
- name: Drop Filebeat conf file
|
||||
template:
|
||||
|
@ -324,6 +324,10 @@ filebeat.modules:
|
||||
var.paths:
|
||||
- /openstack/log/*repo_container*/nginx/*access.log
|
||||
- /openstack/log/*keystone*/nginx/*access.log
|
||||
{% if (nginx_enabled | default(false) | bool ) %}
|
||||
- var/log/nginx/*access.log
|
||||
{% endif %}
|
||||
|
||||
# Input configuration (advanced). Any input configuration option
|
||||
# can be added under this section.
|
||||
#input:
|
||||
@ -340,6 +344,9 @@ filebeat.modules:
|
||||
var.paths:
|
||||
- /openstack/log/*repo_container*/nginx/*error.log
|
||||
- /openstack/log/*keystone*/nginx/*error.log
|
||||
{% if (nginx_enabled | default(false) | bool ) %}
|
||||
- var/log/nginx/*error.log
|
||||
{% endif %}
|
||||
|
||||
# Input configuration (advanced). Any input configuration option
|
||||
# can be added under this section.
|
||||
|
Loading…
x
Reference in New Issue
Block a user