Splunk Search

long base search does not work in drop down list?

LearningGuy
Motivator

Hello,
Why does long base search not work in drop down list?

For example if the base query on id="StudentName" has a long search "Request-URI Too long" the drop down search did not populate, but it worked just fine on the pie chart
Please help.  Thank you so much

        <search id="StudentName">
          <query>index=test</query>
          <earliest>$time_token.earliest$</earliest>
          <latest>$time_token.latest$</latest>
        </search>

	<input type="dropdown" token="StudentTok">
        <label>Student Name</label>
        <fieldForLabel>studentname</fieldForLabel>
        <fieldForValue>studentname</fieldForValue>
        <search base="StudentName">
          <query>| head 10</query>
        </search>
      </input>

 

Labels (2)
0 Karma

LearningGuy
Motivator

So, in my case if I need to put that "long search" in drop down list, just use the regular search, not base search?
Thanks

0 Karma

PickleRick
SplunkTrust
SplunkTrust

Base searches _should_ be transforming searches. You can get away with normal event-returning searches, but only when they return a reasonably small set of results. It's not a good idea to try to search for 100k events in your base search (even worse idea if every event is a huge 100-fields json) and then have refining searches transforming the base set of events.

So - for example - you have users logging in to your system. You want to have stats with counts aggregated per day in one table and split by username in another table. You can use two separate searches but you can use base search to spawn just one base search over your source index. But the proper approach here would _not_ be to do just raw search for all logins and then do two separate stats refining searches - one by _time and other by username but as a base search you should do a stats count but it should be done by both of those fields. So your refine searches would need to sum per user or per day.

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!

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...

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