<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Simple search dashboard element in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Simple-search-dashboard-element/m-p/199270#M57691</link>
    <description>&lt;P&gt;I have a long list of sourcetypes which different logfiles in our systems has defined.&lt;/P&gt;

&lt;P&gt;(40-50 servers in a cluster with the same kind of logfiles, splunk is used as a centralized way to search in them)&lt;/P&gt;

&lt;P&gt;Right now my users has to define sourcetype="blabla" in their search query for everytime they want to search in the a specific logfile.&lt;/P&gt;

&lt;P&gt;I just want to give my users an easy entrypoint for searching in the different types of logs we have.&lt;/P&gt;</description>
    <pubDate>Wed, 03 Sep 2014 11:06:14 GMT</pubDate>
    <dc:creator>maradibs</dc:creator>
    <dc:date>2014-09-03T11:06:14Z</dc:date>
    <item>
      <title>Simple search dashboard element</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Simple-search-dashboard-element/m-p/199266#M57687</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;We have just started using splunk with real data in my organisation, and to a start we're only using it to show and compare events from different types of logs&lt;/P&gt;

&lt;P&gt;I'm looking for a way to have some form boxes in a dashboard, so my users just can input a value, and then this value is added to a already defined searchstring in the normal search window&lt;/P&gt;

&lt;P&gt;Like i have a predefined search like sourcetype="platform_jboss_log" index="index1" "string"&lt;BR /&gt;
So when inputting a value it would switch to a search window with the value defined and search is started&lt;/P&gt;

&lt;P&gt;I have browsed around here, and in the 6.x dashboard examples not finding anything really useful. - Is this so much out of splunk usecase?&lt;/P&gt;

&lt;P&gt;I just wan't to give my users a easy way to search for the stuff they need without they need to prefix their searches manually with sourcetype etc.&lt;/P&gt;

&lt;P&gt;Thanks&lt;BR /&gt;
Mads&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 17:27:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Simple-search-dashboard-element/m-p/199266#M57687</guid>
      <dc:creator>maradibs</dc:creator>
      <dc:date>2020-09-28T17:27:34Z</dc:date>
    </item>
    <item>
      <title>Re: Simple search dashboard element</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Simple-search-dashboard-element/m-p/199267#M57688</link>
      <description>&lt;P&gt;You can find basic form examples &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Viz/Buildandeditforms"&gt;here&lt;/A&gt;.&lt;/P&gt;

&lt;P&gt;The key words you are looking for are:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;token: the name for the variable that the user can input&lt;/LI&gt;
&lt;LI&gt;searchTemplate: the search with the user input&lt;/LI&gt;
&lt;LI&gt;fieldset: the list of inputs available to the user&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;You need to define a text input (lets call the token "str"). You then need to incorporate the token "str" into your search string. Your searchTemplate will look something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="platform_jboss_log" index="index1" "$str$"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Note that I have put $ around the token, this is what allows Splunk to understand that it's a variable rather than a string.&lt;/P&gt;

&lt;P&gt;Hope this helps&lt;/P&gt;</description>
      <pubDate>Tue, 02 Sep 2014 13:32:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Simple-search-dashboard-element/m-p/199267#M57688</guid>
      <dc:creator>aholzer</dc:creator>
      <dc:date>2014-09-02T13:32:46Z</dc:date>
    </item>
    <item>
      <title>Re: Simple search dashboard element</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Simple-search-dashboard-element/m-p/199268#M57689</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;Thanks for the answer&lt;/P&gt;

&lt;P&gt;It's a bit like what i'm seeking, or not&lt;/P&gt;

