# How do you rename fields?

**URL:** <https://community.graylog.org/t/how-do-you-rename-fields/8137>\
**Category:** Graylog Central (peer support)\
**Tags:** pipeline-rules, route-to-streampl\
**Created:** [December 20, 2018, 7:47pm UTC](https://community.graylog.org/t/how-do-you-rename-fields/8137 "2018-12-20T19:47:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![trajano](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/trajano/32/3535_2.png) [@trajano](https://community.graylog.org/u/trajano)\
**Post date:** [December 20, 2018, 7:47pm UTC](https://community.graylog.org/t/how-do-you-rename-fields/8137/1 "2018-12-20T19:47:01Z")

</div>

Hi I am just starting with Graylog, so I am hoping this is something trivial.

I have a message that I am getting via GELF and it stores things correctly and I made it route through a stream. I just want to simply change one field `X-Request-ID` to `requestID`. I created a rule

```
rule "X-Request-ID to requestID"
when
  has_field("X-Request-ID") // <-- how do I make this any message without is_not_null("FOO")
then
  rename_field("X-Request-ID", "requestID");
end

```

Then I added a pipeline with one stage containing the above rule and attached it to the pipeline I created.

However, when I send messages, I still see it using X-Request-ID

---

<div class="post-metadata">

**Author:** ![trajano](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/trajano/32/3535_2.png) [@trajano](https://community.graylog.org/u/trajano)\
**Post date:** [December 20, 2018, 8:21pm UTC](https://community.graylog.org/t/how-do-you-rename-fields/8137/2 "2018-12-20T20:21:45Z")

</div>

OK got it working thanks to [https://serverfault.com/a/832942/190208](https://serverfault.com/a/832942/190208) I just had to make sure Message Chain goes before Pipeline Processor. Not sure why the default goes the other way (aside from Alphabetical order)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/graylog/original/3X/c/7/c7c09c6b5099570133d6502b83f50ba4430de5b6.png) [@system](https://community.graylog.org/u/system)\
**Post date:** [January 3, 2019, 8:21pm UTC](https://community.graylog.org/t/how-do-you-rename-fields/8137/3 "2019-01-03T20:21:45Z")

</div>

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