<?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: TIMESTAMP_PREFIX not finding timestamp in JSON structure. in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/TIMESTAMP-PREFIX-not-finding-timestamp-in-JSON-structure/m-p/495455#M84506</link>
    <description>&lt;P&gt;Which HEC endpoints are you using &lt;CODE&gt;/services/collector/event&lt;/CODE&gt; OR &lt;CODE&gt;/services/collector/raw&lt;/CODE&gt; ?&lt;/P&gt;</description>
    <pubDate>Mon, 18 May 2020 20:55:13 GMT</pubDate>
    <dc:creator>harsmarvania57</dc:creator>
    <dc:date>2020-05-18T20:55:13Z</dc:date>
    <item>
      <title>TIMESTAMP_PREFIX not finding timestamp in JSON structure.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/TIMESTAMP-PREFIX-not-finding-timestamp-in-JSON-structure/m-p/495450#M84501</link>
      <description>&lt;P&gt;I need some help getting me config right in pros.conf.&lt;/P&gt;

&lt;P&gt;When the data comes I can see the _time is not set to the value passed for TimeStamp. It is set to the time the event was ingested. For legacy reasons we will have a queue between the app and logging hosts so there will be latency on the messages so setting it to the passed time is critical... The one thing I have noticed is that the decimal places on TimeStamp vary form 5 to 7 digits and we are using %9N.  I tried setting this to %3N hoping it would just ignore the characters after but no joy. Do we need to make sure we fix the number of decimals in the logging code?&lt;/P&gt;

&lt;P&gt;I do not see any data issues when checking DataQuality.&lt;/P&gt;

&lt;P&gt;Any help is very much appreciated!&lt;/P&gt;

&lt;P&gt;I am using the following query to evaluate the drift.  I know it is not being set as I have cause a delay by sitting on a breakpoint in the logging code.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=telemetry_*_event_*
| fields _time, TimeStamp, index
| fields - _raw
| eval epoch_time_span=strptime('TimeStamp',"%Y-%m-%dT%H:%M:%S.%9N")
| eval diff=epoch_time_span - _time
| table _time, TimeStamp, epoch_time_span, diff, index
| sort diff
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Sample results:&lt;BR /&gt;
_time                           TimeStamp                       epoch_time_span diff&lt;BR /&gt;
2020-05-08T16:04:10.324-0600    2020-05-08T16:04:04.5663643Z    1588953845      -5.758&lt;BR /&gt;
2020-05-08T16:01:19.641-0600    2020-05-08T16:01:19.5349868Z    1588953680      -0.106&lt;BR /&gt;
2020-05-08T15:54:05.559-0600    2020-05-08T15:54:05.4668267Z    1588953245      -0.092&lt;BR /&gt;
2020-05-08T15:54:17.723-0600    2020-05-08T15:54:17.715911Z     1588953258      -0.007&lt;BR /&gt;
2020-05-08T16:01:31.924-0600    2020-05-08T16:01:31.9176148Z    1588953692      -0.006&lt;BR /&gt;
2020-05-08T16:01:34.754-0600    2020-05-08T16:01:34.7519748Z    1588953695      -0.002&lt;/P&gt;

&lt;P&gt;Here is the _raw data from splunk:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{"TimeStamp":"2020-05-08T16:04:20.6492094Z","Level":"Debug","Properties":{"Action":"XXXX","Channel":"XXXX","CorrelationID":"7c003283-a81e-4b11-97ff-c926e53f4fa6","Host":"XXXX","ServiceID":{"Application":{"Name":"XXXX"},"Environment":"development","Tenant":"XXXX"},"ProcessID":"22908","ProcessName":"XXXX","ThreadID":"18872","ThreadName":"XXXX","User":{"Domain":"XXXX","ID":"4","Name":"XXXX","Location":"XXXX","Custom":{"OrganizationCode":"XXXX"}},"Performance":{"DataCallCount":1,"ElapsedTime":122.0,"ElapsedTimeSpan":"0:00:00.122","HasError":false,"Outbound":false,"Ticks":1223834}},"Version":"0.0.1.19100"}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Here is the config:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[telemetry_source_type]
#Internal
pulldown_type = true

#Meta data
category = Structured
description = JSON based source Type for Telemetry events
disabled = false

