Splunk Search

how can i do to extract with REX

guillecasco
Path Finder

URR: /UMY/t5/update/?body-hash=6764545kk345565e1e9c946034gg&environment=350789e8-j235-4f5c-95f2-lmnu9458b

how can i use rex to extract those numbers and leters that is next to enviroment= . There are many logs with those lines . That number represent a unice id for some device that hits some backend. I then need to do a table with every single device extracted in the last 15 days for example

thanks!

Tags (2)
0 Karma

Richfez
SplunkTrust
SplunkTrust

If it is always the last thing on the line,

rex "environment=(?<MyFieldName>\S+)$"

If it is not, drop the last dollar sign off and it'll ONLY grab up to the next space.

Get Updates on the Splunk Community!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...