Splunk Search

Splunk dashboard

Nith1
Path Finder

Hi Team

I have the required data in one of the fields but the logs are not in order how can i extract the required data. Below is the example of how it looks

row1 -->   A
                    B
                    C
                    D


row2 -->   D
                     A
                     B
                     C

row3-->    C
                     D
                     A
                     B

im trying to extract the data using mvindex
| eval x= mvindex(split(planname,"\n"),2) | table x --> Since in index 2nd position for all the rows the data is different so im unable to view the correct data.

Please let me know the query to extract the data

Thanks


Labels (5)
Tags (1)
0 Karma
1 Solution

to4kawa
Ultra Champion
| makeresults
| eval _raw="ABCD"
| appendpipe [ eval _raw="DABC"
| appendpipe [ eval _raw="CBAB"]]
``` this is sample data ```
| eval _raw=split(_raw,"")
| rex ("?<yourData>A")

If the data has features, it can be extracted using regular expressions.

View solution in original post

to4kawa
Ultra Champion
| makeresults
| eval _raw="ABCD"
| appendpipe [ eval _raw="DABC"
| appendpipe [ eval _raw="CBAB"]]
``` this is sample data ```
| eval _raw=split(_raw,"")
| rex ("?<yourData>A")

If the data has features, it can be extracted using regular expressions.

Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...