Splunk Search

Insert one search into other search as a new column

jyab6z
Path Finder

My code:
My basic search| rex "maingroupNo>(?.+)\(?.+)\(?.+)\"
| convert timeformat="%H:%M:%S" dur2sec(TimeInSec)
| stats count first(TimeInSec) AS endTime last(TimeInSec) AS startTime by UserID DATE maingroup subgroup
| append [search
| My basic search | rex "maingroupNo>(?.+)\(?.+)\(?.+)\"

| stats list(secId) as secId_new by UserID DATE maingroup subgroup ]

The result looks like as following:
alt text

The append command was adding a new table following the result of first search, but I wanna add the second search as a new column of the first search, any ideas?

Thanks in advance!

Tags (1)
0 Karma
1 Solution

jyab6z
Path Finder

Oh, solved my problem 🙂
Used appendcols instead of append.

View solution in original post

jyab6z
Path Finder

Oh, solved my problem 🙂
Used appendcols instead of append.

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

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