我将filebeat部署到kubernetes集群中。我使用下面的行将索引名更改为“csc-%{+yyyy.mm.dd}”
index: "csc-%{+yyyy.MM.dd}"
setup.template.name: "csc"
setup.template.pattern: "csc-*"
我在kubernetes集群中有多个名称空间。我想为每个名称空间有索引名。例如,我有名称空间csc network、csc ui和csc workspace。
我想有索引名称为每个名称空间如下。
index: "csc-network-%{+yyyy.MM.dd}"
setup.template.name: "csc-network"
setup.template.pattern: "csc-network-*"
index: "csc-ui-%{+yyyy.MM.dd}"
setup.template.name: "csc-ui"
setup.template.pattern: "csc-ui-*"
index: "csc-workspace-%{+yyyy.MM.dd}"
setup.template.name: "csc-workspace"
setup.template.pattern: "csc-workspace-*"
怎么做?
1条答案
按热度按时间erhoui1w1#
当您使用正式的弹性图表时,filebeat作为守护程序部署在名称空间中,您可以选择为每个名称空间创建一个helm部署,并设置您要查找的索引名称。https://github.com/elastic/helm-charts/tree/master/filebeat