<?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: Configure event timestamp recognition from epoch in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Configure-event-timestamp-recognition-from-epoch/m-p/676013#M113102</link>
    <description>&lt;P&gt;The /event endpoint gives you more flexibility than /raw so I'd advise to use /event anyway. But in order for HEC input _not_ to skip the timestamp recognition (which it does by default - it either gets the timestamp from the field pushed with (not in!) an event or assigns current timestamp), you must add the ?auto_extract_timestamp=true parameter to the url. Like&lt;/P&gt;&lt;P&gt;&lt;A href="https://your_indexer:8088/services/collector/event?auto_extract_timestamp=true" target="_blank"&gt;https://your_indexer:8088/services/collector/event?auto_extract_timestamp=true&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 31 Jan 2024 08:21:10 GMT</pubDate>
    <dc:creator>PickleRick</dc:creator>
    <dc:date>2024-01-31T08:21:10Z</dc:date>
    <item>
      <title>Configure event timestamp recognition from epoch</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Configure-event-timestamp-recognition-from-epoch/m-p/675919#M113089</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have events in this format:&lt;/P&gt;&lt;P&gt;&amp;lt;servername&amp;gt; &amp;lt;metricname&amp;gt; &amp;lt;epochtime&amp;gt; &amp;lt;metricvalue&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;These events comes from HEC to an heavy forwarder and are then forwarded to indexers. I would like to set Splunk to recognize &amp;lt;epochtime&amp;gt; as the event timestamp.&lt;/P&gt;&lt;P&gt;&amp;lt;servername&amp;gt; and &amp;lt;metricname&amp;gt; are alphanumerical words with no whitespaces inside, while &amp;lt;metricvalue&amp;gt; is numerical. &amp;lt;epochtime&amp;gt; is a 10 digits, integer epoch time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've set up props.conf file on heavy forwarder as follows:&lt;/P&gt;&lt;P&gt;[sourcetypename]&lt;/P&gt;&lt;P&gt;TIME_FORMAT = %s&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But events are not indexed with the correct timestamp. I also tried to add this property:&lt;BR /&gt;TIME_PREFIX = \S+\s\S+\s&lt;/P&gt;&lt;P&gt;But no luck.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you help me understand what am I doing wrong?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;EDIT----&lt;/P&gt;&lt;P&gt;Log example:&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;mywebserver123&lt;/SPAN&gt;&amp;nbsp;SOME_METRIC&amp;nbsp;&lt;SPAN class=""&gt;1706569460&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;5&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;myotherwebserver456.domain.com&lt;/SPAN&gt;&amp;nbsp;ANY_OTHER_NAME&amp;nbsp;&lt;SPAN class=""&gt;1706569582&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;3&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2024 15:04:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Configure-event-timestamp-recognition-from-epoch/m-p/675919#M113089</guid>
      <dc:creator>tommasoscarpa1</dc:creator>
      <dc:date>2024-01-30T15:04:27Z</dc:date>
    </item>
    <item>
      <title>Re: Configure event timestamp recognition from epoch</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Configure-event-timestamp-recognition-from-epoch/m-p/675922#M113090</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/264464"&gt;@tommasoscarpa1&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;could you share a sample of your logs?&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2024 14:47:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Configure-event-timestamp-recognition-from-epoch/m-p/675922#M113090</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2024-01-30T14:47:42Z</dc:date>
    </item>
    <item>
      <title>Re: Configure event timestamp recognition from epoch</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Configure-event-timestamp-recognition-from-epoch/m-p/675924#M113092</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi Giuseppe. I've added an example in my original post&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2024 14:53:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Configure-event-timestamp-recognition-from-epoch/m-p/675924#M113092</guid>
      <dc:creator>tommasoscarpa1</dc:creator>
      <dc:date>2024-01-30T14:53:04Z</dc:date>
    </item>
    <item>
      <title>Re: Configure event timestamp recognition from epoch</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Configure-event-timestamp-recognition-from-epoch/m-p/675927#M113093</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/264464"&gt;@tommasoscarpa1&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;sorry I didn't see it!&lt;/P&gt;&lt;P&gt;Anyway, if before the timestamp in epochtime you always have&amp;nbsp;&lt;SPAN&gt;METRIC_NAME , you could try&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;TIME_PREFIX = METRIC_NAME\s+
