# Index default pipeline

**URL:** https://discuss.elastic.co/t/index-default-pipeline/268103
**Category:** Elasticsearch
**Tags:** ingest-pipeline
**Created:** [March 23, 2021, 2:00pm UTC](https://discuss.elastic.co/t/index-default-pipeline/268103 "2021-03-23T14:00:02Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Robo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/robo/32/38295_2.png) [@Robo](https://discuss.elastic.co/u/Robo)
#### Post date: [March 23, 2021, 2:00pm UTC](https://discuss.elastic.co/t/index-default-pipeline/268103/1 "2021-03-23T14:00:02Z")

</div>

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:

```auto
{
  "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!

---

<div class="post-metadata">

### Author: ![aaron-nimocks](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aaron-nimocks/32/73965_2.png) [@aaron-nimocks](https://discuss.elastic.co/u/aaron-nimocks)
#### Post date: [March 23, 2021, 2:02pm UTC](https://discuss.elastic.co/t/index-default-pipeline/268103/2 "2021-03-23T14:02:37Z")

</div>

Think you are looking for an [Index Template](https://www.elastic.co/guide/en/elasticsearch/reference/current/index-templates.html) where you can apply a pipeline to multiple indexes.

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

---

<div class="post-metadata">

### Author: ![Robo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/robo/32/38295_2.png) [@Robo](https://discuss.elastic.co/u/Robo)
#### Post date: [March 23, 2021, 2:47pm UTC](https://discuss.elastic.co/t/index-default-pipeline/268103/3 "2021-03-23T14:47:54Z")

</div>

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](https://www.elastic.co/guide/en/elasticsearch/reference/master/ingest.html#set-default-pipeline)

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [April 20, 2021, 2:48pm UTC](https://discuss.elastic.co/t/index-default-pipeline/268103/4 "2021-04-20T14:48:24Z")

</div>

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