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.

Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Agent Mode Engaged! Enchaining Agentic Operations with Splunk AI Assistant 2.0

    Are you ready to transform how your team handles complex data requests? We invite you to our upcoming ...

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...

Modernize your Splunk Apps – Introducing Python 3.13 in Splunk

We are excited to announce that the upcoming releases of Splunk Enterprise 10.2.x and Splunk Cloud Platform ...