Splunk Search

extract multiple events into multiple fields using rex

i2sheri
Communicator

I have events in below format from an XML source. I want to extract below values in to separate events into fields status, start and end

I tried

...| table temp | mvexpand temp | rex field=temp "(?<status>.*)#(?<start>.*)#(?<end>.*)#"

but no luck

PASS PASS PASS PASS PASS PASS PASS PASS PASS PASS PASS PASS PASS PASS PASS#20150921 10:00:14.562 20150921 10:00:14.570 20150921 10:00:14.577 20150921 10:00:14.584 20150921 10:00:14.591 20150921 10:00:14.599 20150921 10:00:14.606 20150921 10:00:14.611 20150921 10:00:14.631 20150921 10:00:14.641 20150921 10:00:14.650 20150921 10:00:14.687 20150921 10:00:14.705 20150921 10:00:14.734 20150921 10:00:14.747#20150921 10:00:14.568 20150921 10:00:14.574 20150921 10:00:14.582 20150921 10:00:14.588 20150921 10:00:14.596 20150921 10:00:14.604 20150921 10:00:14.609 20150921 10:00:14.627 20150921 10:00:14.639 20150921 10:00:14.648 20150921 10:00:14.684 20150921 10:00:14.703 20150921 10:00:14.716 20150921 10:00:14.745 20150921 10:00:14.750
Tags (3)
0 Karma
1 Solution

i2sheri
Communicator

It works with

| table temp | mvexpand temp | rex field=temp "(?<status>.*)#(?<start>.*)#(?<end>.*)"

Just removed the # at end
and removed

| xmlkv

from base search

View solution in original post

0 Karma

i2sheri
Communicator

It works with

| table temp | mvexpand temp | rex field=temp "(?<status>.*)#(?<start>.*)#(?<end>.*)"

Just removed the # at end
and removed

| xmlkv

from base search

0 Karma

badrinath_itrs
Communicator

Can you please paste your original xml for better understanding.

0 Karma
Get Updates on the Splunk Community!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...