<?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: Exclude an Event Based on Value From Another Event in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Exclude-an-Event-Based-on-Value-From-Another-Event/m-p/211437#M176642</link>
    <description>&lt;P&gt;Thank you for pointing me to the right direction!&lt;/P&gt;</description>
    <pubDate>Sat, 24 Sep 2016 16:44:51 GMT</pubDate>
    <dc:creator>jepoyyyy</dc:creator>
    <dc:date>2016-09-24T16:44:51Z</dc:date>
    <item>
      <title>Exclude an Event Based on Value From Another Event</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Exclude-an-Event-Based-on-Value-From-Another-Event/m-p/211434#M176639</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;

&lt;P&gt;I have a set of log that contains events something similar to this:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Event A&lt;/STRONG&gt;&lt;BR /&gt;
[09-23-16 16:03:35:972] TransactionID(0900001) Request SomeText SomeTxt amount=90&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Event B&lt;/STRONG&gt;&lt;BR /&gt;
[09-23-16 16:03:35:973] TransactionID(0900001) Received packet 'HTTP/1.1 200 OK&lt;/P&gt;

&lt;P&gt;There are other events for each transaction but I am only interested in these two lines. &lt;STRONG&gt;I need to get the sum of the amount&lt;/STRONG&gt; but only for transactions that are successful which is indicated in the next event with status "200 OK"&lt;/P&gt;

&lt;P&gt;I'm thinking of using &lt;STRONG&gt;transaction&lt;/STRONG&gt; command but it would be too expensive. Are there any approach other that grouping it using transaction command?&lt;/P&gt;

&lt;P&gt;Thanks in advance!&lt;BR /&gt;
-Jeff&lt;/P&gt;</description>
      <pubDate>Fri, 23 Sep 2016 08:14:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Exclude-an-Event-Based-on-Value-From-Another-Event/m-p/211434#M176639</guid>
      <dc:creator>jepoyyyy</dc:creator>
      <dc:date>2016-09-23T08:14:43Z</dc:date>
    </item>
    <item>
      <title>Re: Exclude an Event Based on Value From Another Event</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Exclude-an-Event-Based-on-Value-From-Another-Event/m-p/211435#M176640</link>
      <description>&lt;P&gt;Try this. if a transaction id can have more than request and response&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=xyz "Request SomeText" OR "Received packet 'HTTP/1.1 200 OK" | rex "TransactionID\((?&amp;lt;id&amp;gt;\d+)\)\s(?&amp;lt;action&amp;gt;Received|Request)" | stats sum(Amount) as Total count(eval(action=Received)) as Recd count(eval(action=Request)) as Req by id | where Recd=Req 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 23 Sep 2016 13:08:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Exclude-an-Event-Based-on-Value-From-Another-Event/m-p/211435#M176640</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-09-23T13:08:33Z</dc:date>
    </item>
    <item>
      <title>Re: Exclude an Event Based on Value From Another Event</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Exclude-an-Event-Based-on-Value-From-Another-Event/m-p/211436#M176641</link>
      <description>&lt;P&gt;Hi there jepoyyy,&lt;/P&gt;

&lt;P&gt;Assuming that you don't have certain fields already extracted, try this.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;main search  | rex "TransactionID\((?&amp;lt;transactionId&amp;gt;\d+)\)\s" | rex "\)\sReceived\spacket\s\S+\s(?&amp;lt;status&amp;gt;\d+)\s\w+$" | stats latest(_time) AS lastTime, sum(amount) AS Amount, values(status) AS Status by transactionId | where Status=200 | convert ctime(lastTime)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hope it helps.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Sep 2016 13:27:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Exclude-an-Event-Based-on-Value-From-Another-Event/m-p/211436#M176641</guid>
      <dc:creator>alemarzu</dc:creator>
      <dc:date>2016-09-23T13:27:13Z</dc:date>
    </item>
    <item>
      <title>Re: Exclude an Event Based on Value From Another Event</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Exclude-an-Event-Based-on-Value-From-Another-Event/m-p/211437#M176642</link>
      <description>&lt;P&gt;Thank you for pointing me to the right direction!&lt;/P&gt;</description>
      <pubDate>Sat, 24 Sep 2016 16:44:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Exclude-an-Event-Based-on-Value-From-Another-Event/m-p/211437#M176642</guid>
      <dc:creator>jepoyyyy</dc:creator>
      <dc:date>2016-09-24T16:44:51Z</dc:date>
    </item>
    <item>
      <title>Re: Exclude an Event Based on Value From Another Event</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Exclude-an-Event-Based-on-Value-From-Another-Event/m-p/211438#M176643</link>
      <description>&lt;P&gt;I'm glad it helped you! Happy Splunking!&lt;/P&gt;</description>
      <pubDate>Mon, 26 Sep 2016 12:40:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Exclude-an-Event-Based-on-Value-From-Another-Event/m-p/211438#M176643</guid>
      <dc:creator>alemarzu</dc:creator>
      <dc:date>2016-09-26T12:40:11Z</dc:date>
    </item>
  </channel>
</rss>

