<?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: TCP Input Ignores Custom Timestamp in JSON in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/TCP-Input-Ignores-Custom-Timestamp-in-JSON/m-p/287360#M99233</link>
    <description>&lt;P&gt;Thank you, TIME_PREFIX setting is working for me so far. &lt;/P&gt;</description>
    <pubDate>Wed, 28 Oct 2015 20:00:28 GMT</pubDate>
    <dc:creator>dknb</dc:creator>
    <dc:date>2015-10-28T20:00:28Z</dc:date>
    <item>
      <title>TCP Input Ignores Custom Timestamp in JSON</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/TCP-Input-Ignores-Custom-Timestamp-in-JSON/m-p/287354#M99227</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I have user event logs that I'm trying to ingest over TCP.  Every event is a JSON like this:&lt;/P&gt;

&lt;P&gt;{key1:v1,....,event:{time:"$ISO8601_VALUE",keyn:vn}...}&lt;/P&gt;

&lt;P&gt;Here's my props.conf on indexer node (I don't use forwarders yet):&lt;/P&gt;

&lt;P&gt;/opt/splunk/etc/apps/search/local/props.conf:&lt;BR /&gt;
*&lt;BR /&gt;
[usr_event]&lt;BR /&gt;
DATETIME_CONFIG =&lt;BR /&gt;
INDEXED_EXTRACTIONS = json&lt;BR /&gt;
NO_BINARY_CHECK = true&lt;BR /&gt;
TIMESTAMP_FIELDS = event.time&lt;BR /&gt;
TIME_FORMAT = %Y-%m-%dT%H:%M:%S&lt;BR /&gt;
TZ = UTC&lt;BR /&gt;
category = Custom&lt;BR /&gt;
pulldown_type = 1&lt;BR /&gt;
KV_MODE = json&lt;BR /&gt;
SHOULD_LINEMERGE = false&lt;BR /&gt;
disabled = false*&lt;/P&gt;

&lt;P&gt;When I use this source type in a file, I can get timestamp extracted  correctly in preview but when I use the same source type in TCP input, I  my custom timestamp setting ignored so I get the time stamp at the time of loading.&lt;/P&gt;

&lt;P&gt;I prefer TCP as it makes it a lot easier to stream back-fill input for historical data as well as for daily ETL.&lt;/P&gt;

&lt;P&gt;Is there something wrong with my settings?&lt;/P&gt;

&lt;P&gt;Thanks,&lt;/P&gt;

&lt;P&gt;David&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 07:39:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/TCP-Input-Ignores-Custom-Timestamp-in-JSON/m-p/287354#M99227</guid>
      <dc:creator>dknb</dc:creator>
      <dc:date>2020-09-29T07:39:45Z</dc:date>
    </item>
    <item>
      <title>Re: TCP Input Ignores Custom Timestamp in JSON</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/TCP-Input-Ignores-Custom-Timestamp-in-JSON/m-p/287355#M99228</link>
      <description>&lt;P&gt;You are configuring JSON twice; use &lt;EM&gt;either&lt;/EM&gt; &lt;CODE&gt;INDEXED_EXTRACTIONS = json&lt;/CODE&gt; &lt;EM&gt;or&lt;/EM&gt; &lt;CODE&gt;KV_MODE = json&lt;/CODE&gt;, but &lt;EM&gt;NOT&lt;/EM&gt; both.  In your case, keep the former and remove the latter.  Make sure that this &lt;CODE&gt;inputs.conf&lt;/CODE&gt; file gets sent to the &lt;EM&gt;FORWARDER&lt;/EM&gt; (Yes, not just to the Indexer) and that all splunk instances there are restarted.&lt;/P&gt;</description>
      <pubDate>Sat, 24 Oct 2015 18:28:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/TCP-Input-Ignores-Custom-Timestamp-in-JSON/m-p/287355#M99228</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-10-24T18:28:07Z</dc:date>
    </item>
    <item>
      <title>Re: TCP Input Ignores Custom Timestamp in JSON</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/TCP-Input-Ignores-Custom-Timestamp-in-JSON/m-p/287356#M99229</link>
      <description>&lt;P&gt;Thank you, will try it first thing Monday.&lt;/P&gt;</description>
      <pubDate>Sat, 24 Oct 2015 22:03:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/TCP-Input-Ignores-Custom-Timestamp-in-JSON/m-p/287356#M99229</guid>
      <dc:creator>dknb</dc:creator>
      <dc:date>2015-10-24T22:03:53Z</dc:date>
    </item>
    <item>
      <title>Re: TCP Input Ignores Custom Timestamp in JSON</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/TCP-Input-Ignores-Custom-Timestamp-in-JSON/m-p/287357#M99230</link>
      <description>&lt;P&gt;I tried it again yesterday, no luck.  Perhaps splunk is not recognizing nested field, event.time.   I also have logging event id timestamp that looks like 20151026013223432432432... I tried cutting strptime timestamp portion but so far it didn't work either. &lt;/P&gt;</description>
      <pubDate>Tue, 27 Oct 2015 20:13:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/TCP-Input-Ignores-Custom-Timestamp-in-JSON/m-p/287357#M99230</guid>
      <dc:creator>dknb</dc:creator>
      <dc:date>2015-10-27T20:13:45Z</dc:date>
    </item>
    <item>
      <title>Re: TCP Input Ignores Custom Timestamp in JSON</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/TCP-Input-Ignores-Custom-Timestamp-in-JSON/m-p/287358#M99231</link>
      <description>&lt;P&gt;Check your fields and find the name that splunk has given the Timestamp field; it must not be &lt;CODE&gt;event.time&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Oct 2015 23:30:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/TCP-Input-Ignores-Custom-Timestamp-in-JSON/m-p/287358#M99231</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-10-27T23:30:14Z</dc:date>
    </item>
    <item>
      <title>Re: TCP Input Ignores Custom Timestamp in JSON</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/TCP-Input-Ignores-Custom-Timestamp-in-JSON/m-p/287359#M99232</link>
      <description>&lt;P&gt;Update: &lt;/P&gt;

&lt;P&gt;Ended up using TIME_PREFIX instead of TIMESTAMP_FIELDS:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;TIME_PREFIX=\"logEventId\":\"
TIME_FORMAT = %Y%m%d%H%M%S%3N'
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;It seems to work consistently, will update this thread if it doesn't &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Thanks,&lt;/P&gt;

&lt;P&gt;David&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 07:41:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/TCP-Input-Ignores-Custom-Timestamp-in-JSON/m-p/287359#M99232</guid>
      <dc:creator>dknb</dc:creator>
      <dc:date>2020-09-29T07:41:09Z</dc:date>
    </item>
    <item>
      <title>Re: TCP Input Ignores Custom Timestamp in JSON</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/TCP-Input-Ignores-Custom-Timestamp-in-JSON/m-p/287360#M99233</link>
      <description>&lt;P&gt;Thank you, TIME_PREFIX setting is working for me so far. &lt;/P&gt;</description>
      <pubDate>Wed, 28 Oct 2015 20:00:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/TCP-Input-Ignores-Custom-Timestamp-in-JSON/m-p/287360#M99233</guid>
      <dc:creator>dknb</dc:creator>
      <dc:date>2015-10-28T20:00:28Z</dc:date>
    </item>
  </channel>
</rss>

