Alerting

need some help in creating regex

vineela
Path Finder

Hi,

I have few logs with data as shown below..i need to extract them as fields and create chart using those values.can anyone please help me through:
16/Dec/2021:22:20:32 +1100 [qtp1936628443-884] [correlationId=b25d79ca-2b70-4912-93f4-1dc5f58841c8]  - 2021-12-16T11:20:32.362,,55955f24-a900-e3a7-e053-071bf40a1f09,,,PDS_ERR_API_GET_0001,API GET Call Failed with HTTP Status Code of 4xx Client Error,400,Bad Request,jbcsjhcjehcihdc

i need to extract the values of "PDS_ERR_API_GET_0001" and "400" and "Bad Request"

Thanks in Advance

 

 

 

 

 

Labels (1)
Tags (1)
0 Karma

johnhuang
Motivator

Assuming your data is consistent and have the same number of comma seperated fields.

| rex "(?:[^,]*,){5}(?<event_type>[^,]*)\,(?<event_message>[^,]*),(?<event_code>[^,]*),(?<event_status>[^,]*)"
| table _time event_type event_message event_code event_status
0 Karma
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!

Splunk Auto Ingestion Parallel Pipeline Scaling

Why this feature matters Many Splunk environments experience ingestion pressure long before the host is fully ...

Best Practices: Splunk auto adjust pipeline queue

When you enable autoAdjustQueue in Splunk, maxSize should be understood as the queue size Splunk starts with ...

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 ...