我正在Kubernetes中使用filebeat将日志发送到弹性搜索。我想基于名称空间创建索引。我正在尝试为Kubernetes集群中的其他应用程序创建自定义索引,但这无法正常工作。我用下面的conf:-
output.elasticsearch:索引:“%{[kubernetes.labels.app]:filebeat}-%{[beat.version]}-%{+ yyyy.MM.dd}”
Filebeat Kube清单链接-https://github.com/anup1384/k8s-filebeat
使用下面在filebeat configmap中给定的elasticsearch输出
output.elasticsearch:
index: "%{[kubernetes.namespace]:filebeat}-%{[beat.version]}-%{+yyyy.MM.dd}"