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.

Get Updates on the Splunk Community!

Fun with Regular Expression - multiples of nine

Fun with Regular Expression - multiples of nineThis challenge was first posted on Slack #regex channel ...

[Live Demo] Watch SOC transformation in action with the reimagined Splunk Enterprise ...

Overwhelmed SOC? Splunk ES Has Your Back Tool sprawl, alert fatigue, and endless context switching are making ...

What’s New & Next in Splunk SOAR

Security teams today are dealing with more alerts, more tools, and more pressure than ever.  Join us on ...