<?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 set TIME_PREFIX for a json file? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/how-to-set-TIME-PREFIX-for-a-json-file/m-p/464289#M80073</link>
    <description>&lt;P&gt;[_json]&lt;BR /&gt;
DATETIME_CONFIG = &lt;BR /&gt;
LINE_BREAKER = ([\r\n]+)&lt;BR /&gt;
disabled = false&lt;BR /&gt;
TIME_FORMAT = %m/%d/%Y %H:%M:%S %z&lt;BR /&gt;
TIME_PREFIX = \"START_DATE\": \"&lt;BR /&gt;
MAX_TIMESTAMP_LOOKAHEAD = 128&lt;BR /&gt;
BREAK_ONLY_BEFORE_DATE = &lt;/P&gt;

&lt;P&gt;This is props.conf file.&lt;/P&gt;</description>
    <pubDate>Wed, 30 Sep 2020 04:09:05 GMT</pubDate>
    <dc:creator>anooshac</dc:creator>
    <dc:date>2020-09-30T04:09:05Z</dc:date>
    <item>
      <title>how to set TIME_PREFIX for a json file?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/how-to-set-TIME-PREFIX-for-a-json-file/m-p/464284#M80068</link>
      <description>&lt;P&gt;I have a JSON file like this. &lt;BR /&gt;
{&lt;BR /&gt;
    "ACC_NAME": "A",&lt;BR /&gt;
    "DEPT": [{&lt;BR /&gt;
        "NAME": "D1",&lt;BR /&gt;
        "PROJECT": [{&lt;BR /&gt;
            "P_NAME": "xyz",&lt;BR /&gt;
            "START_DATE": "1/5/2020 5:01:00",&lt;BR /&gt;
            "END_DATE": "1/31/2020  7:21:32",&lt;BR /&gt;
            "STATUS": "PASS"&lt;BR /&gt;
        }]&lt;BR /&gt;
    }]&lt;BR /&gt;
} &lt;BR /&gt;
I have been trying to set TIME_PREFIX and it's not working. As you can see there are two dates.When I set TIME_PREFIX= START_DATE i got time stamp error. How can i set TIME_PREFIX so that both the dates are included?&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 04:04:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/how-to-set-TIME-PREFIX-for-a-json-file/m-p/464284#M80068</guid>
      <dc:creator>anooshac</dc:creator>
      <dc:date>2020-09-30T04:04:35Z</dc:date>
    </item>
    <item>
      <title>Re: how to set TIME_PREFIX for a json file?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/how-to-set-TIME-PREFIX-for-a-json-file/m-p/464285#M80069</link>
      <description>&lt;P&gt;Hi @anooshac, try below by escaping special characters-&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;TIME_PREFIX= \"START_DATE\": \"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 10 Feb 2020 11:06:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/how-to-set-TIME-PREFIX-for-a-json-file/m-p/464285#M80069</guid>
      <dc:creator>493669</dc:creator>
      <dc:date>2020-02-10T11:06:07Z</dc:date>
    </item>
    <item>
      <title>Re: how to set TIME_PREFIX for a json file?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/how-to-set-TIME-PREFIX-for-a-json-file/m-p/464286#M80070</link>
      <description>&lt;P&gt;Also provide Time_format as per your time format is like below-&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;TIME_FORMAT=%d/%m/%Y %H:%M:%S
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 10 Feb 2020 11:08:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/how-to-set-TIME-PREFIX-for-a-json-file/m-p/464286#M80070</guid>
      <dc:creator>493669</dc:creator>
      <dc:date>2020-02-10T11:08:08Z</dc:date>
    </item>
    <item>
      <title>Re: how to set TIME_PREFIX for a json file?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/how-to-set-TIME-PREFIX-for-a-json-file/m-p/464287#M80071</link>
      <description>&lt;P&gt;hi i tried that and i'm still getting as "Failed to parse timestamp". How can i include the END_DATE aslo?&lt;/P&gt;</description>
      <pubDate>Mon, 10 Feb 2020 11:13:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/how-to-set-TIME-PREFIX-for-a-json-file/m-p/464287#M80071</guid>
      <dc:creator>anooshac</dc:creator>
      <dc:date>2020-02-10T11:13:29Z</dc:date>
    </item>
    <item>
      <title>Re: how to set TIME_PREFIX for a json file?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/how-to-set-TIME-PREFIX-for-a-json-file/m-p/464288#M80072</link>
      <description>&lt;P&gt;Timestamp is assigned with only one field either START_DATE or END_DATE .&lt;BR /&gt;
