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!

How to send events & findings from AWS to Splunk using Amazon EventBridge

Amazon EventBridge is a serverless service that uses events to connect application components together, making ...

Exciting News: The AppDynamics Community Joins Splunk!

Hello Splunkers,   I’d like to introduce myself—I’m Ryan, the former AppDynamics Community Manager, and I’m ...

The All New Performance Insights for Splunk

Splunk gives you amazing tools to analyze system data and make business-critical decisions, react to issues, ...