Hey Jochen,
you are right, i managed to to find a solution.

The pipeline rule:

set_field("ip", to_ip($message.gl2_remote_ip));

is exactly what i was looking for.

Greetings,
Andy
 

Am Freitag, 23. September 2016 15:48:54 UTC+2 schrieb Jochen Schalanda:
>
> Hi Andy,
>
> as already mentioned on IRC, you can use the message processing pipelines 
> to copy the contents of the "gl2_remote_ip" or "gl2_remote_hostname" field 
> into the "source" message field: 
> http://docs.graylog.org/en/2.1/pages/pipelines.html
>
> Cheers,
> Jochen
>
> On Friday, 23 September 2016 13:00:58 UTC+2, Andy wrote:
>>
>> Hi guys, 
>>
>> i currently use graylog with the GELF input to get log messages from my 
>> javascript application into gray log.
>> It works great but i am missing the possibility to get the client IP in 
>> my log messages.
>>
>> It's not an option to add the IP address to the GELF message itself cause 
>> it's not that easy to get the IP from within a javascript application 
>> (without calling an extra service).
>>
>> I tried to use the Plaintext TCP input (cause it includes the client ip) 
>> but i was not able post reliable form within my application. Messages 
>> arrive but they are split up in multiple messages.
>>
>> Is there any way to get the log messages, from within a javascript 
>> application, into graylog and also have the client ip present?
>>
>> Thanks,
>> Andy
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Graylog Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/graylog2/4756f1db-068a-4128-bc25-0d9618ce96b3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to