Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

Commit

Permalink
Merge pull request #568 from jmlrt/filebeat-improvements
Browse files Browse the repository at this point in the history
Filebeat improvements
  • Loading branch information
jmlrt committed Apr 10, 2020
2 parents 9f03b20 + d5c048b commit b3bb665
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 9 deletions.
13 changes: 13 additions & 0 deletions filebeat/examples/6.x/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,16 @@ imageTag: 6.8.8
extraEnvs:
- name: ELASTICSEARCH_HOSTS
value: six-master:9200

filebeatConfig:
filebeat.yml: |
filebeat.inputs:
- type: docker
containers.ids:
- '*'
processors:
- add_kubernetes_metadata:
in_cluster: true
output.elasticsearch:
host: '${NODE_NAME}'
hosts: '${ELASTICSEARCH_HOSTS:elasticsearch-master:9200}'
13 changes: 8 additions & 5 deletions filebeat/examples/security/values.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
filebeatConfig:
filebeat.yml: |
filebeat.inputs:
- type: docker
containers.ids:
- '*'
- type: container
paths:
- /var/log/containers/*.log
processors:
- add_kubernetes_metadata:
in_cluster: true
- add_kubernetes_metadata:
host: ${NODE_NAME}
matchers:
- logs_path:
logs_path: "/var/log/containers/"
output.elasticsearch:
username: '${ELASTICSEARCH_USERNAME}'
Expand Down
6 changes: 6 additions & 0 deletions filebeat/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ spec:
- name: varlibdockercontainers
hostPath:
path: /var/lib/docker/containers
- name: varlog
hostPath:
path: /var/log
- name: varrundockersock
hostPath:
path: /var/run/docker.sock
Expand Down Expand Up @@ -152,6 +155,9 @@ spec:
- name: varlibdockercontainers
mountPath: /var/lib/docker/containers
readOnly: true
- name: varlog
mountPath: /var/log
readOnly: true
# Necessary when using autodiscovery; avoid mounting it otherwise
# See: https://www.elastic.co/guide/en/beats/filebeat/master/configuration-autodiscover.html
- name: varrundockersock
Expand Down
12 changes: 8 additions & 4 deletions filebeat/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,15 @@
filebeatConfig:
filebeat.yml: |
filebeat.inputs:
- type: docker
containers.ids:
- '*'
- type: container
paths:
- /var/log/containers/*.log
processors:
- add_kubernetes_metadata: ~
- add_kubernetes_metadata:
host: ${NODE_NAME}
matchers:
- logs_path:
logs_path: "/var/log/containers/"
output.elasticsearch:
host: '${NODE_NAME}'
Expand Down

0 comments on commit b3bb665

Please sign in to comment.