<?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 starting and ending 'event' are not always showing the correct overview in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Transaction-starting-and-ending-event-are-not-always-showing-the/m-p/701194#M237879</link>
    <description>&lt;P&gt;Thanks, this script gives only 3 rows. But, I want to have an overview like (TS: Timestamp of the event):&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Sentira_0-1728302886074.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/32981i5CCCDD481595242C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Sentira_0-1728302886074.png" alt="Sentira_0-1728302886074.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 07 Oct 2024 12:08:41 GMT</pubDate>
    <dc:creator>Sentira</dc:creator>
    <dc:date>2024-10-07T12:08:41Z</dc:date>
    <item>
      <title>Transaction starting and ending 'event' are not always showing the correct overview</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Transaction-starting-and-ending-event-are-not-always-showing-the/m-p/701174#M237876</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am trying to create a Transaction where my starting and ending 'event'&amp;nbsp;are not always showing the correct overview.&amp;nbsp; I expect the yellow marked group events as result:&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Data.jpg" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/32977i0A22FC17397387E5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Data.jpg" alt="Data.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=app sourcetype=prd_wcs host=EULMFCP1WVND121 "EquipmentStatusRequest\"=" D0022
| eval _raw = replace(_raw, "\\\\", "")
| eval _raw = replace(_raw, "\"", "")
| rex "Chute:DTT_S01.DA01.(?&amp;lt;Door&amp;gt;[^\,]+)"
| rex "EquipmentName:DTT_S01.DA01.(?&amp;lt;EquipmentName&amp;gt;[^\,]+)"
| rex "EquipmentType:(?&amp;lt;EquipmentType&amp;gt;[^\,]+)"
| rex "Status:(?&amp;lt;EquipmentStatus&amp;gt;[^\,]+)"
| rex "TypeOfMessage:(?&amp;lt;TypeOfMessage&amp;gt;[^\}]+)"
| eval Code = EquipmentStatus+"-"+TypeOfMessage+"-"+EquipmentType
| lookup Cortez_SS_Reasons.csv CODE as Code output STATE as ReasonCode
| where ReasonCode = "Ready" OR ReasonCode = "Full"
| transaction EquipmentName startswith=(ReasonCode="Full") endswith=(ReasonCode="Ready")  
| eval latestTS = _time + duration
| eval counter=1
| accum counter as Row
| table _time latestTS Row  ReasonCode
| eval latestTS=strftime(latestTS,"%Y-%m-%d %H:%M:%S.%3N")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;The script above is showing the following overview as result and the marked line is not correct. I don't know how this is happened. Because, I expect that Transaction function will always take first events starting with "Ready" and ending with "Full"..&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Invalid Result.jpg" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/32976iF916132AF88FA440/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Invalid Result.jpg" alt="Invalid Result.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Oct 2024 10:13:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Transaction-starting-and-ending-event-are-not-always-showing-the/m-p/701174#M237876</guid>
      <dc:creator>Sentira</dc:creator>
      <dc:date>2024-10-07T10:13:55Z</dc:date>
    </item>
    <item>
      <title>Re: Transaction starting and ending 'event' are not always showing the correct overview</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Transaction-starting-and-ending-event-are-not-always-showing-the/m-p/701185#M237877</link>
      <description>&lt;P&gt;Transaction seems to have a mind of its own (there are some not well documented nuances to how it works). Try something like this before your transaction command (to give it a hand!)&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| streamstats count(eval(ReasonCode="Full")) as fullCount count(eval(ReasonCode="Ready")) as readyCount by EquipmentName
