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
Get Updates on the Splunk Community!

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...