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!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...