<?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 to extract timestamp from JSON file in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-timestamp-from-JSON-file/m-p/481158#M82469</link>
    <description>&lt;P&gt;prefix is &lt;CODE&gt;a word, letter, or number placed before another.&lt;/CODE&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[your sourcetype]
TIME_PREFIX = received\':\s\'
TIME_FORMAT = %F %T
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 02 Mar 2020 14:54:26 GMT</pubDate>
    <dc:creator>to4kawa</dc:creator>
    <dc:date>2020-03-02T14:54:26Z</dc:date>
    <item>
      <title>How to extract timestamp from JSON file</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-timestamp-from-JSON-file/m-p/481157#M82468</link>
      <description>&lt;P&gt;I am uploading a JSON file into a test index and I'm trying to set the timestamp for and prefix. The events in the JSON file always start as follows:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{'received': '2020-02-27 10:49:07', 'operator_id': None, 'sender':
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I configured the Timestamp format as follows:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;%Y-%m-%dT%H:%M:%S
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and the Timestamp prefix as:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;'(\d{4})-(\d{2})-(\d{2})\s(\d{2}:\d{2}:\d{2})'
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and when I tab out of the field, I still get the message of, "No results found. Please change source type, adjust source type settings, or check your source file."&lt;/P&gt;

&lt;P&gt;Is there something wrong with my format or prefix (or both)?&lt;/P&gt;

&lt;P&gt;Thx &lt;/P&gt;</description>
      <pubDate>Mon, 02 Mar 2020 13:34:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-timestamp-from-JSON-file/m-p/481157#M82468</guid>
      <dc:creator>jwalzerpitt</dc:creator>
      <dc:date>2020-03-02T13:34:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract timestamp from JSON file</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-timestamp-from-JSON-file/m-p/481158#M82469</link>
      <description>&lt;P&gt;prefix is &lt;CODE&gt;a word, letter, or number placed before another.&lt;/CODE&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[your sourcetype]
TIME_PREFIX = received\':\s\'
TIME_FORMAT = %F %T
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 02 Mar 2020 14:54:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-timestamp-from-JSON-file/m-p/481158#M82469</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-03-02T14:54:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract timestamp from JSON file</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-timestamp-from-JSON-file/m-p/481159#M82470</link>
      <description>&lt;P&gt;Yes, JSON is not valid. Put keys and string values in double quotes like below, change Timestamp format to &lt;STRONG&gt;%Y-%m-%d %H:%M:%S&lt;/STRONG&gt; and add new setting (under Advanced dropdown) &lt;STRONG&gt;TIMESTAMP_FIELDS = received&lt;/STRONG&gt;.&lt;/P&gt;

&lt;P&gt;{"received": "2020-02-27 10:49:07", "operator_id": "None", "sender": "A"}&lt;/P&gt;</description>
      <pubDate>Mon, 02 Mar 2020 15:04:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-timestamp-from-JSON-file/m-p/481159#M82470</guid>
      <dc:creator>manjunathmeti</dc:creator>
      <dc:date>2020-03-02T15:04:15Z</dc:date>
    </item>
  </channel>
</rss>

