Index default pipeline

I would like to create an ingest pipeline that will create a field called "free_ratio". The pipeline has to be applied on current ".monitoring-es" index.

The definition of the pipeline is following:

{
  "free_ratio" : {
    "description" : "Pipeline used to calculate the free filesystem ratio.",
    "processors" : [
      {
        "script" : {
          "source" : "ctx.free_ratio2 = (float)ctx.node_stats.fs.total.available_in_bytes / (float)ctx.node_stats.fs.total.total_in_bytes",
          "if" : "ctx['type'] == 'node_stats'",
          "description" : "Calculate free FS ratio"
        }
      }
    ]
  }
}

Is there a way how to enable this pipeline automatically for all ".monitoring-es" indices?
I have added this pipeline as a "default_pipeline" into the index template, but this does not did the trick.

Thanks!

Think you are looking for an Index Template where you can apply a pipeline to multiple indexes.

"index_patterns": ["te*", "bar*"],

I have configured the index settings in the index template to use a default index pipeline.
https://www.elastic.co/guide/en/elasticsearch/reference/master/ingest.html#set-default-pipeline

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