Splunk Search

How to combine the results of two searches to display on one chart or visualization?

ssrdc
New Member

Hi all

First search is

( host=wjb2* NOT host=wjb2stl22 NOT host=wjb2*23 NOT host=wjb2*24 NOT host=wjb2*25 NOT host=wjb2*26) "[/clientapi/walletapi/*/login]" "User successfully authenticated for" NOT "healthcheckcdm@company.com"  |fillnull value=NULL |  timechart span=1d count 

Second search is

( host=wjb2* NOT host=wjb2stl22 NOT host=wjb2*23 NOT host=wjb2*24 NOT host=wjb2*25 NOT host=wjb2*26)  "[/clientapi/walletapi/*/login]" "error code" | rex "Error Code : (?.*)," | rex "Error Message : (?.*)" | eval Error_Message=if(Error_Code="USER_NOT_FOUND" AND Error_Message="User authentication failed", "Invalid Password", Error_Message) | eval Error_Message=if(Error_Message="Authentication failed due to invalid username/password ", "Invalid Username", Error_Message) |fillnull value=NULL | timechart span=1d count

Want to combine both results of two different searches to calculate rate !!

0 Karma

jkat54
SplunkTrust
SplunkTrust

Maybe you're looking for the append command?

 ( host=wjb2* NOT host=wjb2stl22 NOT host=wjb2*23 NOT host=wjb2*24 NOT host=wjb2*25 NOT host=wjb2*26) "[/clientapi/walletapi/*/login]" "User successfully authenticated for" NOT "healthcheckcdm@company.com" 
| append [ search 
( host=wjb2* NOT host=wjb2stl22 NOT host=wjb2*23 NOT host=wjb2*24 NOT host=wjb2*25 NOT host=wjb2*26) "[/clientapi/walletapi//login]" "error code" | rex "Error Code : (?.)," | rex "Error Message : (?.*)" | eval Error_Message=if(Error_Code="USER_NOT_FOUND" AND Error_Message="User authentication failed", "Invalid Password", Error_Message) | eval Error_Message=if(Error_Message="Authentication failed due to invalid username/password ", "Invalid Username", Error_Message)
] 
|fillnull value=NULL | timechart span=1d count
0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...