# Parsing syslog messages

**URL:** https://community.graylog.org/t/parsing-syslog-messages/2667
**Category:** Graylog Central (peer support)
**Created:** [October 3, 2017, 1:58pm UTC](https://community.graylog.org/t/parsing-syslog-messages/2667 "2017-10-03T13:58:06Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Mr\_Reyes](https://avatars.discourse-cdn.com/v4/letter/m/0ea827/32.png) [@Mr\_Reyes](https://community.graylog.org/u/Mr_Reyes)
#### Post date: [October 3, 2017, 1:58pm UTC](https://community.graylog.org/t/parsing-syslog-messages/2667/1 "2017-10-03T13:58:06Z")

</div>

Hey there

is there a way to set the source in the syslog message to be the ip form which it arrived, and not the one the device enters as source?

i have a lot of devices, that sets their username as source, instead of their ip or hostname, which makes it very difficult to extrapolate the logs…

b4 i used netxms as syslog parser, and i could change it so…

---

<div class="post-metadata">

### Author: ![jochen](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/jochen/32/8_2.png) [@jochen](https://community.graylog.org/u/jochen)
#### Post date: [October 3, 2017, 4:36pm UTC](https://community.graylog.org/t/parsing-syslog-messages/2667/2 "2017-10-03T16:36:53Z")

</div>

> [@Mr\_Reyes](#):
>
> is there a way to set the source in the syslog message to be the ip form which it arrived, and not the one the device enters as source?

Yes, you could copy the content of the “gl2\_remote\_ip” field (which contains the IP address of the client which sent the message to Graylog) into the “source” field using a Copy Input extractor or a pipeline rule ([`set_field()`](http://docs.graylog.org/en/2.3/pages/pipelines/functions.html#set-field)).

---

<div class="post-metadata">

### Author: ![Mr\_Reyes](https://avatars.discourse-cdn.com/v4/letter/m/0ea827/32.png) [@Mr\_Reyes](https://community.graylog.org/u/Mr_Reyes)
#### Post date: [October 3, 2017, 4:38pm UTC](https://community.graylog.org/t/parsing-syslog-messages/2667/3 "2017-10-03T16:38:24Z")

</div>

than!

im new to graylog, but i will give it a go

---

<div class="post-metadata">

### Author: ![Mr\_Reyes](https://avatars.discourse-cdn.com/v4/letter/m/0ea827/32.png) [@Mr\_Reyes](https://community.graylog.org/u/Mr_Reyes)
#### Post date: [October 3, 2017, 4:56pm UTC](https://community.graylog.org/t/parsing-syslog-messages/2667/4 "2017-10-03T16:56:24Z")

</div>

hmmm any pointers, or ref to the documentation?

cant seem to figure out how to build the extractor (which field, and what type?)

---

<div class="post-metadata">

### Author: ![jochen](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/jochen/32/8_2.png) [@jochen](https://community.graylog.org/u/jochen)
#### Post date: [October 3, 2017, 4:58pm UTC](https://community.graylog.org/t/parsing-syslog-messages/2667/5 "2017-10-03T16:58:10Z")

</div>

I mentioned the field names and the Extractor type in my first post…

> [@jochen](#):
>
> you could copy the content of the “gl2\_remote\_ip” field (which contains the IP address of the client which sent the message to Graylog) into the “source” field using a Copy Input extractor

---

<div class="post-metadata">

### Author: ![Mr\_Reyes](https://avatars.discourse-cdn.com/v4/letter/m/0ea827/32.png) [@Mr\_Reyes](https://community.graylog.org/u/Mr_Reyes)
#### Post date: [October 4, 2017, 1:32pm UTC](https://community.graylog.org/t/parsing-syslog-messages/2667/6 "2017-10-04T13:32:55Z")

</div>

hmmm here is an example of the messages that does the problems:

 ![40](https://us1.discourse-cdn.com/flex016/uploads/graylog/original/1X/a72ee43c5cb272955002454468b13a3037609c60.png)

i dont see the gl2\_remote\_ip field? or any other field i can extract the source ip from.

sorry for sounding n00b, but im all new to graylog

---

<div class="post-metadata">

### Author: ![jochen](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/jochen/32/8_2.png) [@jochen](https://community.graylog.org/u/jochen)
#### Post date: [October 4, 2017, 3:12pm UTC](https://community.graylog.org/t/parsing-syslog-messages/2667/7 "2017-10-04T15:12:45Z")

</div>

Fields prefixed with “gl2\_” are hidden by default.

I’d recommend using a pipeline rule to to overwrite the “source” field.

---

<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: [October 18, 2017, 3:12pm UTC](https://community.graylog.org/t/parsing-syslog-messages/2667/8 "2017-10-18T15:12:57Z")

</div>

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