<?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: Filtering Chart data after transaction function in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Filtering-Chart-data-after-transaction-function/m-p/23231#M4118</link>
    <description>&lt;P&gt;Are you saying that you could have a line in the middle of those 4 that says "... CONNECT misc.data 10.10.10.50 ID=12345"?&lt;/P&gt;</description>
    <pubDate>Tue, 07 Jun 2011 00:41:37 GMT</pubDate>
    <dc:creator>mw</dc:creator>
    <dc:date>2011-06-07T00:41:37Z</dc:date>
    <item>
      <title>Filtering Chart data after transaction function</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Filtering-Chart-data-after-transaction-function/m-p/23230#M4117</link>
      <description>&lt;P&gt;Consider log entries such as the following:&lt;/P&gt;

&lt;P&gt;20110605.132223 CONNECT misc.data 10.10.10.2 ID=12345 &lt;BR /&gt;&lt;BR /&gt;
20110605.132298 ADD misc.data ID=12345&lt;BR /&gt;&lt;BR /&gt;
20110605.132298 MOD misc.data ID=12345&lt;BR /&gt;&lt;BR /&gt;
20110605.132298 DISCONNECT  misc.data ID=12345&lt;BR /&gt;&lt;/P&gt;

&lt;P&gt;So, this is a transaction, but notice that only the CONNECT event has the IP.  I can't group&lt;BR /&gt;
on the ID value as it is not unique across log files.  So I am using transaction to group the record&lt;BR /&gt;
based on a time range AND the ID.&lt;/P&gt;

&lt;P&gt;Now, there may be matches that include other IP addresses.  This is because a transaction might be between 2 or more servers.  So, post transaction, the resulting record from the search may have other IP's in it.&lt;/P&gt;

&lt;P&gt;Ultimately, the purpose of the report is to count the various transaction types (CONNECT, ADD, ETC) by IP, but I only want to include 4 specific IP's in the results.  So, my chart will ultimately have only 4 IP's on it.&lt;/P&gt;

&lt;P&gt;How can I tell chart to only include the ip addresses that I specify using OR.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jun 2011 19:03:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Filtering-Chart-data-after-transaction-function/m-p/23230#M4117</guid>
      <dc:creator>timmy13</dc:creator>
      <dc:date>2011-06-06T19:03:14Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering Chart data after transaction function</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Filtering-Chart-data-after-transaction-function/m-p/23231#M4118</link>
      <description>&lt;P&gt;Are you saying that you could have a line in the middle of those 4 that says "... CONNECT misc.data 10.10.10.50 ID=12345"?&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jun 2011 00:41:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Filtering-Chart-data-after-transaction-function/m-p/23231#M4118</guid>
      <dc:creator>mw</dc:creator>
      <dc:date>2011-06-07T00:41:37Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering Chart data after transaction function</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Filtering-Chart-data-after-transaction-function/m-p/23232#M4119</link>
      <description>&lt;P&gt;Yes Precisely.  Because 10.10.10.2 might be connecting to 10.10.10.50.  I only care about 10.10.10.2 thought so I want to chart on it alone and not records for .50.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jun 2011 13:03:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Filtering-Chart-data-after-transaction-function/m-p/23232#M4119</guid>
      <dc:creator>timmy13</dc:creator>
      <dc:date>2011-06-07T13:03:26Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering Chart data after transaction function</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Filtering-Chart-data-after-transaction-function/m-p/23233#M4120</link>
      <description>&lt;P&gt;Is the ID unique &lt;STRONG&gt;within&lt;/STRONG&gt; a log file?  If so, the following should work...&lt;BR /&gt;&lt;BR /&gt;
Assume that the ip address is extracted into a field named IP and that the transaction type is extracted as a field named transtype.&lt;/P&gt;

&lt;P&gt;I'd break this into 2 steps:  First, associate an IP address with a source + ID combination&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=yoursourcetype | transaction source, ID mvlist=true | eval reportIP = mvindex(IP,1) | table source, ID, reportIP, transtype
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This will give you a table output; notice that transtype will be a list of the various transaction types that appear in the transaction.  Also note that we pick up only the first IP address that appears in the transaction.  Our next task is to break this back into separate events, so we can count them...&lt;/P&gt;

&lt;P&gt;Count the number of each transaction types by IP - add this to the end of the previous search&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| mvexpand transtype | stats count by reportIP, transtype
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The full picture&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=yoursourcetype | transaction source, ID mvlist=true | eval reportIP = mvindex(IP,1) | table source, ID, reportIP, transtype | mvexpand transtype | stats count by reportIP, transtype
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I hope this is what you wanted!  Let me know if it doesn't work for you.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jun 2011 22:26:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Filtering-Chart-data-after-transaction-function/m-p/23233#M4120</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2011-06-07T22:26:59Z</dc:date>
    </item>
  </channel>
</rss>

