From e10e19f35a95442b8697edd5fbb0a6bc28b7d029 Mon Sep 17 00:00:00 2001 From: Adar Nimrod <nimrod@shore.co.il> Date: Sun, 16 May 2021 23:44:57 +0300 Subject: [PATCH] Setup journalbeat. Pretend it's filebeat, so the logs in Kibana are unified. --- docker-compose.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 0eb96c9..ae4da59 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -43,6 +43,19 @@ services: links: *beat_links restart: on-failure + journalbeat_setup: + command: > + journalbeat setup + -E output.elasticsearch.hosts=['elasticsearch:9200'] + -E output.elasticsearch.index='filebeat-%{[agent.version]}-%{+yyyy.MM.dd}' + -E setup.kibana.host=kibana:5601 + -E setup.ilm.overwrite=true + -E setup.template.name='filebeat-%{[agent.version]}' + -E setup.template.pattern='filebeat-%{[agent.version]}-%{+yyyy.MM.dd}' + image: docker.elastic.co/beats/journalbeat-oss:7.12.1 + links: *beat_links + restart: on-failure + kibana: environment: ELASTICSEARCH_HOSTS: | -- GitLab