#We can change these
ANNOTATE_PUNCT = false
BREAK_ONLY_BEFORE_DATE = false
DATETIME_CONFIG = NONE
KV_MODE = json
LINE_BREAKER = ([\r\n]+)
MAX_TIMESTAMP_LOOKAHEAD = 32
NO_BINARY_CHECK = true
SHOULD_LINEMERGE = false
TIME_FORMAT = %Y-%m-%dT%H:%M:%S.%9N
TIME_PREFIX = "TimeStamp":"
TRUNCATE = 4194304
TZ = GMT
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 30 Sep 2020 05:23:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/TIMESTAMP-PREFIX-not-finding-timestamp-in-JSON-structure/m-p/495450#M84501</guid>
      <dc:creator>stirlec</dc:creator>
      <dc:date>2020-09-30T05:23:15Z</dc:date>
    </item>
    <item>
      <title>Re: TIMESTAMP_PREFIX not finding timestamp in JSON structure.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/TIMESTAMP-PREFIX-not-finding-timestamp-in-JSON-structure/m-p/495451#M84502</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;[telemetry_source_type]
SHOULD_LINEMERGE=false
NO_BINARY_CHECK=true
TRUNCATE=0
pulldown_type = true
category = Structured
description = JSON based source Type for Telemetry events
disabled = false
ANNOTATE_PUNCT = false
KV_MODE = json
INDEXED_EXTRACTION = none
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The &lt;CODE&gt;_time&lt;/CODE&gt;  was automatically determined by UTC.&lt;/P&gt;</description>
      <pubDate>Fri, 08 May 2020 23:47:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/TIMESTAMP-PREFIX-not-finding-timestamp-in-JSON-structure/m-p/495451#M84502</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-05-08T23:47:18Z</dc:date>
    </item>
    <item>
      <title>Re: TIMESTAMP_PREFIX not finding timestamp in JSON structure.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/TIMESTAMP-PREFIX-not-finding-timestamp-in-JSON-structure/m-p/495452#M84503</link>
      <description>&lt;P&gt;Thank you for the response!&lt;/P&gt;

&lt;P&gt;Unfortunately it did not work.  I used the exact setting you recommended on my dev server and I still have differences in the _time and my passed TimeStamp.&lt;/P&gt;

&lt;P&gt;Examples:&lt;/P&gt;

&lt;P&gt;_time   epoch_time  TimeStamp   epoch_time_span diff&lt;BR /&gt;
2020-05-14T20:35:41.977-0600    1589488541.977000   2020-05-14T20:35:41.8870067Z    1589488541.887000   -0.09&lt;BR /&gt;
2020-05-14T20:35:54.126-0600    1589488554.126000   2020-05-14T20:35:54.1202827Z    1589488554.120280   -0.006&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 05:25:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/TIMESTAMP-PREFIX-not-finding-timestamp-in-JSON-structure/m-p/495452#M84503</guid>
      <dc:creator>stirlec</dc:creator>
      <dc:date>2020-09-30T05:25:09Z</dc:date>
    </item>
    <item>
      <title>Re: TIMESTAMP_PREFIX not finding timestamp in JSON structure.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/TIMESTAMP-PREFIX-not-finding-timestamp-in-JSON-structure/m-p/495453#M84504</link>
      <description>&lt;P&gt;&lt;CODE&gt;TIME_FORMAT = %FT%T.%9QZ&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 15 May 2020 08:59:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/TIMESTAMP-PREFIX-not-finding-timestamp-in-JSON-structure/m-p/495453#M84504</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-05-15T08:59:26Z</dc:date>
    </item>
    <item>
      <title>Re: TIMESTAMP_PREFIX not finding timestamp in JSON structure.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/TIMESTAMP-PREFIX-not-finding-timestamp-in-JSON-structure/m-p/495454#M84505</link>
      <description>&lt;P&gt;Thanks for the feedback!&lt;/P&gt;

&lt;P&gt;Still no joy.  I am really at a loss. Maybe it is because we are using HEC?  When I test drift I set a breakpoint in the application logging code to cause a delay between the app server timestamp and when it gets delivered.  I cannot get them to match 100% no matter what I try.  My most recent change was to fix the timestamp being generated to yyyy-MM-ddTH:mm:ss.fffK".&lt;/P&gt;

&lt;P&gt;I even built a new source type for the HEC input using the data "Add Data" tool.  It  could see the correct timestamp for sure.  I switched the HEC input to use the new source type...  But when I ran more test load I still got drift.  It generated this:&lt;/P&gt;

&lt;P&gt;[test_json]&lt;BR /&gt;
DATETIME_CONFIG = &lt;BR /&gt;
INDEXED_EXTRACTIONS = json&lt;BR /&gt;
KV_MODE = none&lt;BR /&gt;
LINE_BREAKER = ([\r\n]+)&lt;BR /&gt;
NO_BINARY_CHECK = true&lt;BR /&gt;
TIMESTAMP_FIELDS = TimeStamp&lt;BR /&gt;
TIME_FORMAT = %FT%T.%9QZ&lt;BR /&gt;
TZ = GMT&lt;BR /&gt;
category = Structured&lt;BR /&gt;
description = JavaScript Object Notation format. For more information, visit &lt;A href="http://json.org/" target="_blank"&gt;http://json.org/&lt;/A&gt;&lt;BR /&gt;
disabled = false&lt;BR /&gt;
pulldown_type = true&lt;/P&gt;

