54 lines
1.3 KiB
YAML
54 lines
1.3 KiB
YAML
|
---
|
||
|
apiVersion: v1
|
||
|
kind: ConfigMap
|
||
|
metadata:
|
||
|
name: filebeat-config
|
||
|
namespace: kube-system
|
||
|
labels:
|
||
|
k8s-app: filebeat
|
||
|
data:
|
||
|
filebeat.yml: |-
|
||
|
filebeat.config:
|
||
|
inputs:
|
||
|
# Mounted `filebeat-inputs` configmap:
|
||
|
path: ${path.config}/inputs.d/*.yml
|
||
|
# Reload inputs configs as they change:
|
||
|
reload.enabled: false
|
||
|
modules:
|
||
|
path: ${path.config}/modules.d/*.yml
|
||
|
# Reload module configs as they change:
|
||
|
reload.enabled: false
|
||
|
|
||
|
# To enable hints based autodiscover, remove `filebeat.config.inputs` configuration and uncomment this:
|
||
|
#filebeat.autodiscover:
|
||
|
# providers:
|
||
|
# - type: kubernetes
|
||
|
# hints.enabled: true
|
||
|
|
||
|
processors:
|
||
|
- add_cloud_metadata:
|
||
|
|
||
|
cloud.id: ${ELASTIC_CLOUD_ID}
|
||
|
cloud.auth: ${ELASTIC_CLOUD_AUTH}
|
||
|
|
||
|
output.elasticsearch:
|
||
|
hosts: ['${ELASTICSEARCH_HOST:elasticsearch}:${ELASTICSEARCH_PORT:9200}']
|
||
|
username: ${ELASTICSEARCH_USERNAME}
|
||
|
password: ${ELASTICSEARCH_PASSWORD}
|
||
|
---
|
||
|
apiVersion: v1
|
||
|
kind: ConfigMap
|
||
|
metadata:
|
||
|
name: filebeat-inputs
|
||
|
namespace: kube-system
|
||
|
labels:
|
||
|
k8s-app: filebeat
|
||
|
data:
|
||
|
kubernetes.yml: |-
|
||
|
- type: docker
|
||
|
containers.ids:
|
||
|
- "*"
|
||
|
processors:
|
||
|
- add_kubernetes_metadata:
|
||
|
in_cluster: true
|