<?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 assign custom JSON field with epoch time as the timestamp for events? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-assign-custom-JSON-field-with-epoch-time-as-the-timestamp/m-p/151509#M30815</link>
    <description>&lt;P&gt;Yep - did but no dice&lt;/P&gt;

&lt;P&gt;[rule::timestamp_hermes]&lt;BR /&gt;
sourcetype = hermes&lt;BR /&gt;
TIME_PREFIX = eventTime:\s+&lt;/P&gt;

&lt;P&gt;is what I appended to the end of props.conf in /opt/splunk/etc/system/local/&lt;/P&gt;

&lt;P&gt;Still doesn't appear to pick up the time.&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 19:00:29 GMT</pubDate>
    <dc:creator>akhanVG</dc:creator>
    <dc:date>2020-09-28T19:00:29Z</dc:date>
    <item>
      <title>How to assign custom JSON field with epoch time as the timestamp for events?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-assign-custom-JSON-field-with-epoch-time-as-the-timestamp/m-p/151505#M30811</link>
      <description>&lt;P&gt;We are inputting JSON fields to splunk. One of the fields &lt;CODE&gt;eventTime&lt;/CODE&gt; should be the event time for the index.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{
    browserType:  Mozilla/5.0 (iPhone; CPU iPhone OS 8_1_3 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12B466 Safari/600.1.4 
    campaignLocation:  null 
    campaignName:  null 
    currentPage:  /test
    eventBy:  application 
    eventName:  pageLoad 
    eventSource:  frontend 
    eventTime:  1424822395 
    ipAddress:  127.1.1.1:45770 
    isMobile:  true 
    referrer:  &lt;A href="http://tfdf.dfdf.com" target="test_blank"&gt;http://tfdf.dfdf.com&lt;/A&gt;
    sessionId:  null 
    userId:  null 
}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The eventTime is in millisecond format (UTC)&lt;/P&gt;

&lt;P&gt;This is what the JSON value looks like raw in the log file&lt;/P&gt;

&lt;P&gt;{"browserType":"Mozilla/5.0 (Linux; Android 5.0; SM-G900V Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.109 Mobile Safari/537.36","campaignLocation":null,"campaignName":null,"currentPage":"/dfd6","eventBy":"application","eventName":"pageLoad","eventSource":"frontend","eventTime":"1424822393","ipAddress":"192.168.1.1:58674","isMobile":true,"referrer":"http:dfsdf,"sessionId":null,"userId":null}&lt;/P&gt;</description>
      <pubDate>Wed, 25 Feb 2015 21:36:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-assign-custom-JSON-field-with-epoch-time-as-the-timestamp/m-p/151505#M30811</guid>
      <dc:creator>akhanVG</dc:creator>
      <dc:date>2015-02-25T21:36:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to assign custom JSON field with epoch time as the timestamp for events?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-assign-custom-JSON-field-with-epoch-time-as-the-timestamp/m-p/151506#M30812</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;TIME_PREFIX = eventTime:\s+
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.1/Data/Configuretimestamprecognition"&gt;Docs on Timestamp Extraction&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Feb 2015 21:41:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-assign-custom-JSON-field-with-epoch-time-as-the-timestamp/m-p/151506#M30812</guid>
      <dc:creator>s2_splunk</dc:creator>
      <dc:date>2015-02-25T21:41:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to assign custom JSON field with epoch time as the timestamp for events?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-assign-custom-JSON-field-with-epoch-time-as-the-timestamp/m-p/151507#M30813</link>
      <description>&lt;P&gt;No dice. Is this supposed to go into the inputs.conf file on the forwarder or some place else?&lt;/P&gt;</description>
      <pubDate>Wed, 25 Feb 2015 21:50:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-assign-custom-JSON-field-with-epoch-time-as-the-timestamp/m-p/151507#M30813</guid>
      <dc:creator>akhanVG</dc:creator>
      <dc:date>2015-02-25T21:50:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to assign custom JSON field with epoch time as the timestamp for events?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-assign-custom-JSON-field-with-epoch-time-as-the-timestamp/m-p/151508#M30814</link>
      <description>&lt;P&gt;Line breaking and timestamp extraction happen on the indexer, so this needs to go in props.conf for your sourcetype and be available on the indexer.&lt;/P&gt;

&lt;P&gt;&lt;A href="http://wiki.splunk.com/Where_do_I_configure_my_Splunk_settings%3F"&gt;Where do I configure my Splunk settings?&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Feb 2015 21:57:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-assign-custom-JSON-field-with-epoch-time-as-the-timestamp/m-p/151508#M30814</guid>
      <dc:creator>s2_splunk</dc:creator>
      <dc:date>2015-02-25T21:57:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to assign custom JSON field with epoch time as the timestamp for events?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-assign-custom-JSON-field-with-epoch-time-as-the-timestamp/m-p/151509#M30815</link>
      <description>&lt;P&gt;Yep - did but no dice&lt;/P&gt;

&lt;P&gt;[rule::timestamp_hermes]&lt;BR /&gt;
sourcetype = hermes&lt;BR /&gt;
TIME_PREFIX = eventTime:\s+&lt;/P&gt;

&lt;P&gt;is what I appended to the end of props.conf in /opt/splunk/etc/system/local/&lt;/P&gt;

&lt;P&gt;Still doesn't appear to pick up the time.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 19:00:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-assign-custom-JSON-field-with-epoch-time-as-the-timestamp/m-p/151509#M30815</guid>
      <dc:creator>akhanVG</dc:creator>
      <dc:date>2020-09-28T19:00:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to assign custom JSON field with epoch time as the timestamp for events?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-assign-custom-JSON-field-with-epoch-time-as-the-timestamp/m-p/151510#M30816</link>
      <description>&lt;P&gt;That's not  what that's supposed to look like. Try this (the backslash in the RegEx is important, you had removed it):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[hermes]
TIME_PREFIX= eventTime:\s+
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 25 Feb 2015 22:02:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-assign-custom-JSON-field-with-epoch-time-as-the-timestamp/m-p/151510#M30816</guid>
      <dc:creator>s2_splunk</dc:creator>
      <dc:date>2015-02-25T22:02:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to assign custom JSON field with epoch time as the timestamp for events?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-assign-custom-JSON-field-with-epoch-time-as-the-timestamp/m-p/151511#M30817</link>
      <description>&lt;P&gt;Yes that is what I have - still no good. I evne tried replacing hermes (the sourcetype) with ecom (the index name) and still no luck.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Feb 2015 22:15:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-assign-custom-JSON-field-with-epoch-time-as-the-timestamp/m-p/151511#M30817</guid>
      <dc:creator>akhanVG</dc:creator>
      <dc:date>2015-02-25T22:15:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to assign custom JSON field with epoch time as the timestamp for events?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-assign-custom-JSON-field-with-epoch-time-as-the-timestamp/m-p/151512#M30818</link>
      <description>&lt;P&gt;OK, your complete props.conf for this sourcetype as it exists on the indexer needs to look like this (assuming every event is on its own line):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[hermes]
TIME_PREFIX=eventTime:\s+
TIME_FORMAT=%s
KV_MODE=json
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If your timestamp is not in fact an epoch time, but milliseconds, try &lt;BR /&gt;
    TIME_FORMAT=%s%3N&lt;/P&gt;

&lt;P&gt;If you can't get it to work, I suggest you use the DataPreview tool in the Splunk UI, but this is very straightforward.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Feb 2015 22:25:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-assign-custom-JSON-field-with-epoch-time-as-the-timestamp/m-p/151512#M30818</guid>
      <dc:creator>s2_splunk</dc:creator>
      <dc:date>2015-02-25T22:25:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to assign custom JSON field with epoch time as the timestamp for events?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-assign-custom-JSON-field-with-epoch-time-as-the-timestamp/m-p/151513#M30819</link>
      <description>&lt;P&gt;Well, I just noticed your raw json up there, so the prefix (of course) needs to be:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    TIME_PREFIX=\"eventTime\":\"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 25 Feb 2015 22:30:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-assign-custom-JSON-field-with-epoch-time-as-the-timestamp/m-p/151513#M30819</guid>
      <dc:creator>s2_splunk</dc:creator>
      <dc:date>2015-02-25T22:30:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to assign custom JSON field with epoch time as the timestamp for events?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-assign-custom-JSON-field-with-epoch-time-as-the-timestamp/m-p/151514#M30820</link>
      <description>&lt;P&gt;Awesome. Should have added the raw JSON. &lt;/P&gt;

&lt;P&gt;This worked. Also I did not have it in EPOCH derp but millisecond so %s%3N worked beautiful.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Feb 2015 22:36:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-assign-custom-JSON-field-with-epoch-time-as-the-timestamp/m-p/151514#M30820</guid>
      <dc:creator>akhanVG</dc:creator>
      <dc:date>2015-02-25T22:36:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to assign custom JSON field with epoch time as the timestamp for events?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-assign-custom-JSON-field-with-epoch-time-as-the-timestamp/m-p/151515#M30821</link>
      <description>&lt;P&gt;You had the raw message up there, I just didn't see it. Please accept the answer, if all works now.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Feb 2015 22:40:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-assign-custom-JSON-field-with-epoch-time-as-the-timestamp/m-p/151515#M30821</guid>
      <dc:creator>s2_splunk</dc:creator>
      <dc:date>2015-02-25T22:40:15Z</dc:date>
    </item>
  </channel>
</rss>

