<?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 do you set custom timestamp for data ingested via Splunk SDK? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-do-you-set-custom-timestamp-for-data-ingested-via-Splunk-SDK/m-p/562511#M100188</link>
    <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/237241"&gt;@awalton&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you add below setting in props.conf for json data ingested:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[covid_vacc_data_ingest]
DATETIME_CONFIG = None 
TIME_PREFIX = "date": 
TIME_FORMAT = %Y-%M-%D
...&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DATETIME_CONFIG: Splunk will not to take any timestamp by default by this config&lt;BR /&gt;TIME_FORMAT and TIME_PREFIX: Splunk will take timestamp of format %Y-%M-%D from date field&lt;/P&gt;&lt;P&gt;&lt;EM&gt;If you find my solution fruitful an upvote will be appreciated.&lt;/EM&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 08 Aug 2021 12:57:04 GMT</pubDate>
    <dc:creator>jhanvidattani</dc:creator>
    <dc:date>2021-08-08T12:57:04Z</dc:date>
    <item>
      <title>How do you set custom timestamp for data ingested via Splunk SDK?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-you-set-custom-timestamp-for-data-ingested-via-Splunk-SDK/m-p/562507#M100187</link>
      <description>&lt;P&gt;Using the Splunk SDK, I am ingesting json data into a splunk index via this line of code:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;index.submit(event&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;host&lt;/SPAN&gt;=&lt;SPAN&gt;"localhost"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;sourcetype&lt;/SPAN&gt;=&lt;SPAN&gt;"covid_vacc_data_ingest"&lt;/SPAN&gt;)&lt;/PRE&gt;&lt;P&gt;This line of code is working and data is ingested, but the timestamp is always the ingestion time rather then the date field on the event. Here is a screenshot of my settings in Splunk enterprise for this sourcetype:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2021-08-07 at 11.04.59 PM.png" style="width: 969px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/15464iB86982346FFE829E/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2021-08-07 at 11.04.59 PM.png" alt="Screen Shot 2021-08-07 at 11.04.59 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Here is a screenshot of what the ingested data looks like:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2021-08-07 at 11.23.42 PM.png" style="width: 619px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/15466i2548A2BC92E9F11D/image-dimensions/619x147?v=v2" width="619" height="147" role="button" title="Screen Shot 2021-08-07 at 11.23.42 PM.png" alt="Screen Shot 2021-08-07 at 11.23.42 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I want the _time field on the left to be the date field on the right. Any suggestions? Not sure what I am doing wrong.&lt;/P&gt;&lt;P&gt;Thank you! &lt;/P&gt;</description>
      <pubDate>Sun, 08 Aug 2021 06:27:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-you-set-custom-timestamp-for-data-ingested-via-Splunk-SDK/m-p/562507#M100187</guid>
      <dc:creator>awalton</dc:creator>
      <dc:date>2021-08-08T06:27:49Z</dc:date>
    </item>
    <item>
      <title>Re: How do you set custom timestamp for data ingested via Splunk SDK?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-you-set-custom-timestamp-for-data-ingested-via-Splunk-SDK/m-p/562511#M100188</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/237241"&gt;@awalton&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you add below setting in props.conf for json data ingested:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[covid_vacc_data_ingest]
DATETIME_CONFIG = None 
TIME_PREFIX = "date": 
TIME_FORMAT = %Y-%M-%D
...&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DATETIME_CONFIG: Splunk will not to take any timestamp by default by this config&lt;BR /&gt;TIME_FORMAT and TIME_PREFIX: Splunk will take timestamp of format %Y-%M-%D from date field&lt;/P&gt;&lt;P&gt;&lt;EM&gt;If you find my solution fruitful an upvote will be appreciated.&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 08 Aug 2021 12:57:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-you-set-custom-timestamp-for-data-ingested-via-Splunk-SDK/m-p/562511#M100188</guid>
      <dc:creator>jhanvidattani</dc:creator>
      <dc:date>2021-08-08T12:57:04Z</dc:date>
    </item>
    <item>
      <title>Re: How do you set custom timestamp for data ingested via Splunk SDK?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-you-set-custom-timestamp-for-data-ingested-via-Splunk-SDK/m-p/562691#M100273</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/236777"&gt;@jhanvidattani&lt;/a&gt;&amp;nbsp; Thank you for the response.&lt;/P&gt;&lt;P&gt;This solution still did not work for me. What's strange is that if i manually upload the data via a file and assign it my sourcetype, it actually extracts the date field and assigns that as the timestamp. So, it must be something specifically happening when i ingest via the splunk sdk, correct?&lt;/P&gt;</description>
      <pubDate>Tue, 10 Aug 2021 00:43:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-you-set-custom-timestamp-for-data-ingested-via-Splunk-SDK/m-p/562691#M100273</guid>
      <dc:creator>awalton</dc:creator>
      <dc:date>2021-08-10T00:43:04Z</dc:date>
    </item>
    <item>
      <title>Re: How do you set custom timestamp for data ingested via Splunk SDK?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-you-set-custom-timestamp-for-data-ingested-via-Splunk-SDK/m-p/562779#M100284</link>
      <description>&lt;P&gt;Can you confirm whether the sdk sets the value of _time from code?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Aug 2021 17:10:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-you-set-custom-timestamp-for-data-ingested-via-Splunk-SDK/m-p/562779#M100284</guid>
      <dc:creator>jhanvidattani</dc:creator>
      <dc:date>2021-08-10T17:10:32Z</dc:date>
    </item>
  </channel>
</rss>