| where fullCount=1 OR readyCount=1&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Oct 2024 10:53:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Transaction-starting-and-ending-event-are-not-always-showing-the/m-p/701185#M237877</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-10-07T10:53:54Z</dc:date>
    </item>
    <item>
      <title>Re: Transaction starting and ending 'event' are not always showing the correct overview</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Transaction-starting-and-ending-event-are-not-always-showing-the/m-p/701194#M237879</link>
      <description>&lt;P&gt;Thanks, this script gives only 3 rows. But, I want to have an overview like (TS: Timestamp of the event):&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Sentira_0-1728302886074.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/32981i5CCCDD481595242C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Sentira_0-1728302886074.png" alt="Sentira_0-1728302886074.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Oct 2024 12:08:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Transaction-starting-and-ending-event-are-not-always-showing-the/m-p/701194#M237879</guid>
      <dc:creator>Sentira</dc:creator>
      <dc:date>2024-10-07T12:08:41Z</dc:date>
    </item>
    <item>
      <title>Re: Transaction starting and ending 'event' are not always showing the correct overview</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Transaction-starting-and-ending-event-are-not-always-showing-the/m-p/701198#M237880</link>
      <description>&lt;P&gt;OK. So you want to have a "transaction" consisting of any sequence of Full events ending with a single Ready event. Any Ready events not preceeded by a Full event are not a part of any transaction and should be discarded?&lt;/P&gt;&lt;PRE&gt;| streamstats current=f window=1 values(ReasonCode) as LastReasonCode&lt;BR /&gt;| where ReasonCode="Full" OR LastReasonCode="Full" OR isnull(LastReasonCode)&lt;/PRE&gt;&lt;P&gt;This should filter out the events which are Ready and are preceeded by Ready.&lt;/P&gt;&lt;P&gt;Now we can mark beginnings of each of those "streaks"&lt;/P&gt;&lt;PRE&gt;| eval bump=if(ReasonCode="Full" AND LastReasonCode="Ready",1,0)&lt;/PRE&gt;&lt;P&gt;And we can find which transaction is which&lt;/P&gt;&lt;PRE&gt;| streamstats current=t sum(bump) as tran_id&lt;/PRE&gt;&lt;P&gt;Now you have your unique transaction ID which you can use to find first and last timestamp&lt;/P&gt;&lt;PRE&gt;| stats min(_time) as earliest max(_time) as latest by tran_is&lt;BR /&gt;| eval duration=latest-earliest&lt;/PRE&gt;</description>
      <pubDate>Mon, 07 Oct 2024 13:09:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Transaction-starting-and-ending-event-are-not-always-showing-the/m-p/701198#M237880</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2024-10-07T13:09:07Z</dc:date>
    </item>
    <item>
      <title>Re: Transaction starting and ending 'event' are not always showing the correct overview</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Transaction-starting-and-ending-event-are-not-always-showing-the/m-p/701206#M237882</link>
      <description>&lt;P&gt;&lt;BR /&gt;Unfortunately your script does not provide the correct overview.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Sentira_0-1728312168528.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/32982iA3631BD98EF35240/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Sentira_0-1728312168528.png" alt="Sentira_0-1728312168528.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I want to know how long a machine has had a "Full" status.&amp;nbsp;I can calculate that by taking the first "full" status and the "first" Ready status together and the difference is the duration.&lt;/P&gt;&lt;P&gt;for example:&lt;/P&gt;&lt;P&gt;Full --&amp;gt;This one&lt;BR /&gt;Full --&amp;gt; Skip&lt;BR /&gt;Ready&amp;nbsp;--&amp;gt;This one&lt;BR /&gt;Full--&amp;gt;This one&lt;BR /&gt;Ready--&amp;gt;This one&lt;BR /&gt;Full--&amp;gt;This one&lt;BR /&gt;Full --&amp;gt;Skip&lt;BR /&gt;Ready&amp;nbsp;--&amp;gt;This one&lt;BR /&gt;Ready --&amp;gt; skip&lt;/P&gt;</description>
      <pubDate>Mon, 07 Oct 2024 14:44:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Transaction-starting-and-ending-event-are-not-always-showing-the/m-p/701206#M237882</guid>
      <dc:creator>Sentira</dc:creator>
      <dc:date>2024-10-07T14:44:03Z</dc:date>
    </item>
    <item>
      <title>Re: Transaction starting and ending 'event' are not always showing the correct overview</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Transaction-starting-and-ending-event-are-not-always-showing-the/m-p/701209#M237883</link>
      <description>&lt;P&gt;Your input data is definitely _not_ in the same order as shown in the opening post.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Oct 2024 15:00:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Transaction-starting-and-ending-event-are-not-always-showing-the/m-p/701209#M237883</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2024-10-07T15:00:02Z</dc:date>
    </item>
    <item>
      <title>Re: Transaction starting and ending 'event' are not always showing the correct overview</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Transaction-starting-and-ending-event-are-not-always-showing-the/m-p/701266#M237890</link>
      <description>&lt;P&gt;Try something like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| streamstats count by ReasonCode EquipmentName reset_on_change=t global=f
| where count=1&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 08 Oct 2024 07:56:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Transaction-starting-and-ending-event-are-not-always-showing-the/m-p/701266#M237890</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-10-08T07:56:34Z</dc:date>
    </item>
  </channel>
</rss>