&lt;P&gt;I want it to make the search in the normal search app when pressing submit, so you can use the facilities that has. - What i see from the form examples it looks a bit.. restricted&lt;/P&gt;</description>
      <pubDate>Tue, 02 Sep 2014 14:47:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Simple-search-dashboard-element/m-p/199268#M57689</guid>
      <dc:creator>maradibs</dc:creator>
      <dc:date>2014-09-02T14:47:48Z</dc:date>
    </item>
    <item>
      <title>Re: Simple search dashboard element</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Simple-search-dashboard-element/m-p/199269#M57690</link>
      <description>&lt;P&gt;Not sure I'm understanding then. You could always set up a Splunk role, and as part of the role define a filter as [sourcetype="platform_jboss_log" index="index1"]. By doing this, it will apply that filter to every search the users with that role have. You'd simply have to set all users to have that new role.&lt;/P&gt;

&lt;P&gt;Hope this helps&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 17:27:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Simple-search-dashboard-element/m-p/199269#M57690</guid>
      <dc:creator>aholzer</dc:creator>
      <dc:date>2020-09-28T17:27:39Z</dc:date>
    </item>
    <item>
      <title>Re: Simple search dashboard element</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Simple-search-dashboard-element/m-p/199270#M57691</link>
      <description>&lt;P&gt;I have a long list of sourcetypes which different logfiles in our systems has defined.&lt;/P&gt;

&lt;P&gt;(40-50 servers in a cluster with the same kind of logfiles, splunk is used as a centralized way to search in them)&lt;/P&gt;

&lt;P&gt;Right now my users has to define sourcetype="blabla" in their search query for everytime they want to search in the a specific logfile.&lt;/P&gt;

&lt;P&gt;I just want to give my users an easy entrypoint for searching in the different types of logs we have.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Sep 2014 11:06:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Simple-search-dashboard-element/m-p/199270#M57691</guid>
      <dc:creator>maradibs</dc:creator>
      <dc:date>2014-09-03T11:06:14Z</dc:date>
    </item>
    <item>
      <title>Re: Simple search dashboard element</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Simple-search-dashboard-element/m-p/199271#M57692</link>
      <description>&lt;P&gt;If you look at the link I provided in my answer you'll notice that the second example has a dropdown of sourcetypes. I feel like that's exactly what you are looking for.&lt;/P&gt;

&lt;P&gt;Give them the dropdown of sourcetypes as the second example in the link (I suggest you do it dynamically) and a text input as the first example in the link show.&lt;/P&gt;

&lt;P&gt;Hope this helps&lt;/P&gt;</description>
      <pubDate>Wed, 03 Sep 2014 13:11:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Simple-search-dashboard-element/m-p/199271#M57692</guid>
      <dc:creator>aholzer</dc:creator>
      <dc:date>2014-09-03T13:11:59Z</dc:date>
    </item>
    <item>
      <title>Re: Simple search dashboard element</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Simple-search-dashboard-element/m-p/199272#M57693</link>
      <description>&lt;P&gt;It seems like your issue is you want the raw output, rather than the table- or chart-style output from @aholzer's great suggestions. If so, use &lt;CODE&gt;&amp;lt;event&amp;gt;&lt;/CODE&gt; instead of &lt;CODE&gt;&amp;lt;table&amp;gt;&lt;/CODE&gt;. Assuming you have a dropdown that produces a &lt;CODE&gt;srcType&lt;/CODE&gt; value and a text input for your &lt;CODE&gt;str&lt;/CODE&gt; value, you should be able to do something like this:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;&amp;lt;row&amp;gt;&lt;BR /&gt;
  &amp;lt;event&amp;gt;&lt;BR /&gt;
    &amp;lt;searchString&amp;gt;sourcetype="$srcType$" index="index1" "$str$"&amp;lt;/searchString&amp;gt;&lt;BR /&gt;
  &amp;lt;/event&amp;gt;&lt;BR /&gt;
&amp;lt;/row&amp;gt;&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Check out &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Viz/PanelreferenceforSimplifiedXML#event"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Viz/PanelreferenceforSimplifiedXML#event&lt;/A&gt; for your other options for this tag.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Sep 2014 14:38:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Simple-search-dashboard-element/m-p/199272#M57693</guid>
      <dc:creator>aweitzman</dc:creator>
      <dc:date>2014-09-03T14:38:53Z</dc:date>
    </item>
  </channel>
</rss>

