Splunk Dev

subsearch join

sarit_s
Communicator

Hello

I have a field that does not return results when searching for specific string. 

i need to combine two searches so i will be able to return this field + other results from the search with the specific string

this is my query :

 

sourcetype=clientlogs OR sourcetype="client-logs-api" 
Categories="Login"
| stats count(eval( Message="Unable to load " OR Message="Unable to load from SDK")) as Faliure, values(Message) as Message values(IPAddress) as IPAddress, values(Url) as url by Country SessionGuid 

| appendpipe 
    [ stats sum(Faliure) as Faliure 
    | fillnull value=0 Faliure 
    | eval Country="TOTAL" ] 
| appendpipe 
    [ stats count(SessionGuid) as FailedSessions 
    | eval Country="TOTAL",Faliure="Faliure"] 
]
| table SessionGuid IPAddress Country Faliure Message FailedSessions url 
| sort - Faliure

 

i need to add the field CID which return no results when searching for the message at the beginning of the query 

how can i join them together so i will see in the table also the values of CID ?

Labels (1)
Tags (1)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

I am not sure I understand the requirement - do you want a list of CID where Categories != "Login" or a list of CID where message = "Unable to load " OR message = "Unable to load from SDK" or a list of CID where message != "Unable to load " AND message != "Unable to load from SDK" or something else?

0 Karma

sarit_s
Communicator

I want list of CID's when 

sourcetype=clientlogs OR sourcetype="client-logs-api"

and add it to the table

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
| append [search sourcetype=clientlogs OR sourcetype="client-logs-api"
| stats values(CID) as CID]
0 Karma

sarit_s
Communicator

CID still empty

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

So CID doesn't exist in these sourcetypes?

If it does, how would you list them?

0 Karma

sarit_s
Communicator

It does. 
if im searching only for those sourcetyps i can find CID

but when i append this search with the rest it returns empty

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!

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

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...