Skip to content
This repository was archived by the owner on May 3, 2024. It is now read-only.

Commit 2b930f3

Browse files
authored
Merge pull request #19 from shazChaudhry/6.4.0
6.4.0
2 parents f9e35d8 + c6ab9d1 commit 2b930f3

File tree

2 files changed

+42
-10
lines changed

2 files changed

+42
-10
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ SSH in to the master node of the Docker Swarm cluster allocated to running Elast
4949
* `cd docker-elastic`
5050

5151
* Deploy Elastic stack by running the following commands:
52-
* `export ELASTIC_VERSION=6.3.2`
52+
* `export ELASTIC_VERSION=6.4.0`
5353
* `docker network create --driver overlay elastic`
5454
* `docker stack deploy --compose-file docker-compose.yml elastic` _(This will deploy a reverse proxy, logstash, Kibana and 2x Elasticsearch instances in Master / data nodes configuration. Please note that Elasticsearch is configured to start as a global service which means data nodes will be scalled out automatically as soon as new nodes are added to the docker swarm cluster. Here is an explaination on various Elasticsearch cluster nodes: https://discuss.elastic.co/t/node-types-in-an-elasticsearch-cluster/25488)_
5555
* Check status of the stack services by running the following commands:
@@ -62,7 +62,7 @@ SSH in to the master node of the Docker Swarm cluster allocated to running Elast
6262
SSH in to the master node of the Docker Swarm cluster allocated to running containerized custom applicatins and beats. Clone this repo and change directory as per the instructions in the previous section
6363

6464
Execute the following commands to deploy filebeat and metricbeat:
65-
* `export ELASTIC_VERSION=6.3.2`
65+
* `export ELASTIC_VERSION=6.4.0`
6666
* `docker network create --driver overlay elastic`
6767
* Edit "filebeat-docker-compose.yml" file. Change environment variables for Kibana and Elasticseaerch hosts
6868
* `docker stack deploy --compose-file filebeat-docker-compose.yml filebeat` _(Filebeat starts as a global service on all docker swarm nodes. It is only configured to picks up container logs for all services at '`/var/lib/docker/containers/*/*.log`' (container stdout and stderr logs) and forward thtem to Elasticsearch. These logs will then be available under filebeat index in Kibana. You will need to add additional configurations for other log locations. You may wish to read [Docker Reference Architecture: Docker Logging Design and Best Practices](https://success.docker.com/article/docker-reference-architecture-docker-logging-design-and-best-practices))_

elk/beats/filebeat/config/filebeat.yml

Lines changed: 40 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,24 +18,56 @@ filebeat.modules:
1818
log:
1919
enabled: false
2020

21-
#=========================== Filebeat prospectors ==============================
21+
#========================== Filebeat autodiscover ==============================
22+
# Autodiscover allows you to detect changes in the system and spawn new modules or inputs as they happen.
23+
filebeat.autodiscover:
24+
# Autodiscover docker containers and parse logs
25+
providers:
26+
- type: docker
27+
templates:
28+
config:
29+
- type: docker
30+
containers.ids:
31+
- "${data.docker.container.id}"
32+
33+
#=========================== Filebeat inputs ==============================
2234
filebeat.inputs:
23-
- type: log
35+
#------------------------------ Docker input --------------------------------
36+
- type: docker
2437
enabled: true
38+
containers.ids:
39+
- "*"
2540
paths:
26-
- '/var/lib/docker/containers/*/*.log'
27-
json.message_key: log
28-
json.add_error_key: true
29-
json.keys_under_root: true
41+
- /var/lib/docker/containers/${data.docker.container.id}/*.log
42+
# json.message_key: log
43+
# json.add_error_key: true
44+
# json.keys_under_root: true
45+
exclude_lines: ["^\\s+[\\-`('.|_]"] # drop asciiart lines
46+
multiline.pattern: "^\t|^[[:space:]]+(at|...)|^Caused by:"
47+
multiline.match: after
3048
processors:
3149
- add_docker_metadata: ~
3250
- add_cloud_metadata: ~
3351
- add_locale: ~
34-
multiline.pattern: "^\t|^[[:space:]]+(at|...)|^Caused by:"
35-
multiline.match: after
52+
53+
#------------------------------ Log input --------------------------------
3654
# - type: log
3755
# enabled: true
3856
# paths:
57+
# - '/var/lib/docker/containers/*/*.log'
58+
# json.message_key: log
59+
# json.add_error_key: true
60+
# json.keys_under_root: true
61+
# processors:
62+
# - add_docker_metadata: ~
63+
# - add_cloud_metadata: ~
64+
# - add_locale: ~
65+
# multiline.pattern: "^\t|^[[:space:]]+(at|...)|^Caused by:"
66+
# multiline.match: after
67+
#
68+
# - type: log
69+
# enabled: false
70+
# paths:
3971
# # path to jenkins build logs
4072
# - /var/lib/docker/volumes/jenkins_home/_data/jobs/*/builds/*/log
4173
# json.message_key: log

0 commit comments

Comments
 (0)