I am trying to setup filebeat for the kubernetes cluster. I am trying to use autodiscover for my containers. I have istio envoy proxy
running on each pod. I am trying to ship those logs to my elastic stack. But, I am getting following errors -
2019-06-30T07:05:21.816Z ERROR [autodiscover] cfgfile/list.go:96 Error creating runner from config: Fileset envoyproxy/access is configured but doesn't exist
2019-06-30T07:05:21.816Z ERROR [autodiscover] cfgfile/list.go:96 Error creating runner from config: each input must have at least one path defined
Here is my yaml
config I using to setup filebeat,
apiVersion: v1
kind: ConfigMap
metadata:
name: filebeat-config
namespace: kube-system
labels:
k8s-app: filebeat
data:
filebeat.yml: |-
setup.dashboards.enabled: true
setup.template.enabled: true
setup.kibana.host: "192.168.82.162:5601"
setup.template.settings:
index.number_of_shards: 1
setup.template.overwrite: true
filebeat.overwrite_pipelines: true
filebeat.autodiscover:
providers:
- type: kubernetes
hints.enabled: true
templates:
- condition:
and:
- contains:
kubernetes.container.name: swift-client
- contains:
kubernetes.labels.app: swift-client
config:
- type: container
tail_files: true
tags: ["nextjs-server"]
pipeline: "nextjs-server"
multiline.pattern: 'WARN|ERROR|INFO|DEBUG'
multiline.negate: true
multiline.match: after
containers:
ids:
- ${data.kubernetes.container.id}
- condition:
and:
- contains:
kubernetes.container.name: istio-proxy
- contains:
kubernetes.labels.app: swift-client
- contains:
kubernetes.labels.app: swift-server
config:
- module: envoyproxy
access:
input:
type: container
tail_files: true
containers:
stream: stdout
ids:
- ${data.kubernets.container.id}
error:
input:
type: container
tail_files: true
containers:
stream: stderr
ids:
- ${data.kubernetes.container.id}
processors:
- add_cloud_metadata: ~
- add_host_metadata: ~
- add_kubernetes_metadata:
in_cluster: true
- add_docker_metadata:
output.elasticsearch:
hosts: ['${ELASTICSEARCH_HOST:elasticsearch}:${ELASTICSEARCH_PORT:9200}']
I am new to filebeat and any help would be much appreciated! Thanks!