Splunk Cloud Platform

How to extract fields from raw event with rex?

iamsplunker
Communicator

Hello Splunkers, 

 

I wanted to extract  output1 and output6 fields from raw event

Example Event1:

Message : output,1: The guess/tmp/var/tms/bmp_abcd/apm_salesforce/address_standardplot/serviceinput/AddressStandardiplot_S3_VariousDmsJob_V9_apm_unmatch_AVI-pct-STANDARD_123456789_9912333333-f12f-5cb9-aa10-9d101188ad47.banana.2 file, which contains 456 rows, was written to the standardplot-s3-abc-dev-005 bucket.

Example Event 2

Message : output,6: Input 0 consumed 123 records.

desired result

output1=456 rows
output6=123 records

Message field is also not auto extracted by Splunk. May need to use |rex field=_raw........

Please Advise

 

Labels (1)
Tags (3)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
| rex "output,1.*?(?<output1>\d+\s+rows)"
| rex "output,6.*?(?<output6>\d+\s+records)"
0 Karma
Get Updates on the Splunk Community!

Index This | Why did the turkey cross the road?

November 2025 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Enter the Agentic Era with Splunk AI Assistant for SPL 1.4

  &#x1f680; Your data just got a serious AI upgrade — are you ready? Say hello to the Agentic Era with the ...

Feel the Splunk Love: Real Stories from Real Customers

Hello Splunk Community,    What’s the best part of hearing how our customers use Splunk? Easy: the positive ...