<?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 Ordering Events that arrive with the same timestamp but are out of order in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/Ordering-Events-that-arrive-with-the-same-timestamp-but-are-out/m-p/407287#M7010</link>
    <description>&lt;P&gt;I have a few instances where I will get status events for when jobs are running very quickly and appear as the same timestamp in splunk. When this happens I will get a RUNNING status event after a SUCCESS event, which in fact should be reversed. I am doing processing to get the latest status for certain jobs and this causes a problem with that.&lt;/P&gt;

&lt;P&gt;Here is an example below, as you see the two events have an identical timestamp but have been pulled in in reverse order. How do i properly get the latest event when the timestamp is shared like this?&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/6385iD04ABCBF7F934AEA/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 16 Jan 2019 20:21:14 GMT</pubDate>
    <dc:creator>x213217</dc:creator>
    <dc:date>2019-01-16T20:21:14Z</dc:date>
    <item>
      <title>Ordering Events that arrive with the same timestamp but are out of order</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Ordering-Events-that-arrive-with-the-same-timestamp-but-are-out/m-p/407287#M7010</link>
      <description>&lt;P&gt;I have a few instances where I will get status events for when jobs are running very quickly and appear as the same timestamp in splunk. When this happens I will get a RUNNING status event after a SUCCESS event, which in fact should be reversed. I am doing processing to get the latest status for certain jobs and this causes a problem with that.&lt;/P&gt;

&lt;P&gt;Here is an example below, as you see the two events have an identical timestamp but have been pulled in in reverse order. How do i properly get the latest event when the timestamp is shared like this?&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/6385iD04ABCBF7F934AEA/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jan 2019 20:21:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Ordering-Events-that-arrive-with-the-same-timestamp-but-are-out/m-p/407287#M7010</guid>
      <dc:creator>x213217</dc:creator>
      <dc:date>2019-01-16T20:21:14Z</dc:date>
    </item>
    <item>
      <title>Re: Ordering Events that arrive with the same timestamp but are out of order</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Ordering-Events-that-arrive-with-the-same-timestamp-but-are-out/m-p/407288#M7011</link>
      <description>&lt;P&gt;You can |sort -  _time statusCode&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jan 2019 20:25:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Ordering-Events-that-arrive-with-the-same-timestamp-but-are-out/m-p/407288#M7011</guid>
      <dc:creator>Vijeta</dc:creator>
      <dc:date>2019-01-16T20:25:45Z</dc:date>
    </item>
    <item>
      <title>Re: Ordering Events that arrive with the same timestamp but are out of order</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Ordering-Events-that-arrive-with-the-same-timestamp-but-are-out/m-p/407289#M7012</link>
      <description>&lt;P&gt;Unfortunately cannot use that field to sort as for events for Starting Running &amp;amp; Success statuses...these have statusCodes of 3, 1, 4 respectively so the order does not match an increasing pattern&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jan 2019 20:32:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Ordering-Events-that-arrive-with-the-same-timestamp-but-are-out/m-p/407289#M7012</guid>
      <dc:creator>x213217</dc:creator>
      <dc:date>2019-01-16T20:32:32Z</dc:date>
    </item>
    <item>
      <title>Re: Ordering Events that arrive with the same timestamp but are out of order</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Ordering-Events-that-arrive-with-the-same-timestamp-but-are-out/m-p/407290#M7013</link>
      <description>&lt;P&gt;you can assign your own values,  using eval and if and sort based on new field.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;eval status=if(statusCode=1,P2,if(statusCode=3,P1, if(statusCode=4,P4)))
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 16 Jan 2019 20:37:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Ordering-Events-that-arrive-with-the-same-timestamp-but-are-out/m-p/407290#M7013</guid>
      <dc:creator>Vijeta</dc:creator>
      <dc:date>2019-01-16T20:37:37Z</dc:date>
    </item>
    <item>
      <title>Re: Ordering Events that arrive with the same timestamp but are out of order</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Ordering-Events-that-arrive-with-the-same-timestamp-but-are-out/m-p/407291#M7014</link>
      <description>&lt;P&gt;Looks like you need to add &lt;CODE&gt;ms&lt;/CODE&gt; to your logging for better granularity and correct ordering. Your jobs are running and completing in under a second. Nothing Splunk can do to fix this &lt;/P&gt;</description>
      <pubDate>Wed, 16 Jan 2019 20:56:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Ordering-Events-that-arrive-with-the-same-timestamp-but-are-out/m-p/407291#M7014</guid>
      <dc:creator>skoelpin</dc:creator>
      <dc:date>2019-01-16T20:56:11Z</dc:date>
    </item>
    <item>
      <title>Re: Ordering Events that arrive with the same timestamp but are out of order</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Ordering-Events-that-arrive-with-the-same-timestamp-but-are-out/m-p/407292#M7015</link>
      <description>&lt;P&gt;what about sorting by index time? This is how you get index time even though your _time is same but indextime will not be same.&lt;/P&gt;

&lt;P&gt;| eval indextime=strftime(_indextime,"%Y-%m-%d %H:%M:%S")&lt;BR /&gt;
| sort - indextime&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jan 2019 18:35:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Ordering-Events-that-arrive-with-the-same-timestamp-but-are-out/m-p/407292#M7015</guid>
      <dc:creator>sdchakraborty</dc:creator>
      <dc:date>2019-01-17T18:35:00Z</dc:date>
    </item>
    <item>
      <title>Re: Ordering Events that arrive with the same timestamp but are out of order</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Ordering-Events-that-arrive-with-the-same-timestamp-but-are-out/m-p/407293#M7016</link>
      <description>&lt;P&gt;This did work for me.  I wonder if it would "break" if we ever have to backfill data, though.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2019 17:50:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Ordering-Events-that-arrive-with-the-same-timestamp-but-are-out/m-p/407293#M7016</guid>
      <dc:creator>dottey</dc:creator>
      <dc:date>2019-09-04T17:50:09Z</dc:date>
    </item>
  </channel>
</rss>

