# Can you have multiple actions in one single mutate block?

**URL:** <https://discuss.elastic.co/t/can-you-have-multiple-actions-in-one-single-mutate-block/258913>\
**Category:** Logstash\
**Created:** [December 16, 2020, 8:50pm UTC](https://discuss.elastic.co/t/can-you-have-multiple-actions-in-one-single-mutate-block/258913 "2020-12-16T20:50:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nnet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nnet/32/25982_2.png) [@nnet](https://discuss.elastic.co/u/nnet)\
**Post date:** [December 16, 2020, 8:50pm UTC](https://discuss.elastic.co/t/can-you-have-multiple-actions-in-one-single-mutate-block/258913/1 "2020-12-16T20:50:17Z")

</div>

Can you have multiple actions in one single mutate block or do you need a mutate block for each:

```auto
mutate {
  copy => { "server_name" => "syslog_hostname" }
  replace => { "syslog_program" => "_geoip_lookup_failure" }
}

```

or

```auto
mutate {
  copy => { "server_name" => "syslog_hostname" }
}
mutate {
  replace => { "syslog_program" => "_geoip_lookup_failure" }
}

```

Thanks

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [December 16, 2020, 8:57pm UTC](https://discuss.elastic.co/t/can-you-have-multiple-actions-in-one-single-mutate-block/258913/2 "2020-12-16T20:57:41Z")

</div>

Yes, you can. However, mutate performs operations in a [fixed order](https://www.elastic.co/guide/en/logstash/current/plugins-filters-mutate.html#plugins-filters-mutate-proc_order), so sometimes you will need multiple mutate filters to control the order.

---

<div class="post-metadata">

**Author:** ![nnet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nnet/32/25982_2.png) [@nnet](https://discuss.elastic.co/u/nnet)\
**Post date:** [December 16, 2020, 9:10pm UTC](https://discuss.elastic.co/t/can-you-have-multiple-actions-in-one-single-mutate-block/258913/3 "2020-12-16T21:10:15Z")

</div>

@Badger I saw the order thing in the docs, but I don't see an explicit mention of multiple actions per block, thank you very much for the clarification!

---

<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:** [January 13, 2021, 9:10pm UTC](https://discuss.elastic.co/t/can-you-have-multiple-actions-in-one-single-mutate-block/258913/4 "2021-01-13T21:10:18Z")

</div>

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