TIME_FORMAT = %s&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2024 14:56:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Configure-event-timestamp-recognition-from-epoch/m-p/675927#M113093</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2024-01-30T14:56:27Z</dc:date>
    </item>
    <item>
      <title>Re: Configure event timestamp recognition from epoch</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Configure-event-timestamp-recognition-from-epoch/m-p/675930#M113094</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&lt;/P&gt;&lt;P&gt;No, that is just an example. I don't actually have the characters "METRIC_NAME" in my data. METRIC_NAME can be anything from "CPU usage" to "paychek value" or whatever.&lt;/P&gt;&lt;P&gt;That's why I tried TIME_PREFIX = \S+\s\S+\s at first.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'll edit the examples in my original post to avoid misunderstandings&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2024 15:01:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Configure-event-timestamp-recognition-from-epoch/m-p/675930#M113094</guid>
      <dc:creator>tommasoscarpa1</dc:creator>
      <dc:date>2024-01-30T15:01:05Z</dc:date>
    </item>
    <item>
      <title>Re: Configure event timestamp recognition from epoch</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Configure-event-timestamp-recognition-from-epoch/m-p/675943#M113097</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/264464"&gt;@tommasoscarpa1&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;if before the timestamp in epochtime you always have some char but not digits, you could try:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;TIME_PREFIX = [a-zA-Z]\s+&lt;/LI-CODE&gt;&lt;P&gt;this permits to be sure that Splunk uses the epochtime timestamp.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2024 16:25:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Configure-event-timestamp-recognition-from-epoch/m-p/675943#M113097</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2024-01-30T16:25:58Z</dc:date>
    </item>
    <item>
      <title>Re: Configure event timestamp recognition from epoch</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Configure-event-timestamp-recognition-from-epoch/m-p/675945#M113098</link>
      <description>&lt;P&gt;--- IMPORTANT EDIT ---&lt;/P&gt;&lt;P&gt;After I accepted this solution, user&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/231884"&gt;@PickleRick&lt;/a&gt;&amp;nbsp;suggested a way better one, so I am reporting it here for future use:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;The /event endpoint gives you more flexibility than /raw so I'd advise to use /event anyway. But in order for HEC input _not_ to skip the timestamp recognition (which it does by default - it either gets the timestamp from the field pushed with (not in!) an event or assigns current timestamp), you must add the ?auto_extract_timestamp=true parameter to the url. Like&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;A href="https://your_indexer:8088/services/collector/event?auto_extract_timestamp=true" target="_blank" rel="nofollow noopener noreferrer"&gt;https://your_indexer:8088/services/collector/event?auto_extract_timestamp=true&lt;/A&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here below my original answer:&lt;/P&gt;&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried this too but no luck.&lt;/P&gt;&lt;P&gt;Eventually I solved my problem by changing the HEC endpoint.&lt;/P&gt;&lt;P&gt;I was sending data to "/services/collector/event" endpoint. I changed to "/services/collector/raw" and time was indexed correctly with only the TIME_FORMAT property.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your help anyway!&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jan 2024 08:46:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Configure-event-timestamp-recognition-from-epoch/m-p/675945#M113098</guid>
      <dc:creator>tommasoscarpa1</dc:creator>
      <dc:date>2024-01-31T08:46:05Z</dc:date>
    </item>
    <item>
      <title>Re: Configure event timestamp recognition from epoch</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Configure-event-timestamp-recognition-from-epoch/m-p/675969#M113099</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/264464"&gt;@tommasoscarpa1&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;good for you, see next time!&lt;/P&gt;&lt;P&gt;Ciao and happy splunking&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;P.S.: Karma Points are appreciated &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2024 21:30:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Configure-event-timestamp-recognition-from-epoch/m-p/675969#M113099</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2024-01-30T21:30:04Z</dc:date>
    </item>
    <item>
      <title>Re: Configure event timestamp recognition from epoch</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Configure-event-timestamp-recognition-from-epoch/m-p/676013#M113102</link>
      <description>&lt;P&gt;The /event endpoint gives you more flexibility than /raw so I'd advise to use /event anyway. But in order for HEC input _not_ to skip the timestamp recognition (which it does by default - it either gets the timestamp from the field pushed with (not in!) an event or assigns current timestamp), you must add the ?auto_extract_timestamp=true parameter to the url. Like&lt;/P&gt;&lt;P&gt;&lt;A href="https://your_indexer:8088/services/collector/event?auto_extract_timestamp=true" target="_blank"&gt;https://your_indexer:8088/services/collector/event?auto_extract_timestamp=true&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jan 2024 08:21:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Configure-event-timestamp-recognition-from-epoch/m-p/676013#M113102</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2024-01-31T08:21:10Z</dc:date>
    </item>
    <item>
      <title>Re: Configure event timestamp recognition from epoch</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Configure-event-timestamp-recognition-from-epoch/m-p/676017#M113103</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/231884"&gt;@PickleRick&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Works like a charm! Thank you! It's way better than reverting to the /raw endpoint.&lt;/P&gt;&lt;P&gt;Unfortunately I can't mark your answer as a solution anymore. I will edit my solution adding what you suggested.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jan 2024 08:38:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Configure-event-timestamp-recognition-from-epoch/m-p/676017#M113103</guid>
      <dc:creator>tommasoscarpa1</dc:creator>
      <dc:date>2024-01-31T08:38:37Z</dc:date>
    </item>
    <item>
      <title>Re: Configure event timestamp recognition from epoch</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Configure-event-timestamp-recognition-from-epoch/m-p/676021#M113104</link>
      <description>&lt;P&gt;No problem. You can "unmark" a post as not being a solution but no worries. Switching to /raw is also one of the possible solutions.&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jan 2024 09:01:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Configure-event-timestamp-recognition-from-epoch/m-p/676021#M113104</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2024-01-31T09:01:56Z</dc:date>
    </item>
  </channel>
</rss>

