<?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: Displaying several fields, some with aggregate data in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Displaying-several-fields-some-with-aggregate-data/m-p/184471#M53126</link>
    <description>&lt;P&gt;Upon further testing I've discovered that the "top" statement is somehow preventing the other fields from populating data.&lt;/P&gt;

&lt;P&gt;With top: &lt;A href="http://i.imgur.com/Jfs5lM3.png"&gt;http://i.imgur.com/Jfs5lM3.png&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Without Top: &lt;A href="http://i.imgur.com/c2qeAo9.png"&gt;http://i.imgur.com/c2qeAo9.png&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 12 Mar 2015 15:30:51 GMT</pubDate>
    <dc:creator>razlani</dc:creator>
    <dc:date>2015-03-12T15:30:51Z</dc:date>
    <item>
      <title>Displaying several fields, some with aggregate data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Displaying-several-fields-some-with-aggregate-data/m-p/184467#M53122</link>
      <description>&lt;P&gt;Hi all - new here but the answers I've seen so far on stats (ie &lt;A href="http://answers.splunk.com/answers/106497/add-a-new-count-field-to-a-table.html" target="_blank"&gt;http://answers.splunk.com/answers/106497/add-a-new-count-field-to-a-table.html&lt;/A&gt;) do a group on several fields when one wishes to display several fields in a table (for example).&lt;/P&gt;

&lt;P&gt;My question is this: When wishing to display several fields (either ones created yourself or the ones already recognized by splunk), do you use a table, eval or stats to display them?&lt;/P&gt;

&lt;P&gt;Eg.: Splunk recognizes all the following fields: uri_path, referer_domain, urlslug, lang. &lt;/P&gt;

&lt;P&gt;How can I say "for a given index, count the top uri_path info but display the rest of the recognized fields in the output table".&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Something like index="jellyfish" | top showperc=false limit=10 uri_path, referer_domain, urlslug, lang
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But I don't wish it to group/aggregate by any field other than the uri_path one. So: "display the other fields if they exist, if not just place a blank value, but don't impact my counting top uri_path data"&lt;/P&gt;

&lt;P&gt;Do you guys typically use eval only for custom fields? Or table/chart perhaps for what I'm after?&lt;/P&gt;

&lt;P&gt;Thanks for helping this newbie!&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 19:13:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Displaying-several-fields-some-with-aggregate-data/m-p/184467#M53122</guid>
      <dc:creator>razlani</dc:creator>
      <dc:date>2020-09-28T19:13:02Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying several fields, some with aggregate data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Displaying-several-fields-some-with-aggregate-data/m-p/184468#M53123</link>
      <description>&lt;P&gt;Eval and stats calculate values and create fields.  One can display fields using table, chart, and timechart (among others).  Your task can be achieved with something like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="jellyfish" | top showperc=false limit=10 uri_path | table uri_path, referer_domain, urlslug, lang
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 12 Mar 2015 13:47:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Displaying-several-fields-some-with-aggregate-data/m-p/184468#M53123</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2015-03-12T13:47:24Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying several fields, some with aggregate data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Displaying-several-fields-some-with-aggregate-data/m-p/184469#M53124</link>
      <description>&lt;P&gt;Thank you but two problems:&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;It's not actually populating data as per the 'interesting fields' list of fields on the events page. For instance, in the table, everything is empty except uri_path (and I've checked the event independently and it contains data in those fields and lists them as default in the 'interesting fields' section) .&lt;/LI&gt;
&lt;LI&gt;it may sort by the 'top' values but it doesn't actually contain the number in a separate column (which is desirable). I did a stats count by and it just added those words as fields in the table.&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;Please help!&lt;/P&gt;</description>
      <pubDate>Thu, 12 Mar 2015 14:19:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Displaying-several-fields-some-with-aggregate-data/m-p/184469#M53124</guid>
      <dc:creator>razlani</dc:creator>
      <dc:date>2015-03-12T14:19:23Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying several fields, some with aggregate data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Displaying-several-fields-some-with-aggregate-data/m-p/184470#M53125</link>
      <description>&lt;P&gt;I've made my comment into a post as I was unsure how alerts are made via comments:&lt;/P&gt;

&lt;P&gt;Thank you but two problems:&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;&lt;P&gt;It's not actually populating data as per the 'interesting fields' list of fields on the events page. For instance, in the table, everything is empty except uri_path (and I've checked the event independently and it contains data in those fields and lists them as default in the 'interesting fields' section) .&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;it may sort by the 'top' values but it doesn't actually contain the number in a separate column (which is desirable). I did a stats count by and it just added those words as fields in the table.&lt;/P&gt;&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;Please help!&lt;/P&gt;</description>
      <pubDate>Thu, 12 Mar 2015 14:36:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Displaying-several-fields-some-with-aggregate-data/m-p/184470#M53125</guid>
      <dc:creator>razlani</dc:creator>
      <dc:date>2015-03-12T14:36:24Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying several fields, some with aggregate data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Displaying-several-fields-some-with-aggregate-data/m-p/184471#M53126</link>
      <description>&lt;P&gt;Upon further testing I've discovered that the "top" statement is somehow preventing the other fields from populating data.&lt;/P&gt;

&lt;P&gt;With top: &lt;A href="http://i.imgur.com/Jfs5lM3.png"&gt;http://i.imgur.com/Jfs5lM3.png&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Without Top: &lt;A href="http://i.imgur.com/c2qeAo9.png"&gt;http://i.imgur.com/c2qeAo9.png&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Mar 2015 15:30:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Displaying-several-fields-some-with-aggregate-data/m-p/184471#M53126</guid>
      <dc:creator>razlani</dc:creator>
      <dc:date>2015-03-12T15:30:51Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying several fields, some with aggregate data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Displaying-several-fields-some-with-aggregate-data/m-p/184472#M53127</link>
      <description>&lt;P&gt;Give this a try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Something like index="jellyfish" | eval uri_path=uri_path."##".coalesce(referer_domain,"")."##".coalesce(urlslug,"")."##".coalesce(lang,"") | top showperc=false limit=10 uri_path | rex field=uri_path "(?&amp;lt;uri_path&amp;gt;.*)##(?&amp;lt;referer_domain&amp;gt;.*)##(?&amp;lt;urlslug&amp;gt;.*)##(?&amp;lt;lang&amp;gt;.*)"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 12 Mar 2015 15:51:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Displaying-several-fields-some-with-aggregate-data/m-p/184472#M53127</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2015-03-12T15:51:43Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying several fields, some with aggregate data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Displaying-several-fields-some-with-aggregate-data/m-p/184473#M53128</link>
      <description>&lt;P&gt;This seems to have done the trick but I appreciate any suggestions for improvements etc:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="ss" | stats count(uri_path) as Amount, values(referer_domain) as RefererDomain, values(urlslug) as UrlSlug, values(lang) as Lang by uri_path | sort - Amount
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Top was not the way to go it seems - or if it was I couldn't get it to work.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Mar 2015 16:12:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Displaying-several-fields-some-with-aggregate-data/m-p/184473#M53128</guid>
      <dc:creator>razlani</dc:creator>
      <dc:date>2015-03-12T16:12:12Z</dc:date>
    </item>
  </channel>
</rss>

