Add filebeats setup for designate
Change-Id: Iecd5f63dea6a3748455d1dfeeb6e4f96562eb252
This commit is contained in:
parent
46412a62de
commit
8fb8c0bc04
@ -109,6 +109,11 @@
|
|||||||
path: /var/lib/rabbitmq
|
path: /var/lib/rabbitmq
|
||||||
register: rabbitmq
|
register: rabbitmq
|
||||||
|
|
||||||
|
- name: Check for designate
|
||||||
|
stat:
|
||||||
|
path: /var/log/designate
|
||||||
|
register: designate
|
||||||
|
|
||||||
- name: Set discovery facts
|
- name: Set discovery facts
|
||||||
set_fact:
|
set_fact:
|
||||||
apache_enabled: "{{ (apache2.stat.exists | bool) or (httpd.stat.exists | bool) }}"
|
apache_enabled: "{{ (apache2.stat.exists | bool) or (httpd.stat.exists | bool) }}"
|
||||||
@ -126,6 +131,7 @@
|
|||||||
octavia_enabled: "{{ (octavia.stat.exists | bool) or (inventory_hostname in groups['octavia_all'] | default([])) or (((groups[inventory_hostname + '-host_containers'] | default([])) | select('match', '.*octavia.*') | list | length) > 0) }}"
|
octavia_enabled: "{{ (octavia.stat.exists | bool) or (inventory_hostname in groups['octavia_all'] | default([])) or (((groups[inventory_hostname + '-host_containers'] | default([])) | select('match', '.*octavia.*') | list | length) > 0) }}"
|
||||||
swift_enabled: "{{ (swift.stat.exists | bool) or (inventory_hostname in groups['swift_all'] | default([])) or (((groups[inventory_hostname + '-host_containers'] | default([])) | select('match', '.*swift.*') | list | length) > 0) }}"
|
swift_enabled: "{{ (swift.stat.exists | bool) or (inventory_hostname in groups['swift_all'] | default([])) or (((groups[inventory_hostname + '-host_containers'] | default([])) | select('match', '.*swift.*') | list | length) > 0) }}"
|
||||||
rabbitmq_enabled: "{{ (rabbitmq.stat.exists | bool) or (inventory_hostname in groups['rabbitmq_all'] | default([])) or (((groups[inventory_hostname + '-host_containers'] | default([])) | select('match', '.*rabbit.*') | list | length) > 0) }}"
|
rabbitmq_enabled: "{{ (rabbitmq.stat.exists | bool) or (inventory_hostname in groups['rabbitmq_all'] | default([])) or (((groups[inventory_hostname + '-host_containers'] | default([])) | select('match', '.*rabbit.*') | list | length) > 0) }}"
|
||||||
|
designate_enabled: "{{ (designate.stat.exists | bool) or (inventory_hostname in groups['designate_all'] | default([])) or (((groups[inventory_hostname + '-host_containers'] | default([])) | select('match', '.*designate.*') | list | length) > 0) }}"
|
||||||
|
|
||||||
|
|
||||||
post_tasks:
|
post_tasks:
|
||||||
|
@ -285,6 +285,50 @@ filebeat.prospectors:
|
|||||||
# * stdin: Reads the standard in
|
# * stdin: Reads the standard in
|
||||||
|
|
||||||
#------------------------------ Log prospector --------------------------------
|
#------------------------------ Log prospector --------------------------------
|
||||||
|
- type: log
|
||||||
|
|
||||||
|
# Change to true to enable this prospector configuration.
|
||||||
|
enabled: {{ designate_enabled | bool }}
|
||||||
|
|
||||||
|
# Paths that should be crawled and fetched. Glob based paths.
|
||||||
|
# To fetch all ".log" files from a specific level of subdirectories
|
||||||
|
# /var/log/*/*.log can be used.
|
||||||
|
# For each file found under this path, a harvester is started.
|
||||||
|
# Make sure not file is defined twice as this can lead to unexpected behaviour.
|
||||||
|
paths:
|
||||||
|
- /var/log/designate/*.log
|
||||||
|
- /openstack/log/*designate*/*.log
|
||||||
|
|
||||||
|
### Multiline options
|
||||||
|
|
||||||
|
# The regexp Pattern that has to be matched. The example pattern matches all lines starting with [
|
||||||
|
multiline.pattern: '^[0-9-]{10} +[0-9:\.]+ +[0-9]+ +[A-Z]+ +[A-Za-z0-9\._]+ \[|Traceback'
|
||||||
|
|
||||||
|
# Defines if the pattern set under pattern should be negated or not. Default is false.
|
||||||
|
multiline.negate: true
|
||||||
|
|
||||||
|
# Match can be set to "after" or "before". It is used to define if lines should be append to a pattern
|
||||||
|
# that was (not) matched before or after or as long as a pattern is not matched based on negate.
|
||||||
|
# Note: After is the equivalent to previous and before is the equivalent to to next in Logstash
|
||||||
|
multiline.match: after
|
||||||
|
|
||||||
|
# The maximum number of lines that are combined to one event.
|
||||||
|
# In case there are more the max_lines the additional lines are discarded.
|
||||||
|
# Default is 500
|
||||||
|
multiline.max_lines: 500
|
||||||
|
|
||||||
|
# After the defined timeout, an multiline event is sent even if no new pattern was found to start a new event
|
||||||
|
# Default is 5s.
|
||||||
|
multiline.timeout: 5s
|
||||||
|
|
||||||
|
# Optional additional fields. These fields can be freely picked
|
||||||
|
# to add additional information to the crawled log files for filtering
|
||||||
|
tags:
|
||||||
|
- openstack
|
||||||
|
- designate
|
||||||
|
|
||||||
|
symlinks: false
|
||||||
|
|
||||||
- type: log
|
- type: log
|
||||||
|
|
||||||
# Change to true to enable this prospector configuration.
|
# Change to true to enable this prospector configuration.
|
||||||
|
Loading…
Reference in New Issue
Block a user