&lt;P&gt;5/18/20&lt;BR /&gt;
6:28:53.665 PM&lt;BR /&gt;&lt;BR /&gt;
{"TimeStamp":"2020-05-18T18:28:53.577Z","Level":"Information","Properties":{"Action":"Navitaire.Ncl.Encryption.RSAInitializerFactory.Initialize","Host":"NAVL79606","ServiceID":{"Application":{"Name":"New Skies 4.x.0.0 1L-development Component Host"},"Environment":"development","Tenant":"1L"},"ProcessID":"26960","ProcessName":"C:\Projects\New Skies\4.x\src\bin\Debug\Navitaire.Ncl.ComponentHost.exe","ThreadID":"500","ThreadName":"Navitaire.Ncl.ComponentHost","Error":{"Code":"SecureKey","Level":"Information","Message":"No key file path specified.  Using application runtime directory:\r\nC:\Projects\New Skies\4.x\src\bin\Debug","Type":"RSAInitializerFactory"}},"Version":"0.0.1.19100"}&lt;/P&gt;

&lt;P&gt;NOTE: We are using Splunk.Logging.TraceListener via NUGET to log.  Could it be the way we have that configured?&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 05:28:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/TIMESTAMP-PREFIX-not-finding-timestamp-in-JSON-structure/m-p/495454#M84505</guid>
      <dc:creator>stirlec</dc:creator>
      <dc:date>2020-09-30T05:28:01Z</dc:date>
    </item>
    <item>
      <title>Re: TIMESTAMP_PREFIX not finding timestamp in JSON structure.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/TIMESTAMP-PREFIX-not-finding-timestamp-in-JSON-structure/m-p/495455#M84506</link>
      <description>&lt;P&gt;Which HEC endpoints are you using &lt;CODE&gt;/services/collector/event&lt;/CODE&gt; OR &lt;CODE&gt;/services/collector/raw&lt;/CODE&gt; ?&lt;/P&gt;</description>
      <pubDate>Mon, 18 May 2020 20:55:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/TIMESTAMP-PREFIX-not-finding-timestamp-in-JSON-structure/m-p/495455#M84506</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2020-05-18T20:55:13Z</dc:date>
    </item>
    <item>
      <title>Re: TIMESTAMP_PREFIX not finding timestamp in JSON structure.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/TIMESTAMP-PREFIX-not-finding-timestamp-in-JSON-structure/m-p/495456#M84507</link>
      <description>&lt;P&gt;Thanks all for the inputs.  I finally figured it out and it was not related to pros.conf.  I got into the logging code and found we were not explicitly setting "time" on the HTTP request to the /services/collector/event because we called the wrong version of the Send() method in the Slunk Logging DLL.  Face in Palm. &lt;/P&gt;

&lt;P&gt;The "time" in the HTTP call appears to override whatever you have set up for a source type.  So no matter what I did it used the value passed.  Since we did not use the right Send() method the time defaulted to the transmission time; not the internal logged time.  So that is why my debugger caused it to look like it was drifting. &lt;/P&gt;

&lt;P&gt;Thanks again all!&lt;/P&gt;</description>
      <pubDate>Mon, 18 May 2020 22:17:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/TIMESTAMP-PREFIX-not-finding-timestamp-in-JSON-structure/m-p/495456#M84507</guid>
      <dc:creator>stirlec</dc:creator>
      <dc:date>2020-05-18T22:17:05Z</dc:date>
    </item>
    <item>
      <title>Re: TIMESTAMP_PREFIX not finding timestamp in JSON structure.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/TIMESTAMP-PREFIX-not-finding-timestamp-in-JSON-structure/m-p/495457#M84508</link>
      <description>&lt;P&gt;Hi @stirlec,&lt;/P&gt;

&lt;P&gt;Thanks for asking a question! If you were able to resolve this issue, please click “Accept” directly below the answer to resolve the post.&lt;/P&gt;</description>
      <pubDate>Mon, 18 May 2020 23:09:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/TIMESTAMP-PREFIX-not-finding-timestamp-in-JSON-structure/m-p/495457#M84508</guid>
      <dc:creator>sensitive-thug</dc:creator>
      <dc:date>2020-05-18T23:09:54Z</dc:date>
    </item>
  </channel>
</rss>

