Dashboards & Visualizations

How to extract the field from Logs

aditsss
Motivator

Hi Everyone,

Can someone guide me how can I extract the below field highlighted in bold:

2021-05-04T05:01:03.702620566Z app_name=blazegqlgway-a environment=e2 ns=blazegateway pod_container=blazegqlgway-a pod_name=blazegqlgway-a-deployment-11-5sk6b stream=stdout message=2021-05-03 22:01:03.702 INFO [dgfgateway,264799cd7c73ee07,264799cd7c73ee07,true] 1 --- [nio-8443-exec-6] c.a.s.g.s.h.ResponseRetrieverService : nodeUrl=https://abc/graphql, caller=200005348C360VIEW, nodeHttpStatus=200, nodeResponseTime=1163

 

2021-05-03T21:44:45.4034061Z app_name=blazegqlgway-a environment=e2 ns=blazegateway pod_container=blazegqlgway-a pod_name=blazegqlgway-a-deployment-11-5sk6b stream=stdout message=2021-05-03 14:44:45.402 INFO [dgfgateway,daccee3618879e78,daccee3618879e78,true] 1 --- [nio-8443-exec-8] c.a.s.g.s.h.ResponseRetrieverService : nodeUrl=https://abc/graphql, caller=200000949GCPSfdcCommerical, nodeHttpStatus=200, nodeResponseTime=649

Labels (2)
0 Karma
1 Solution

aasabatini
Motivator

Hi @aditsss 

try this on search to check my regular expression:

rex field=_raw "\[\w+,\w+,(?<name_field>\w+)"

if works properly add this field extraction on props.conf

https://docs.splunk.com/Documentation/Splunk/8.1.3/Admin/Propsconf

Alessandro

“The answer is out there, Neo, and it’s looking for you, and it will find you if you want it to.”

View solution in original post

aasabatini
Motivator

Hi @aditsss 

try this on search to check my regular expression:

rex field=_raw "\[\w+,\w+,(?<name_field>\w+)"

if works properly add this field extraction on props.conf

https://docs.splunk.com/Documentation/Splunk/8.1.3/Admin/Propsconf

Alessandro

“The answer is out there, Neo, and it’s looking for you, and it will find you if you want it to.”
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...

Modernize your Splunk Apps – Introducing Python 3.13 in Splunk

We are excited to announce that the upcoming releases of Splunk Enterprise 10.2.x and Splunk Cloud Platform ...

Step into “Hunt the Insider: An Splunk ES Premier Mystery” to catch a cybercriminal ...

After a whole week of being on call, you fell asleep on your keyboard, and you hit a sequence of buttons that ...