Need to create unique index names for metric and filebeat where logs/metrics of one particular namespace would flow

Usually all logs/Metrics goes to a common index but need a solution where dev namespace logs goes to filebeat-dev-*

How do i do this in filebeat i do not have logstash or any pipelines

You can resolved this issue by using below in filbeat.yml fileoutput.Elasticsearch:
output.Elasticsearch:
indices:

  • index: "filebeat-namespacename-%{[agent.version]}-%{+yyyy.MM.dd}"
    when.equals:
    kubernetes.namespace: "dev"

Once u do this restart filbeat then next create index pattern this should be listed when u created an index pattern.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.