Merge "Add Journalbeat support for OS LXC containers"

This commit is contained in:
Zuul 2020-03-11 11:54:01 +00:00 committed by Gerrit Code Review
commit 246362adf6
2 changed files with 11 additions and 1 deletions

View File

@ -77,6 +77,16 @@
notify:
- Enable and restart journalbeat
- name: Gather list of OS container journals
find:
path: "/var/log/journal/"
file_type: directory
register: journal_log_dirs
- name: Set container journal paths
set_fact:
journal_paths: "{{ journal_log_dirs.files | map(attribute='path') | list }}"
- name: Drop journalbeat configs
template:
src: "{{ item.src }}"

View File

@ -17,7 +17,7 @@ journalbeat.inputs:
# Paths that should be crawled and fetched. Possible values files and directories.
# When setting a directory, all journals under it are merged.
# When empty starts to read from local journal.
- paths: ["/var/log/journal"]
- paths: {{ journal_paths | to_json }}
# The number of seconds to wait before trying to read again from journals.
backoff: 10s