Splunk Search

How do you make a regex to extract the following value?

abhishekgandhe
Explorer

Hi,

I want to extract a value from the following line:

systemGuid=9516e36a-e5e9-4ec5-a449-edcaeb5f227f,

I need the value between systemGuid= and comma (,) at the end. I am looking for value 9516e36a-e5e9-4ec5-a449-edcaeb5f227f from the above line.

0 Karma
1 Solution

493669
Super Champion

Try this:

|rex "systemGuid=(?<GUID>[^,]+)"

View solution in original post

0 Karma

SathyaNarayanan
Path Finder

Hi,

You can use the below regex.

systemGuid=(?.*),

It will regex till comma.

0 Karma

abhishekgandhe
Explorer

It has given me everything coming after systemGuid=. I just want value between = and comma.
systemGuid=9516e36a-e5e9-4ec5-a449-edcaeb5f227f,

The actual string where I am extracting the value is this: -

systemGuid=9516e36a-e5e9-4ec5-a449-edcaeb5f227f, calculationName=Data Reconciliation, pointId=fi_12101_01.pv_ag, batchId=, modelId=model-cps-kkru-qa2, unisimModelName=CPS_PLATF_R, epochUTC=1543310100000, itemValue=372891.642424334, itemValueStr=null, quality=Good, timeOffset=P0000)","severityLevel":"Informational","timestamp":"2018-11-27T09:31:11+00:00","sourceType":"LOGBack","loggerName":"com.honeywell.pmt.cps.dao.RcDataPointDaoImpl","level":"INFO","threadName":"Thread-19"}],"internal":{"data":{"id":"2d554756-f227-11e8-b34a-1953e7591063","documentVersion":"1.61"}},"context":{"data":{"eventTime":"2018-11-27T09:31:11.027Z","isSynthetic":false,"samplingRate":100.0},"device":{"id":"2d52dcf8e7d2","type":"PC","osVersion":"Linux","roleInstance":"2d52dcf8e7d2","deviceName":"Other","deviceModel":"Other","locale":"en-US","browser":"Apache-HttpClient","browserVersion":"Apache-HttpClient 4.5","screenResolution":{}},"user":{"isAuthenticated":false},"session":{"isFirst":false},"operation":{},"location":{"clientip":"0.0.0.0","continent":"North America","country":"United States","province":"Virginia","city":"Boydton"},"custom":{"dimensions":[{"LoggerName":"com.honeywell.pmt.cps.dao.RcDataPointDaoImpl"},{"LoggingLevel":"INFO"},{"SourceType":"LOGBack"},{"ThreadName":"Thread-19"},{"TimeStamp":"Tue,

0 Karma

493669
Super Champion

Try this:

|rex "systemGuid=(?<GUID>[^,]+)"
0 Karma
Get Updates on the Splunk Community!

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI!Discover how Splunk’s agentic AI ...

Splunk Enterprise Security 8.x: The Essential Upgrade for Threat Detection, ...

Watch On Demand the Tech Talk on November 6 at 11AM PT, and empower your SOC to reach new heights! Duration: ...

Splunk Observability as Code: From Zero to Dashboard

For the details on what Self-Service Observability and Observability as Code is, we have some awesome content ...