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!

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