Splunk Search

Club results from multiple search in a single table.Search involves dedup and count by parameter

arunsubram
Explorer

index=* activatesessionIdsForREST() : partnerId=11111111111 ActivateOfferRequestVO |dedup sessionIds|stats count(sessionIds) as SessionCount by partnerId append [search index=* activatesessionIdsForREST() : partnerId=22222222222 ActivateOfferRequestVO |dedup sessionIds|stats count(sessionIds) as SessionCount by partnerId]

Above is my query
I am looking for a table like
PartnerId SessionCount
11111111111 10
22222222222 20

When I run the first query, I get the result separately
index=* activatesessionIdsForREST() : partnerId=11111111111 ActivateOfferRequestVO |dedup sessionIds|stats count(sessionIds) as SessionCount by partnerId append

I get
PartnerId SessionCount
11111111111 10

but when I append the second query, I dont get results. Appreciate any suggestion

Tags (1)
0 Karma
1 Solution

gyslainlatsa
Motivator

hi,

If you want to use the append command, use the pipe | before like this:

 index= activatesessionIdsForREST() : partnerId=11111111111 ActivateOfferRequestVO  |dedup sessionIds |stats count(sessionIds)    as SessionCount by partnerId 
|append  [search index=activatesessionIdsForREST() : partnerId=22222222222 ActivateOfferRequestVO 
 |dedup sessionIds|stats count(sessionIds) as SessionCount by partnerId]

View solution in original post

0 Karma

gyslainlatsa
Motivator

hi,

If you want to use the append command, use the pipe | before like this:

 index= activatesessionIdsForREST() : partnerId=11111111111 ActivateOfferRequestVO  |dedup sessionIds |stats count(sessionIds)    as SessionCount by partnerId 
|append  [search index=activatesessionIdsForREST() : partnerId=22222222222 ActivateOfferRequestVO 
 |dedup sessionIds|stats count(sessionIds) as SessionCount by partnerId]
0 Karma

gyslainlatsa
Motivator

thanks, don't forget to vote.

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

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