<?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 Append Eventtype to Top listing in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Append-Eventtype-to-Top-listing/m-p/66012#M16390</link>
    <description>&lt;P&gt;I have a listing of top denied connections that lists the src_ip, dest_ip, count for the top 10 denied connections that match an eventtype pattern (eventtype=UT*)&lt;/P&gt;

&lt;P&gt;Each row in the table relates to a unique eventtype UT1234, UT2345, UT4567 ..etc&lt;/P&gt;

&lt;P&gt;How can I have the output table of the top 10 denied connections show the eventtype (that matches a UT* pattern, there could be a few eventtypes that might match - eventtype=firewall-deny, eventtype=tivoli) for each row?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;1.1.1.1 2.2.2.2 20 UT1234
1.1.1.2 2.2.2.3 19 UT2345
1.1.1.3 2.2.2.4 18 UT4567
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;THis feels like it should be some form of appending to the top command but I havent found the appropriate one yet.&lt;/P&gt;

&lt;P&gt;Any ideas?&lt;/P&gt;</description>
    <pubDate>Wed, 23 Mar 2011 09:30:15 GMT</pubDate>
    <dc:creator>EricPartington</dc:creator>
    <dc:date>2011-03-23T09:30:15Z</dc:date>
    <item>
      <title>Append Eventtype to Top listing</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Append-Eventtype-to-Top-listing/m-p/66012#M16390</link>
      <description>&lt;P&gt;I have a listing of top denied connections that lists the src_ip, dest_ip, count for the top 10 denied connections that match an eventtype pattern (eventtype=UT*)&lt;/P&gt;

&lt;P&gt;Each row in the table relates to a unique eventtype UT1234, UT2345, UT4567 ..etc&lt;/P&gt;

&lt;P&gt;How can I have the output table of the top 10 denied connections show the eventtype (that matches a UT* pattern, there could be a few eventtypes that might match - eventtype=firewall-deny, eventtype=tivoli) for each row?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;1.1.1.1 2.2.2.2 20 UT1234
1.1.1.2 2.2.2.3 19 UT2345
1.1.1.3 2.2.2.4 18 UT4567
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;THis feels like it should be some form of appending to the top command but I havent found the appropriate one yet.&lt;/P&gt;

&lt;P&gt;Any ideas?&lt;/P&gt;</description>
      <pubDate>Wed, 23 Mar 2011 09:30:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Append-Eventtype-to-Top-listing/m-p/66012#M16390</guid>
      <dc:creator>EricPartington</dc:creator>
      <dc:date>2011-03-23T09:30:15Z</dc:date>
    </item>
    <item>
      <title>Re: Append Eventtype to Top listing</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Append-Eventtype-to-Top-listing/m-p/66013#M16391</link>
      <description>&lt;P&gt;Let me restate it and see if I get it? It sounds like you have a search like: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;your search terms&amp;gt; eventtype=UT* | stats count by src_ip, dest_ip
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;or maybe you're using the &lt;CODE&gt;top&lt;/CODE&gt; command to do the same thing.  (use stats, it's cooler)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;your search terms&amp;gt; eventtype=UT* | top src_ip, dest_ip
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and each row in the resulting table happens to match a unique eventtype, but you want to know how to include the eventtype in the stats output.&lt;/P&gt;

&lt;P&gt;But if that's the case, the answer is pretty easy so it seems unlikely: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;your search terms&amp;gt; eventtype=UT* | stats count by src_ip, dest_ip, eventtype | sort - count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;or if there's &lt;EM&gt;generally&lt;/EM&gt; only one eventtype for each connection, but not always just one, you can play it safe and display the distinct values of eventtype like so: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;your search terms&amp;gt; eventtype=UT* | stats count values(eventtype) as eventtype by src_ip, dest_ip | sort - count
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 23 Mar 2011 11:34:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Append-Eventtype-to-Top-listing/m-p/66013#M16391</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2011-03-23T11:34:50Z</dc:date>
    </item>
  </channel>
</rss>