Can you share your props.conf ? (in code block)&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 04:04:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/how-to-set-TIME-PREFIX-for-a-json-file/m-p/464288#M80072</guid>
      <dc:creator>493669</dc:creator>
      <dc:date>2020-09-30T04:04:38Z</dc:date>
    </item>
    <item>
      <title>Re: how to set TIME_PREFIX for a json file?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/how-to-set-TIME-PREFIX-for-a-json-file/m-p/464289#M80073</link>
      <description>&lt;P&gt;[_json]&lt;BR /&gt;
DATETIME_CONFIG = &lt;BR /&gt;
LINE_BREAKER = ([\r\n]+)&lt;BR /&gt;
disabled = false&lt;BR /&gt;
TIME_FORMAT = %m/%d/%Y %H:%M:%S %z&lt;BR /&gt;
TIME_PREFIX = \"START_DATE\": \"&lt;BR /&gt;
MAX_TIMESTAMP_LOOKAHEAD = 128&lt;BR /&gt;
BREAK_ONLY_BEFORE_DATE = &lt;/P&gt;

&lt;P&gt;This is props.conf file.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 04:09:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/how-to-set-TIME-PREFIX-for-a-json-file/m-p/464289#M80073</guid>
      <dc:creator>anooshac</dc:creator>
      <dc:date>2020-09-30T04:09:05Z</dc:date>
    </item>
    <item>
      <title>Re: how to set TIME_PREFIX for a json file?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/how-to-set-TIME-PREFIX-for-a-json-file/m-p/464290#M80074</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;LINE_BREAKER = ([\r\n]+)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;your JSON is one line?&lt;/P&gt;</description>
      <pubDate>Mon, 10 Feb 2020 12:30:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/how-to-set-TIME-PREFIX-for-a-json-file/m-p/464290#M80074</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-02-10T12:30:52Z</dc:date>
    </item>
    <item>
      <title>Re: how to set TIME_PREFIX for a json file?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/how-to-set-TIME-PREFIX-for-a-json-file/m-p/464291#M80075</link>
      <description>&lt;P&gt;hi @to4kawa , no my json is not a one line file.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Feb 2020 03:25:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/how-to-set-TIME-PREFIX-for-a-json-file/m-p/464291#M80075</guid>
      <dc:creator>anooshac</dc:creator>
      <dc:date>2020-02-11T03:25:41Z</dc:date>
    </item>
    <item>
      <title>Re: how to set TIME_PREFIX for a json file?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/how-to-set-TIME-PREFIX-for-a-json-file/m-p/464292#M80076</link>
      <description>&lt;P&gt;Since you are trying to set timestamp for the events, you can try below configuration.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[_json]
INDEXED_EXTRACTIONS = json
KV_MODE = none
AUTO_KV_JSON = false
TIMESTAMP_FIELDS = DEPT.PROJECT.START_DATE
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 11 Feb 2020 04:00:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/how-to-set-TIME-PREFIX-for-a-json-file/m-p/464292#M80076</guid>
      <dc:creator>manjunathmeti</dc:creator>
      <dc:date>2020-02-11T04:00:47Z</dc:date>
    </item>
    <item>
      <title>Re: how to set TIME_PREFIX for a json file?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/how-to-set-TIME-PREFIX-for-a-json-file/m-p/464293#M80077</link>
      <description>&lt;P&gt;hi @manjunathmeti , thank you so much!!! It is working, and i am getting all the fields of the json file.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Feb 2020 05:39:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/how-to-set-TIME-PREFIX-for-a-json-file/m-p/464293#M80077</guid>
      <dc:creator>anooshac</dc:creator>
      <dc:date>2020-02-11T05:39:44Z</dc:date>
    </item>
  </channel>
</rss>

