<?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: transaction query providing wrong log events in splunk in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/transaction-query-providing-wrong-log-events-in-splunk/m-p/497853#M138701</link>
    <description>&lt;P&gt;Hi @kanamarlapudivenkatanagavinaykumar &lt;/P&gt;

&lt;P&gt;It looks like some part of your query is missing. Once you enter query, highlight it and press the code sample button (The button with 1's and 0's) This will ensure that the everything within the code sample is retained. &lt;/P&gt;

&lt;P&gt;Also, is this a different question from the original question in the post? If yes, could you please post this as a new question? This helps others who have a similar problem as you are. A new question in the comment kind of get's lost since other's wouldn't be able to view it and you miss out on inputs from other contributors in the forum &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 09 Dec 2019 00:18:23 GMT</pubDate>
    <dc:creator>arjunpkishore5</dc:creator>
    <dc:date>2019-12-09T00:18:23Z</dc:date>
    <item>
      <title>transaction query providing wrong log events in splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/transaction-query-providing-wrong-log-events-in-splunk/m-p/497833#M138681</link>
      <description>&lt;P&gt;Hi team,&lt;/P&gt;

&lt;P&gt;I have two log events as mentioned below, i am trying to find out response time difference based on timestamp in both events &lt;BR /&gt;
duration using unique trace.&lt;/P&gt;

&lt;P&gt;|rex field=_raw "(?[\w+,\w+,\w+])" | transaction trace startswith="Security gate check " endswith="found valid consumer for Identity" | stats avg(duration) as Average_response_Time&lt;/P&gt;

&lt;P&gt;Here i am using trace in transaction. My question is in both log events trace should be same, but here it is not picking like that.&lt;/P&gt;

&lt;P&gt;output log events &lt;/P&gt;

&lt;P&gt;1st one :&lt;/P&gt;

&lt;P&gt;2019-12-05 08:03:25.348     INFO  [price:promotion:rrt-0c8dfd466053d7c3c-b-de-18025-17252943-6,4c5c49909b36f6f3,4c5c49909b36f6f3] 23 xxxxx  : Security gate check : requestURI : /promotions/async : HttpMethod : POST &lt;BR /&gt;
2019-12-05 08:03:26.965     INFO   [price:promotion:rrt-0c8dfd466053d7c3c-b-de-18025-17252943-6,4c5c49909b36f6f3,4c5c49909b36f6f3] 23 ---   : MSG=found valid consumer for Identity&lt;/P&gt;

&lt;P&gt;Wrong output  event :&lt;/P&gt;

&lt;P&gt;2019-12-05 05:56:43.143     INFO   [demo-23-01,bcc040a4340dd02e,bcc040a4340dd02e] 23 --- [qtp700631078-191] c.t.a.p.a.s.u.SecurityContextRepository  : Security gate check : requestURI : /promotions/async : HttpMethod : POST &lt;BR /&gt;
2019-12-05 05:57:36.967     INFO   &lt;STRONG&gt;[testTraceId,a4d364b8545e7228,4d099a62c112f025]&lt;/STRONG&gt; 23 ---  : MSG=found valid consumer for Identity&lt;/P&gt;

&lt;P&gt;in transaction why log events are not picking based on trace. Kindly suggest any changes required in my query.&lt;/P&gt;

&lt;P&gt;Regards,&lt;BR /&gt;
Vinay&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 03:11:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/transaction-query-providing-wrong-log-events-in-splunk/m-p/497833#M138681</guid>
      <dc:creator>kanamarlapudive</dc:creator>
      <dc:date>2020-09-30T03:11:54Z</dc:date>
    </item>
    <item>
      <title>Re: transaction query providing wrong log events in splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/transaction-query-providing-wrong-log-events-in-splunk/m-p/497834#M138682</link>
      <description>&lt;P&gt;Hi team,&lt;/P&gt;

&lt;P&gt;I am looking for in the given splunk query, if start event is available and end event is not avaialble it should not pick the wrong event as a end event. In such cases it should not consider it as a successful transaction, i would like to showcase it as  a failed transaction or incomplete transaction.&lt;/P&gt;

