Filebeat 索引名称
Filebeat Index name
我将 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-*"
怎么做?
当您使用官方 Elastic 图表时,由于 Filebeat 作为守护进程部署在命名空间中,您可以选择为每个命名空间创建一个 helm 部署,并设置您要查找的索引名称。
https://github.com/elastic/helm-charts/tree/master/filebeat
我将 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-*"
怎么做?
当您使用官方 Elastic 图表时,由于 Filebeat 作为守护进程部署在命名空间中,您可以选择为每个命名空间创建一个 helm 部署,并设置您要查找的索引名称。 https://github.com/elastic/helm-charts/tree/master/filebeat