Splunk Search

How to get multiple search condition on a single query?

Anushuba
New Member

Hi Team

I have this requirement .Could you please help me on it .Here is my question

  1. I wanted to get result for PageUrls based on top 5 http status code. In single query I should get URL1,URL2 .... URL10 & its 500 (top 5 ),502(top 5), 503(top 5 ) w.r.t URL's
  2. With above condition - I should get the URL & its UserID but here the index is same but sourcetype is different along with condition where status code=500

Please assist me kindly on this

0 Karma

P_vandereerden
Splunk Employee
Splunk Employee

Better late than never: 

Sample data would be helpful here.  The request is a bit confusing since you seem to want the top 5 urls per status code, but your URL count stops at 10. With 3 status codes, the top 5 could go to 15, right?

For the second point, what UserID  would that be? Presumably each URL could be hit by multiple users, and the top 5 codes for each URL would differ per user. 

Paul van der Eerden,
Breaking software for over 20 years.
0 Karma
Get Updates on the Splunk Community!

Fall Into Learning with New Splunk Education Courses

Every month, Splunk Education releases new courses to help you branch out, strengthen your data science roots, ...

Super Optimize your Splunk Stats Searches: Unlocking the Power of tstats, TERM, and ...

By Martin Hettervik, Senior Consultant and Team Leader at Accelerate at Iver, Splunk MVPThe stats command is ...

How Splunk Observability Cloud Prevented a Major Payment Crisis in Minutes

Your bank's payment processing system is humming along during a busy afternoon, handling millions in hourly ...