&lt;P&gt;How can we achieve the expected result, kindly suggest on the same.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Dec 2019 07:48:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/transaction-query-providing-wrong-log-events-in-splunk/m-p/497834#M138682</guid>
      <dc:creator>kanamarlapudive</dc:creator>
      <dc:date>2019-12-06T07:48:29Z</dc:date>
    </item>
    <item>
      <title>Re: transaction query providing wrong log events in splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/transaction-query-providing-wrong-log-events-in-splunk/m-p/497835#M138683</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval raw="2019-12-05 08:03:25.348 INFO [price:promotion:rrt-0c8dfd466053d7c3c-b-de-18025-17252943-6,4c5c49909b36f6f3,4c5c49909b36f6f3] 23 xxxxx : Security gate check : requestURI : /promotions/async : HttpMethod : POST
2019-12-05 08:03:26.965 INFO [price:promotion:rrt-0c8dfd466053d7c3c-b-de-18025-17252943-6,4c5c49909b36f6f3,4c5c49909b36f6f3] 23 --- : MSG=found valid consumer for Identity" 
| append
    [|makeresults | eval raw="2019-12-05 05:56:43.143 INFO [demo-23-01,bcc040a4340dd02e,bcc040a4340dd02e] 23 --- [qtp700631078-191] c.t.a.p.a.s.u.SecurityContextRepository : Security gate check : requestURI : /promotions/async : HttpMethod : POST
2019-12-05 05:57:36.967 INFO [testTraceId,a4d364b8545e7228,4d099a62c112f025] 23 --- : MSG=found valid consumer for Identity"]
| makemv delim="
" raw
| mvexpand raw
| rex field=raw "^(?&amp;lt;time&amp;gt;\d+\-\d+\-\d+ \d+:\d+:\d+\.\d+)"
| eval _time = strptime(time,"%F %T.%3Q")
| rename raw as _raw
| rex  "\[(?&amp;lt;id&amp;gt;[^\]]+)\]"
| table _time _raw id
| rename COMMENT AS "this is sample data, logic is below"
| eventstats range(eval(if(searchmatch("Security gate check") OR searchmatch("found"),_time,NULL))) as duration by id
| convert dur2sec(duration)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hi,  @kanamarlapudivenkatanagavinaykumar&lt;BR /&gt;
&lt;CODE&gt;transaction&lt;/CODE&gt; is unnecessary.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Dec 2019 17:31:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/transaction-query-providing-wrong-log-events-in-splunk/m-p/497835#M138683</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2019-12-06T17:31:42Z</dc:date>
    </item>
    <item>
      <title>Re: transaction query providing wrong log events in splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/transaction-query-providing-wrong-log-events-in-splunk/m-p/497836#M138684</link>
      <description>&lt;P&gt;Never use &lt;CODE&gt;transaction&lt;/CODE&gt;; try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Your Search Here
|rex field=_raw "(?[\w+,\w+,\w+])" 
| streamstats count(searchmatch("found valid consumer for Identity")) AS sessionID
| stats range(_time) AS duration BY sessionID
| stats avg(duration) as Average_response_Time
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 06 Dec 2019 20:13:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/transaction-query-providing-wrong-log-events-in-splunk/m-p/497836#M138684</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-12-06T20:13:05Z</dc:date>
    </item>
    <item>
      <title>Re: transaction query providing wrong log events in splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/transaction-query-providing-wrong-log-events-in-splunk/m-p/497837#M138685</link>
      <description>&lt;P&gt;Hi Woodcock,&lt;BR /&gt;
Thanks for your reply.&lt;/P&gt;

&lt;P&gt;Both log events are from same request only, one is related to one layer and second one is related to another layer of same request. We are trying to find the each layer wise response time.  in both statements only one common trace id is only available. the given query is not resulting any results.&lt;/P&gt;

&lt;P&gt;Kindly provide alternative solution for my requirement. &lt;/P&gt;</description>
      <pubDate>Sat, 07 Dec 2019 18:46:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/transaction-query-providing-wrong-log-events-in-splunk/m-p/497837#M138685</guid>
      <dc:creator>kanamarlapudive</dc:creator>
      <dc:date>2019-12-07T18:46:28Z</dc:date>
    </item>
    <item>
      <title>Re: transaction query providing wrong log events in splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/transaction-query-providing-wrong-log-events-in-splunk/m-p/497838#M138686</link>
      <description>&lt;P&gt;Do you really need to use &lt;CODE&gt;transaction&lt;/CODE&gt;? Wouldn't something like this do ?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| stats min(eval(if(match(_raw, "Security gate check"), _time, null()))) as start, max(eval(if(match(_raw, "found valid consumer for Identity"), _time, null()))) as end by trace
| eval duration = end-start
| stats avg(duration) as Average_Response_Time
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 08 Dec 2019 04:57:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/transaction-query-providing-wrong-log-events-in-splunk/m-p/497838#M138686</guid>
      <dc:creator>arjunpkishore5</dc:creator>
      <dc:date>2019-12-08T04:57:03Z</dc:date>
    </item>
    <item>
      <title>Re: transaction query providing wrong log events in splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/transaction-query-providing-wrong-log-events-in-splunk/m-p/497839#M138687</link>
      <description>&lt;P&gt;Hi Arjun,&lt;BR /&gt;
I  am unable to receive with this query start time. Can you explain the query for understanding my requirement.&lt;/P&gt;</description>
      <pubDate>Sun, 08 Dec 2019 10:36:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/transaction-query-providing-wrong-log-events-in-splunk/m-p/497839#M138687</guid>
      <dc:creator>kanamarlapudive</dc:creator>
      <dc:date>2019-12-08T10:36:36Z</dc:date>
    </item>
    <item>
      <title>Re: transaction query providing wrong log events in splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/transaction-query-providing-wrong-log-events-in-splunk/m-p/497840#M138688</link>
      <description>&lt;P&gt;Hi @kanamarlapudivenkatanagavinaykumar &lt;/P&gt;

&lt;P&gt;2 probabilities here. &lt;BR /&gt;
1. The selected time range is not large enough to cover the whole event. Try increasing the time range. &lt;BR /&gt;
2. There is a difference in case. For this, modify the query as below.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | stats min(eval(if(match(lower(_raw), "security gate check"), _time, null()))) as start, max(eval(if(match(lower(_raw), "found valid consumer for identity"), _time, null()))) as end by trace
 | eval duration = end-start
 | stats avg(duration) as Average_Response_Time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;What I'm doing here is, I'm taking the min start time for events which have the phrase "security gate check" as the start time, and max time of events which have the phrase "found valid consumer for identity" as the end time per trace. The assumption is trace is unique per transaction. &lt;/P&gt;

&lt;P&gt;Hope this helps&lt;/P&gt;</description>
      <pubDate>Sun, 08 Dec 2019 13:55:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/transaction-query-providing-wrong-log-events-in-splunk/m-p/497840#M138688</guid>
      <dc:creator>arjunpkishore5</dc:creator>
      <dc:date>2019-12-08T13:55:17Z</dc:date>
    </item>
    <item>
      <title>Re: transaction query providing wrong log events in splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/transaction-query-providing-wrong-log-events-in-splunk/m-p/497841#M138689</link>
      <description>&lt;P&gt;hi Arjun,&lt;/P&gt;

&lt;P&gt;Thanks for quick reply.&lt;/P&gt;

&lt;P&gt;Even the events available in the selected time range ( i.e 7 days), I am getting as a null for start time. For end time i am able to see end time in Unix timestamp format. How to get the actual timestamp instead of unix epoch format. &lt;/P&gt;

&lt;P&gt;Kindly suggest on the same.&lt;/P&gt;</description>
      <pubDate>Sun, 08 Dec 2019 14:56:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/transaction-query-providing-wrong-log-events-in-splunk/m-p/497841#M138689</guid>
      <dc:creator>kanamarlapudive</dc:creator>
      <dc:date>2019-12-08T14:56:22Z</dc:date>
    </item>
    <item>
      <title>Re: transaction query providing wrong log events in splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/transaction-query-providing-wrong-log-events-in-splunk/m-p/497842#M138690</link>
      <description>&lt;P&gt;That's very strange that you are getting just the end and not the start time.  It looks like it's unable to find the pattern "Security gate check" in _raw. Could you verify that there are no special characters in the raw events? &lt;/P&gt;

&lt;P&gt;Another possibility is that it's unable to find start and end events for the same trace. Try sorting by start to see if you events with start but no end. In that case, the regex for extracting the trace might need to be modified.&lt;/P&gt;

&lt;P&gt;To convert epoch to standard time, you can use one of the following&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| convert ctime(&amp;lt;your time field&amp;gt;)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;OR&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval &amp;lt;time field&amp;gt; = strftime(&amp;lt;time field&amp;gt;, "&amp;lt;desired time format&amp;gt;") 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Use this to build the time format string - &lt;A href="https://docs.splunk.com/Documentation/Splunk/8.0.0/SearchReference/Commontimeformatvariables"&gt;https://docs.splunk.com/Documentation/Splunk/8.0.0/SearchReference/Commontimeformatvariables&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Please upvote if this helped you.&lt;/P&gt;</description>
      <pubDate>Sun, 08 Dec 2019 15:17:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/transaction-query-providing-wrong-log-events-in-splunk/m-p/497842#M138690</guid>
      <dc:creator>arjunpkishore5</dc:creator>
      <dc:date>2019-12-08T15:17:02Z</dc:date>
    </item>
    <item>
      <title>Re: transaction query providing wrong log events in splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/transaction-query-providing-wrong-log-events-in-splunk/m-p/497843#M138691</link>
      <description>&lt;P&gt;Hi Arjun,&lt;BR /&gt;
Thanks for quick reply, i am able to convert the timestamp.&lt;/P&gt;

&lt;P&gt;The below event log is my sample raw data.  if i give "security gate check"  i am able to see the start time ,  if  i give " Security gate check POST"  it is not working. I am giving post because some other requests has PATCH to avoid that event logs.&lt;/P&gt;

&lt;P&gt;"2019-12-05 08:03:25.348 INFO [price:promotion:rrt-0c8dfd466053d7c3c-b-de-18025-17252943-6,4c5c49909b36f6f3,4c5c49909b36f6f3] 23 xxxxx : Security gate check : requestURI : /promotions/async : HttpMethod : POST&lt;/P&gt;</description>
      <pubDate>Sun, 08 Dec 2019 15:50:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/transaction-query-providing-wrong-log-events-in-splunk/m-p/497843#M138691</guid>
      <dc:creator>kanamarlapudive</dc:creator>
      <dc:date>2019-12-08T15:50:01Z</dc:date>
    </item>
    <item>
      <title>Re: transaction query providing wrong log events in splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/transaction-query-providing-wrong-log-events-in-splunk/m-p/497844#M138692</link>
      <description>&lt;P&gt;Hi Arjun,&lt;/P&gt;

&lt;P&gt;Can you provide how to calculate count for the same criteria, which either start or end is not null ( i.e. Start and end consider as one event).&lt;/P&gt;

&lt;P&gt;If you can provide the query for this it will be very helpful.&lt;/P&gt;</description>
      <pubDate>Sun, 08 Dec 2019 17:12:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/transaction-query-providing-wrong-log-events-in-splunk/m-p/497844#M138692</guid>
      <dc:creator>kanamarlapudive</dc:creator>
      <dc:date>2019-12-08T17:12:52Z</dc:date>
    </item>
    <item>
      <title>Re: transaction query providing wrong log events in splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/transaction-query-providing-wrong-log-events-in-splunk/m-p/497845#M138693</link>
      <description>&lt;P&gt;That's simple&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| stats min(eval(if(match(lower(_raw), "security gate check"), _time, null()))) as start, max(eval(if(match(lower(_raw), "found valid consumer for identity"), _time, null()))) as end by trace
| search start=* AND end=*
| eval duration = end-start
| stats avg(duration) as Average_Response_Time, count as total
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 08 Dec 2019 18:06:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/transaction-query-providing-wrong-log-events-in-splunk/m-p/497845#M138693</guid>
      <dc:creator>arjunpkishore5</dc:creator>
      <dc:date>2019-12-08T18:06:14Z</dc:date>
    </item>
    <item>
      <title>Re: transaction query providing wrong log events in splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/transaction-query-providing-wrong-log-events-in-splunk/m-p/497846#M138694</link>
      <description>&lt;P&gt;Also, if you need only POST events, add the filter to the base search like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index= &amp;lt;your index&amp;gt; POST
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;OR if you need everything except PATCH&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=&amp;lt;your index&amp;gt; NOT PATCH
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 08 Dec 2019 18:08:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/transaction-query-providing-wrong-log-events-in-splunk/m-p/497846#M138694</guid>
      <dc:creator>arjunpkishore5</dc:creator>
      <dc:date>2019-12-08T18:08:04Z</dc:date>
    </item>
    <item>
      <title>Re: transaction query providing wrong log events in splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/transaction-query-providing-wrong-log-events-in-splunk/m-p/497847#M138695</link>
      <description>&lt;P&gt;Also, if you need only POST events, add the filter to the base search like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index= &amp;lt;your index&amp;gt; POST
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;OR if you need everything except PATCH&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=&amp;lt;your index&amp;gt; NOT PATCH
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 08 Dec 2019 18:08:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/transaction-query-providing-wrong-log-events-in-splunk/m-p/497847#M138695</guid>
      <dc:creator>arjunpkishore5</dc:creator>
      <dc:date>2019-12-08T18:08:09Z</dc:date>
    </item>
    <item>
      <title>Re: transaction query providing wrong log events in splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/transaction-query-providing-wrong-log-events-in-splunk/m-p/497848#M138696</link>
      <description>&lt;P&gt;Hi Arjun,&lt;/P&gt;

&lt;P&gt;I did this , but  i am getting null values of start and end of trace also including in this count, which i am looking to include both start and end not null case count.&lt;/P&gt;</description>
      <pubDate>Sun, 08 Dec 2019 18:09:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/transaction-query-providing-wrong-log-events-in-splunk/m-p/497848#M138696</guid>
      <dc:creator>kanamarlapudive</dc:creator>
      <dc:date>2019-12-08T18:09:50Z</dc:date>
    </item>
    <item>
      <title>Re: transaction query providing wrong log events in splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/transaction-query-providing-wrong-log-events-in-splunk/m-p/497849#M138697</link>
      <description>&lt;P&gt;Hi Arjun,&lt;/P&gt;

&lt;P&gt;POST is not available in both events, it is available in start event only. I can't add this to base search.&lt;/P&gt;</description>
      <pubDate>Sun, 08 Dec 2019 18:13:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/transaction-query-providing-wrong-log-events-in-splunk/m-p/497849#M138697</guid>
      <dc:creator>kanamarlapudive</dc:creator>
      <dc:date>2019-12-08T18:13:32Z</dc:date>
    </item>
    <item>
      <title>Re: transaction query providing wrong log events in splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/transaction-query-providing-wrong-log-events-in-splunk/m-p/497850#M138698</link>
      <description>&lt;P&gt;Hmm.&lt;/P&gt;

&lt;P&gt;Are you getting duration values for events where start or end is null? If not, do this.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | stats min(eval(if(match(lower(_raw), "security gate check"), _time, null()))) as start, max(eval(if(match(lower(_raw), "found valid consumer for identity"), _time, null()))) as end by trace

 | eval duration = end-start | search duration=*
 | stats avg(duration) as Average_Response_Time, count as total
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 08 Dec 2019 18:22:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/transaction-query-providing-wrong-log-events-in-splunk/m-p/497850#M138698</guid>
      <dc:creator>arjunpkishore5</dc:creator>
      <dc:date>2019-12-08T18:22:24Z</dc:date>
    </item>
    <item>
      <title>Re: transaction query providing wrong log events in splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/transaction-query-providing-wrong-log-events-in-splunk/m-p/497851#M138699</link>
      <description>&lt;P&gt;Hi Arjun,&lt;/P&gt;

&lt;P&gt;Thank you for your patience for answering my questions.&lt;/P&gt;

&lt;P&gt;I have two below queries, can you please suggest how to merge and get difference of counts in separate column.&lt;/P&gt;

&lt;P&gt;index=A   | rex field=_raw command=(?\w+)    | stats  count by CountA&lt;/P&gt;

&lt;P&gt;index=A   | rex field=_raw command=(?\w+)    | stats  count by CountB&lt;/P&gt;

&lt;P&gt;Common ID i am getting through rex command.&lt;/P&gt;

&lt;P&gt;I am looking for the below output,&lt;/P&gt;

&lt;P&gt;Common ID   Count A Count B   Difference ( i.e. Count A - Count B)&lt;/P&gt;

&lt;P&gt;Kindly suggest on this any approach, i have tried subsearch and joins. Unable to get the result.&lt;/P&gt;</description>
      <pubDate>Sun, 08 Dec 2019 19:25:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/transaction-query-providing-wrong-log-events-in-splunk/m-p/497851#M138699</guid>
      <dc:creator>kanamarlapudive</dc:creator>
      <dc:date>2019-12-08T19:25:38Z</dc:date>
    </item>
    <item>
      <title>Re: transaction query providing wrong log events in splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/transaction-query-providing-wrong-log-events-in-splunk/m-p/497852#M138700</link>
      <description>&lt;P&gt;You have &lt;CODE&gt;Accepted&lt;/CODE&gt; this answer and closed it; was that a mistake?  Do you have a working answer or do you still need help?  There is an &lt;CODE&gt;UnAccept&lt;/CODE&gt; button...&lt;/P&gt;</description>
      <pubDate>Sun, 08 Dec 2019 21:32:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/transaction-query-providing-wrong-log-events-in-splunk/m-p/497852#M138700</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-12-08T21:32:19Z</dc:date>
    </item>
  </channel>
</rss>

