0

I have created a custom index using ingest node pipeline. This is how I have done custom indexing

   [
   {
     "set": {
       "field": "_index",
       "value": "metricbeat-dev",
       "if": "ctx.kubernetes?.namespace== 'dev'"
     }
   }
 ]

Is it possible to include agent version in the index ? Its present as a field in my document. What I expect is metricbeat-dev-7.15.0

1 Answer 1

1

Yes, you can append agent version to index name using set processor. I have consider agent version feild name as agent.version

[
      {
        "set": {
          "field": "_index",
          "value": "metricbeat-dev-{{agent.version}}",
          "if": "ctx.kubernetes?.namespace== 'dev'"
        }
      }
    ]
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.