filebeat索引名称

mmvthczy  于 2021-06-10  发布在  ElasticSearch
关注(0)|答案(1)|浏览(387)

我将filebeat部署到kubernetes集群中。我使用下面的行将索引名更改为“csc-%{+yyyy.mm.dd}”

  1. index: "csc-%{+yyyy.MM.dd}"
  2. setup.template.name: "csc"
  3. setup.template.pattern: "csc-*"

我在kubernetes集群中有多个名称空间。我想为每个名称空间有索引名。例如,我有名称空间csc network、csc ui和csc workspace。
我想有索引名称为每个名称空间如下。

  1. index: "csc-network-%{+yyyy.MM.dd}"
  2. setup.template.name: "csc-network"
  3. setup.template.pattern: "csc-network-*"
  4. index: "csc-ui-%{+yyyy.MM.dd}"
  5. setup.template.name: "csc-ui"
  6. setup.template.pattern: "csc-ui-*"
  7. index: "csc-workspace-%{+yyyy.MM.dd}"
  8. setup.template.name: "csc-workspace"
  9. setup.template.pattern: "csc-workspace-*"

怎么做?

erhoui1w

erhoui1w1#

当您使用正式的弹性图表时,filebeat作为守护程序部署在名称空间中,您可以选择为每个名称空间创建一个helm部署,并设置您要查找的索引名称。https://github.com/elastic/helm-charts/tree/master/filebeat

相关问题