<?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: How to capture start and End time interval for a particular file in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-capture-start-and-End-time-interval-for-a-particular-file/m-p/656028#M54036</link>
    <description>&lt;P&gt;transaction command is not a good command to use for long transactions if you have a reasonable volume of data, as it will silently run out of memory and your results will be incomplete/wrong.&lt;/P&gt;&lt;P&gt;It is often better to use stats, e.g.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| stats min(_time) as Start max(_time) as Finish by CARS_ID
| eval duration=Finish-Start&lt;/LI-CODE&gt;&lt;P&gt;or if you have lots of events for the same ID that come before and after you could do&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| stats min(eval(if(match(_raw, "Reading Control-File"), _time, null))) as Start max(eval(if(match(_raw, "Completed Settlement file processing"), _time, null))) as Finish by CARS_ID&lt;/LI-CODE&gt;&lt;P&gt;but it will depend on your events - but this will be reliable&lt;/P&gt;</description>
    <pubDate>Tue, 29 Aug 2023 23:28:30 GMT</pubDate>
    <dc:creator>bowesmana</dc:creator>
    <dc:date>2023-08-29T23:28:30Z</dc:date>
    <item>
      <title>How to capture start and End time interval for a particular file</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-capture-start-and-End-time-interval-for-a-particular-file/m-p/656010#M54034</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;I have one file CARS.HIERCTR for which I want to capture START and END DURATION&lt;/P&gt;&lt;P&gt;I am using below query:&lt;/P&gt;&lt;P&gt;ndex="600000304_d_gridgain_idx*" sourcetype =600000304_gg_abs_ipc2 | rex "\[(?&amp;lt;thread&amp;gt;Thread[^\]]+)\]" | transaction thread startswith="Reading Control-File /absin/CARS.HIERCTR." endswith="Completed Settlement file processing, CARS.HIER." | table duration&lt;/P&gt;&lt;P&gt;But I am not getting any result&lt;/P&gt;&lt;P&gt;Can someone guide me&lt;/P&gt;&lt;P&gt;Starting Logger -&amp;nbsp;&lt;SPAN class=""&gt;2023-08-29&lt;/SPAN&gt; &lt;SPAN class=""&gt;00:26:20.256&lt;/SPAN&gt;&lt;SPAN&gt; [&lt;/SPAN&gt;&lt;SPAN class=""&gt;INFO&lt;/SPAN&gt;&lt;SPAN&gt; ] [&lt;/SPAN&gt;&lt;SPAN class=""&gt;pool-3-thread-1&lt;/SPAN&gt;&lt;SPAN&gt;] &lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;ReadControlFileImpl&lt;/SPAN&gt; &lt;SPAN class=""&gt;-&lt;/SPAN&gt; &lt;SPAN class=""&gt;Reading&lt;/SPAN&gt; &lt;SPAN class=""&gt;Control-File&lt;/SPAN&gt; &lt;SPAN class=""&gt;/absin/CARS.HIERCTR&lt;/SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN class=""&gt;D082823&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN class=""&gt;T001819&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Ending logger -&amp;nbsp;&lt;SPAN class=""&gt;2023-08-29&lt;/SPAN&gt; &lt;SPAN class=""&gt;02:18:33.064&lt;/SPAN&gt;&lt;SPAN&gt; [&lt;/SPAN&gt;&lt;SPAN class=""&gt;INFO&lt;/SPAN&gt;&lt;SPAN&gt; ] [&lt;/SPAN&gt;&lt;SPAN class=""&gt;Thread-34&lt;/SPAN&gt;&lt;SPAN&gt;] &lt;/SPAN&gt;&lt;SPAN class=""&gt;FileEventCreator&lt;/SPAN&gt; &lt;SPAN class=""&gt;-&lt;/SPAN&gt; &lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Completed&lt;/SPAN&gt; &lt;SPAN class=""&gt;Settlement&lt;/SPAN&gt; &lt;SPAN class=""&gt;file&lt;/SPAN&gt; &lt;SPAN class=""&gt;processing&lt;/SPAN&gt;, &lt;SPAN class=""&gt;CARS.HIER&lt;/SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN class=""&gt;D082823&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN class=""&gt;T020913&lt;/SPAN&gt; &lt;SPAN class=""&gt;records&lt;/SPAN&gt; &lt;SPAN class=""&gt;processed:&lt;/SPAN&gt; &lt;SPAN class=""&gt;135959&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;PLEASE GUIDE.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2023 20:23:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-capture-start-and-End-time-interval-for-a-particular-file/m-p/656010#M54034</guid>
      <dc:creator>aditsss</dc:creator>
      <dc:date>2023-08-29T20:23:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to capture start and End time interval for a particular file</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-capture-start-and-End-time-interval-for-a-particular-file/m-p/656027#M54035</link>
      <description>&lt;P&gt;Your Thread value is not extracted in the first data line and even if it was, it has a different value to the ending line. The first has 'thread-1' and the second Thread-34 although the first is actually pool-3-thread-1&lt;/P&gt;&lt;P&gt;Can you not use the D082823 ID in the CARS file description, e.g.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "CARS\.HIER(CTR)?\.(?&amp;lt;CARS_ID&amp;gt;\w+)"
| transaction CARS_ID startswith="Reading Control-File /absin/CARS.HIERCTR." endswith="Completed Settlement file processing, CARS.HIER."
| table duration&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 29 Aug 2023 23:23:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-capture-start-and-End-time-interval-for-a-particular-file/m-p/656027#M54035</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2023-08-29T23:23:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to capture start and End time interval for a particular file</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-capture-start-and-End-time-interval-for-a-particular-file/m-p/656028#M54036</link>
      <description>&lt;P&gt;transaction command is not a good command to use for long transactions if you have a reasonable volume of data, as it will silently run out of memory and your results will be incomplete/wrong.&lt;/P&gt;&lt;P&gt;It is often better to use stats, e.g.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| stats min(_time) as Start max(_time) as Finish by CARS_ID
| eval duration=Finish-Start&lt;/LI-CODE&gt;&lt;P&gt;or if you have lots of events for the same ID that come before and after you could do&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| stats min(eval(if(match(_raw, "Reading Control-File"), _time, null))) as Start max(eval(if(match(_raw, "Completed Settlement file processing"), _time, null))) as Finish by CARS_ID&lt;/LI-CODE&gt;&lt;P&gt;but it will depend on your events - but this will be reliable&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2023 23:28:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-capture-start-and-End-time-interval-for-a-particular-file/m-p/656028#M54036</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2023-08-29T23:28:30Z</dc:date>
    </item>
  </channel>
</rss>

