如何基于kubernetes元数据创建索引

问题描述 投票:0回答:1

我正在Kubernetes中使用filebeat将日志发送到弹性搜索。我想基于名称空间创建索引。我正在尝试为Kubernetes集群中的其他应用程序创建自定义索引,但这无法正常工作。我用下面的conf:-

output.elasticsearch:索引:“%{[kubernetes.labels.app]:filebeat}-%{[beat.version]}-%{+ yyyy.MM.dd}”

Filebeat Kube清单链接-https://github.com/anup1384/k8s-filebeat

elasticsearch logging kubernetes filebeat amazon-eks
1个回答
0
投票

使用下面在filebeat configmap中给定的elasticsearch输出

output.elasticsearch:
  index: "%{[kubernetes.namespace]:filebeat}-%{[beat.version]}-%{+yyyy.MM.dd}"
© www.soinside.com 2019 - 2024. All rights reserved.