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!

Announcing Scheduled Export GA for Dashboard Studio

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

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...