<?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: xml problem, can't get right results.... in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/xml-problem-can-t-get-right-results/m-p/16934#M502</link>
    <description>&lt;P&gt;What's the different between &lt;CODE&gt;&amp;lt;fields&amp;gt;&lt;/CODE&gt; and &lt;CODE&gt;&amp;lt;options name="fields"&amp;gt;&lt;/CODE&gt;?&lt;/P&gt;</description>
    <pubDate>Wed, 07 Jul 2010 02:04:42 GMT</pubDate>
    <dc:creator>Lowell</dc:creator>
    <dc:date>2010-07-07T02:04:42Z</dc:date>
    <item>
      <title>xml problem, can't get right results....</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/xml-problem-can-t-get-right-results/m-p/16931#M499</link>
      <description>&lt;P&gt;I'm having a problem with getting simple xml working on a form search that is meant to be used searching for a username or specific ip address. The search should be used to find out certain attributes and group them in a table like pool ip, time, host etc. This should be fairly straight forward but im having problems with the searches not bringing back complete results and sometimes just showing the host and time in the results table. the xml so far is as follows, im sure there is something that im over looking though...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; &amp;lt;form&amp;gt; &amp;lt;label&amp;gt;Search ME&amp;lt;/label&amp;gt; &amp;lt;searchTemplate&amp;gt;(host=cvpn00bay-inside.bay.cbeyond.net)       

 $SearchHere$ | fields + host, username, ip, _time, vpn_poolip &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 token="SearchHere" /&amp;gt; &amp;lt;/fieldset&amp;gt; &amp;lt;row&amp;gt; &amp;lt;table&amp;gt; 

 &amp;lt;title&amp;gt;activity&amp;lt;/title&amp;gt; &amp;lt;option name="count"&amp;gt;50&amp;lt;/option&amp;gt; &amp;lt;/table&amp;gt; &amp;lt;/row&amp;gt; &amp;lt;fields&amp;gt;_raw&amp;lt;/fields&amp;gt; 

 &amp;lt;/form&amp;gt;



 suggestions?
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 07 Jul 2010 01:41:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/xml-problem-can-t-get-right-results/m-p/16931#M499</guid>
      <dc:creator>riderofyamaha</dc:creator>
      <dc:date>2010-07-07T01:41:04Z</dc:date>
    </item>
    <item>
      <title>Re: xml problem, can't get right results....</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/xml-problem-can-t-get-right-results/m-p/16932#M500</link>
      <description>&lt;P&gt;the &lt;CODE&gt;&amp;lt;fields&amp;gt;_raw&amp;lt;/fields&amp;gt;&lt;/CODE&gt; at the end isnt doing anything and should be removed.  &lt;/P&gt;

&lt;P&gt;Also fyi &lt;CODE&gt;fields + foo&lt;/CODE&gt; as of 4.0 is deprecated and does the exact same thing as &lt;CODE&gt;fields foo&lt;/CODE&gt;.  There used to be a difference but it's gone now so you might as well use the shorter syntax. &lt;/P&gt;

&lt;P&gt;And im not sure why you're getting the inconsistent behaviour but you might try putting this into the &lt;CODE&gt;&amp;lt;table&amp;gt;&lt;/CODE&gt;: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;fields&amp;gt;host, username, ip, _time, vpn_poolip&amp;lt;/fields&amp;gt; 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And I think if you have that in there you wont need the fields clause anymore at all in the search. &lt;/P&gt;

&lt;P&gt;However what you have should work I think. Its possible the table has maybe started sneaking in its own default and that's inadvertently filtering out the fields you want... &lt;/P&gt;</description>
      <pubDate>Wed, 07 Jul 2010 01:59:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/xml-problem-can-t-get-right-results/m-p/16932#M500</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2010-07-07T01:59:05Z</dc:date>
    </item>
    <item>
      <title>Re: xml problem, can't get right results....</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/xml-problem-can-t-get-right-results/m-p/16933#M501</link>
      <description>&lt;P&gt;Seems like there are a couple of tags in the wrong place.  Specifically &lt;CODE&gt;&amp;lt;html&amp;gt;&lt;/CODE&gt; and &lt;CODE&gt;&amp;lt;fields&amp;gt;&lt;/CODE&gt;, but there could still be other problems.  But I think this is a step in the right direction for you:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;?xml version="1.0"?&amp;gt;
&amp;lt;form&amp;gt;
  &amp;lt;label&amp;gt;Search ME&amp;lt;/label&amp;gt;
  &amp;lt;searchTemplate&amp;gt;(host=cvpn00bay-inside.bay.cbeyond.net) $SearchHere$ | fields + host, username, ip, _time, vpn_poolip&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;fieldset&amp;gt;
    &amp;lt;input token="SearchHere"/&amp;gt;
  &amp;lt;/fieldset&amp;gt;
  &amp;lt;row&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;/row&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;table&amp;gt;
      &amp;lt;title&amp;gt;activity&amp;lt;/title&amp;gt;
      &amp;lt;option name="count"&amp;gt;50&amp;lt;/option&amp;gt;
      &amp;lt;fields&amp;gt;_raw&amp;lt;/fields&amp;gt;
    &amp;lt;/table&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/form&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 07 Jul 2010 02:00:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/xml-problem-can-t-get-right-results/m-p/16933#M501</guid>
      <dc:creator>Lowell</dc:creator>
      <dc:date>2010-07-07T02:00:18Z</dc:date>
    </item>
    <item>
      <title>Re: xml problem, can't get right results....</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/xml-problem-can-t-get-right-results/m-p/16934#M502</link>
      <description>&lt;P&gt;What's the different between &lt;CODE&gt;&amp;lt;fields&amp;gt;&lt;/CODE&gt; and &lt;CODE&gt;&amp;lt;options name="fields"&amp;gt;&lt;/CODE&gt;?&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jul 2010 02:04:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/xml-problem-can-t-get-right-results/m-p/16934#M502</guid>
      <dc:creator>Lowell</dc:creator>
      <dc:date>2010-07-07T02:04:42Z</dc:date>
    </item>
    <item>
      <title>Re: xml problem, can't get right results....</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/xml-problem-can-t-get-right-results/m-p/16935#M503</link>
      <description>&lt;P&gt;thank you very much lowell and nick for your fast responses, ill give this a try and check back here&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jul 2010 02:30:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/xml-problem-can-t-get-right-results/m-p/16935#M503</guid>
      <dc:creator>riderofyamaha</dc:creator>
      <dc:date>2010-07-07T02:30:29Z</dc:date>
    </item>
    <item>
      <title>Re: xml problem, can't get right results....</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/xml-problem-can-t-get-right-results/m-p/16936#M504</link>
      <description>&lt;P&gt;Good point.  The difference is you are correct, and i am mistaken. &lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt;   I work here and even I cant keep the  vs &lt;OBJECT&gt;&lt;PARAM name="foo" /&gt; vs &lt;FOO&gt; thing straight. Thanks.&lt;/FOO&gt;&lt;/OBJECT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jul 2010 06:42:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/xml-problem-can-t-get-right-results/m-p/16936#M504</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2010-07-07T06:42:48Z</dc:date>
    </item>
  </channel>
</rss>

