<?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: Getting a multiple input search to search correctly in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Getting-a-multiple-input-search-to-search-correctly/m-p/14406#M1525</link>
    <description>&lt;P&gt;What happens when you remove the doublequotes in your searchTemplate?&lt;/P&gt;

&lt;P&gt;What happens if you add a specific index?   &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="myindex" username=$username$ | head 250
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Downlaod ui-examples app from splunkbase and install it.&lt;/P&gt;

&lt;P&gt;Look at the simplified xml -&amp;gt; inverted flow example.&lt;/P&gt;</description>
    <pubDate>Fri, 28 May 2010 01:31:18 GMT</pubDate>
    <dc:creator>hiddenkirby</dc:creator>
    <dc:date>2010-05-28T01:31:18Z</dc:date>
    <item>
      <title>Getting a multiple input search to search correctly</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Getting-a-multiple-input-search-to-search-correctly/m-p/14405#M1524</link>
      <description>&lt;P&gt;I am having trouble getting my form search to bring back anything. The xml is accepted by splunk but the search won't bring back anything. It always says 0. here is the xml code...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; &amp;lt;form&amp;gt;
 &amp;lt;label&amp;gt;My Search Engine&amp;lt;/label&amp;gt;
 &amp;lt;searchTemplate&amp;gt;"$SearchHere$" | head 250&amp;lt;/searchTemplate&amp;gt;
 &amp;lt;earliestTime&amp;gt;-30d&amp;lt;/earliestTime&amp;gt;
 &amp;lt;latestTime&amp;gt;-0d&amp;lt;/latestTime&amp;gt;
 &amp;lt;html&amp;gt;
 Enter a sourcetype in the field below and this view will pull back the most recent   100      events from the metrics log concerning that sourcetype.
 &amp;lt;/html&amp;gt;
 &amp;lt;fieldset&amp;gt;
 &amp;lt;input type="text" token="username"&amp;gt;
 &amp;lt;label&amp;gt;Enter a user name&amp;lt;/label&amp;gt;
 &amp;lt;default&amp;gt;Last 24 Hours&amp;lt;/default&amp;gt;
 &amp;lt;/input&amp;gt;
 &amp;lt;/fieldset&amp;gt;
 &amp;lt;row&amp;gt;
 &amp;lt;chart&amp;gt;
 &amp;lt;title&amp;gt;User logins&amp;lt;/title&amp;gt;
 &amp;lt;option name="charting.chart"&amp;gt;pie&amp;lt;/option&amp;gt;
 &amp;lt;/chart&amp;gt;
 &amp;lt;event&amp;gt;
 &amp;lt;title&amp;gt;Matching events&amp;lt;/title&amp;gt;
 &amp;lt;fields&amp;gt;_raw&amp;lt;/fields&amp;gt;
 &amp;lt;option name="count"&amp;gt;250&amp;lt;/option&amp;gt;
 &amp;lt;/event&amp;gt;
 &amp;lt;/row&amp;gt;
 &amp;lt;/form&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 28 May 2010 01:02:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Getting-a-multiple-input-search-to-search-correctly/m-p/14405#M1524</guid>
      <dc:creator>riderofyamaha</dc:creator>
      <dc:date>2010-05-28T01:02:23Z</dc:date>
    </item>
    <item>
      <title>Re: Getting a multiple input search to search correctly</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Getting-a-multiple-input-search-to-search-correctly/m-p/14406#M1525</link>
      <description>&lt;P&gt;What happens when you remove the doublequotes in your searchTemplate?&lt;/P&gt;

&lt;P&gt;What happens if you add a specific index?   &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="myindex" username=$username$ | head 250
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Downlaod ui-examples app from splunkbase and install it.&lt;/P&gt;

&lt;P&gt;Look at the simplified xml -&amp;gt; inverted flow example.&lt;/P&gt;</description>
      <pubDate>Fri, 28 May 2010 01:31:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Getting-a-multiple-input-search-to-search-correctly/m-p/14406#M1525</guid>
      <dc:creator>hiddenkirby</dc:creator>
      <dc:date>2010-05-28T01:31:18Z</dc:date>
    </item>
    <item>
      <title>Re: Getting a multiple input search to search correctly</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Getting-a-multiple-input-search-to-search-correctly/m-p/14407#M1526</link>
      <description>&lt;P&gt;Hmm.  You example looks like you tried 5 different things and none of it is consistent.  Here are some things to fix up:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;Your HTML message mentions "sourcetypes" but nothing else seems to refer to them.&lt;/LI&gt;
&lt;LI&gt;Your default value for "username" looks like a value for a time range&lt;/LI&gt;
&lt;LI&gt;You are trying to build a &lt;CODE&gt;&amp;lt;chart&amp;gt;&lt;/CODE&gt; without using a &lt;CODE&gt;chart&lt;/CODE&gt; or &lt;CODE&gt;timechart&lt;/CODE&gt; command in your search.&lt;/LI&gt;
&lt;LI&gt;You have a mysterious variable named &lt;CODE&gt;$SearchHere$&lt;/CODE&gt; which you aren't actually setting up as an input anywhere.&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;I second hiddenkirby's suggestion to checkout the &lt;A href="http://www.splunkbase.com/apps/All/4.x/Add-On/app%3aUI+Examples" rel="nofollow"&gt;ui-examples app&lt;/A&gt;.&lt;/P&gt;

&lt;P&gt;Another approach could be to build a few dashboards using splunk's dashboard building wizard and review the XML it generates for you.  This is not a bad way to get started.  If you haven't walked though the forms how intro in the docs, that's another good place to start:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;&lt;A href="http://www.splunk.com/base/Documentation/4.1/Developer/FormIntro" rel="nofollow"&gt;Forms intro&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Fri, 28 May 2010 04:19:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Getting-a-multiple-input-search-to-search-correctly/m-p/14407#M1526</guid>
      <dc:creator>Lowell</dc:creator>
      <dc:date>2010-05-28T04:19:09Z</dc:date>
    </item>
  </channel>
</rss>

