<?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: Comparing an incidents event timestamp to Splunk landing timestamp in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Comparing-an-incidents-event-timestamp-to-Splunk-landing/m-p/685769#M233974</link>
    <description>&lt;P&gt;Hi Rich,&lt;/P&gt;&lt;P&gt;How would I incorporate an average of&amp;nbsp;&lt;STRONG&gt;genSecondsDifference&amp;nbsp;&lt;/STRONG&gt;over a 24 hour period? for 7 days?&lt;/P&gt;</description>
    <pubDate>Mon, 29 Apr 2024 06:44:39 GMT</pubDate>
    <dc:creator>auzark</dc:creator>
    <dc:date>2024-04-29T06:44:39Z</dc:date>
    <item>
      <title>Comparing an incidents event timestamp to Splunk landing timestamp</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Comparing-an-incidents-event-timestamp-to-Splunk-landing/m-p/685105#M233791</link>
      <description>&lt;P&gt;I would like some help creating a report that will show the seconds diff between my event timestamp and the Splunk landing timestamp.&lt;BR /&gt;&lt;BR /&gt;I have the below query which will give me the diff between _indextime&amp;nbsp; and&amp;nbsp; _time&amp;nbsp; but I would also like the seconds difference between GenerationTime (ie...&lt;SPAN&gt;2024-04-23 12:49:52)&amp;nbsp; &amp;nbsp; and _indextime.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;index=splunk_index&amp;nbsp; sourcetype=splunk_sourcetype&lt;BR /&gt;| eval tnow = now() | convert ctime(tnow)&lt;BR /&gt;| convert ctime(_indextime) as Index_Time&lt;BR /&gt;| eval secondsDifference=_indextime-_time&lt;BR /&gt;| table Node EventNumber GenerationTime Index_Time, _time, secondsDifference&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2024 10:41:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Comparing-an-incidents-event-timestamp-to-Splunk-landing/m-p/685105#M233791</guid>
      <dc:creator>auzark</dc:creator>
      <dc:date>2024-04-23T10:41:33Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing an incidents event timestamp to Splunk landing timestamp</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Comparing-an-incidents-event-timestamp-to-Splunk-landing/m-p/685117#M233794</link>
      <description>&lt;P&gt;Convert GenerationTime into epoch format, then take the difference between the result and _indextime.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=splunk_index  sourcetype=splunk_sourcetype
| eval tnow = now() | convert ctime(tnow)
| convert ctime(_indextime) as Index_Time
| eval secondsDifference=_indextime-_time
| eval genEpoch = strptime(GenerationTime, "%Y-%m-%d %H:%M:%S")
| eval genSecondsDifference = _indextime - genEpoch
| table Node EventNumber GenerationTime Index_Time, _time, secondsDifference, genSecondsDifference&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 23 Apr 2024 12:04:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Comparing-an-incidents-event-timestamp-to-Splunk-landing/m-p/685117#M233794</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2024-04-23T12:04:55Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing an incidents event timestamp to Splunk landing timestamp</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Comparing-an-incidents-event-timestamp-to-Splunk-landing/m-p/685119#M233795</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/228782"&gt;@auzark&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;You can assign a particular field to _indextime and then use that to find the difference. The only catch here would be that _indextime would be in epoch time and hence, you'll have to convert the GenerationTime into epoch format before calculating the difference. Your query should look something like below:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=splunk_index  sourcetype=splunk_sourcetype
| eval tnow = now() 
| eval indexTime = _indextime
| eval GenerationTime_epoch=strptime(GenerationTime,"%Y-%m-%d %H"%M:%S")
| convert ctime(tnow)
| convert ctime(_indextime) as Index_Time
| eval secondsDifference=indexTime-_time
| eval GenTimeDifferenceInSeconds = GenerationTime_epoch-indexTime
| table Node EventNumber GenerationTime Index_Time, _time, secondsDifference,GenTimeDifferenceInSeconds  &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Tejas.&lt;BR /&gt;&lt;BR /&gt;---&lt;BR /&gt;If the above solution helps, an upvote is appreciated!!&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2024 12:15:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Comparing-an-incidents-event-timestamp-to-Splunk-landing/m-p/685119#M233795</guid>
      <dc:creator>tej57</dc:creator>
      <dc:date>2024-04-23T12:15:14Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing an incidents event timestamp to Splunk landing timestamp</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Comparing-an-incidents-event-timestamp-to-Splunk-landing/m-p/685234#M233813</link>
      <description>&lt;P&gt;Thanks, Tejas and Rich...&amp;nbsp; &amp;nbsp;Very much appreciated.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Apr 2024 02:47:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Comparing-an-incidents-event-timestamp-to-Splunk-landing/m-p/685234#M233813</guid>
      <dc:creator>auzark</dc:creator>
      <dc:date>2024-04-24T02:47:34Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing an incidents event timestamp to Splunk landing timestamp</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Comparing-an-incidents-event-timestamp-to-Splunk-landing/m-p/685769#M233974</link>
      <description>&lt;P&gt;Hi Rich,&lt;/P&gt;&lt;P&gt;How would I incorporate an average of&amp;nbsp;&lt;STRONG&gt;genSecondsDifference&amp;nbsp;&lt;/STRONG&gt;over a 24 hour period? for 7 days?&lt;/P&gt;</description>
      <pubDate>Mon, 29 Apr 2024 06:44:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Comparing-an-incidents-event-timestamp-to-Splunk-landing/m-p/685769#M233974</guid>
      <dc:creator>auzark</dc:creator>
      <dc:date>2024-04-29T06:44:39Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing an incidents event timestamp to Splunk landing timestamp</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Comparing-an-incidents-event-timestamp-to-Splunk-landing/m-p/685770#M233975</link>
      <description>&lt;P&gt;&lt;SPAN&gt;How would I incorporate an average of&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;genSecondsDifference&amp;nbsp;&lt;/STRONG&gt;&lt;SPAN&gt;over a 24 hour period? for 7 days?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Apr 2024 06:50:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Comparing-an-incidents-event-timestamp-to-Splunk-landing/m-p/685770#M233975</guid>
      <dc:creator>auzark</dc:creator>
      <dc:date>2024-04-29T06:50:23Z</dc:date>
    </item>
  </channel>
</rss>

