<?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: index time not getting captured correctly in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/index-time-not-getting-captured-correctly/m-p/480191#M82349</link>
    <description>&lt;P&gt;This is a common mistake:&lt;/P&gt;

&lt;P&gt;MAX_TIMESTAMP_LOOKAHEAD is not a count of how far into the event to look for the date, it is the number of characters after TIME_PREFIX. &lt;/P&gt;

&lt;P&gt;MAX_TIMESTAMP_LOOKAHEAD = 10 would work here.&lt;/P&gt;</description>
    <pubDate>Wed, 30 Sep 2020 02:07:29 GMT</pubDate>
    <dc:creator>rmjharris</dc:creator>
    <dc:date>2020-09-30T02:07:29Z</dc:date>
    <item>
      <title>index time not getting captured correctly</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/index-time-not-getting-captured-correctly/m-p/480184#M82342</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;[some_alarms]
DATETIME_CONFIG =
NO_BINARY_CHECK = true
SHOULD_LINEMERGE = false
TIME_PREFIX = 0x11f4e\"\, \"\$\"\:\ "
category = Custom
disabled = false
pulldown_type = true
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;my data looks like below&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{"alarm": {"attribute": [{"@id": "0x10000", "$": "abc"}, {"@id": "0x11d42", "$": "xyz"}, {"@id": "0x12022", "$": "0"}, {"@id": "0x12c05", "$": "Directly Managed"}, {"@id": "0x13345", "$": "0"}, {"@id": "0x12a07", "$": "0"}, {"@id": "0x12a06", "$": "0"}, {"@id": "0x1000a", "$": "0"}, {"@id": "0x11f4d", "$": "false"}, {"@id": "0x12b4c", "$": "TRAP LINK DOWN IS RECEIVED"}, {"@id": "0x11f4e", "$": "1568205019"}, {"@id": "0x1006e", "$": "abcdfe"}, {"@id": "0x11f50", "$": "2228225"}, {"@id": "0x11f57", "$": "true"}, {"@id": "0x11f56", "$": "1"}, {"@id": "0x11f9b", "$": "true"}, {"@id": "0x129fa", "$": "0x1b30db"}, {"@id": "0x11f9c", "$": "sfdfsfssd"}, {"@id": "0x12d7f", "$": "adddff"}], "@id": "sfdff"}, "@preexisting": false}, {"alarm": {"attribute": [{"@id": "0x10000", "$": "ferewr"}, {"@id": "0x11d42", "$": "rerwe"}, {"@id": "0x12022", "$": "0"}, {"@id": "0x12c05", "$": "Directly Managed"}, {"@id": "0x13345", "$": "0"}, {"@id": "0x12a07", "$": "0"}, {"@id": "0x12a06", "$": "0"}, {"@id": "0x1000a", "$": "2"}, {"@id": "0x11f4d", "$": "false"}, {"@id": "0x12b4c", "$": "LINK UP/DOWN TRAPS RECEIVED IN THE LAST 5 MINUTES EXCEEDS THRESHOLD"}, {"@id": "0x11f4e", "$": "1568205042"}, {"@id": "0x1006e", "$": "RCLI1BS0113"}, {"@id": "0x11f50", "$": "2228231"}, {"@id": "0x11f57", "$": "true"}, {"@id": "0x11f56", "$": "2"}, {"@id": "0x11f9b", "$": "true"}, {"@id": "0x129fa", "$": "0x6ec376"}, {"@id": "0x11f9c", "$": "erwer"}, {"@id": "0x12d7f", "$": "rwre"}], "@id": "tyeyy"}, "@preexisting": false}, 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Problem is my time field is not getting captured correctly. &lt;BR /&gt;
My script runs every 5 minutes and the index is taking the file creation time of alarms.log file not the variable 0x11f4e&lt;BR /&gt;
Please help ASAP. &lt;/P&gt;</description>
      <pubDate>Thu, 12 Sep 2019 04:31:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/index-time-not-getting-captured-correctly/m-p/480184#M82342</guid>
      <dc:creator>surekhasplunk</dc:creator>
      <dc:date>2019-09-12T04:31:51Z</dc:date>
    </item>
    <item>
      <title>Re: index time not getting captured correctly</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/index-time-not-getting-captured-correctly/m-p/480185#M82343</link>
      <description>&lt;P&gt;You need to higher the &lt;CODE&gt;MAX_TIMESTAMP_LOOKAHEAD&lt;/CODE&gt; to something greater than 128 because that's the default which is probably why your timestamp extraction will fail.&lt;/P&gt;

&lt;P&gt;Skalli&lt;/P&gt;</description>
      <pubDate>Thu, 12 Sep 2019 07:33:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/index-time-not-getting-captured-correctly/m-p/480185#M82343</guid>
      <dc:creator>skalliger</dc:creator>
      <dc:date>2019-09-12T07:33:07Z</dc:date>
    </item>
    <item>
      <title>Re: index time not getting captured correctly</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/index-time-not-getting-captured-correctly/m-p/480186#M82344</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
I tried adding MAX_TIMESTAMP_LOOKAHEAD=130&lt;BR /&gt;
but still no luck . Its actually taking the file creation time as in my inputs.conf i have below :&lt;BR /&gt;
[monitor:///xys/abc/erer/alarms.log]&lt;BR /&gt;
disabled = 0&lt;BR /&gt;
host = myhost&lt;BR /&gt;
sourcetype = some_alarms&lt;BR /&gt;
index = abc&lt;/P&gt;

&lt;P&gt;even though i have specified to take the time from time_prefix field its still taking the alarms.log file creation time&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 02:10:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/index-time-not-getting-captured-correctly/m-p/480186#M82344</guid>
      <dc:creator>surekhasplunk</dc:creator>
      <dc:date>2020-09-30T02:10:49Z</dc:date>
    </item>
    <item>
      <title>Re: index time not getting captured correctly</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/index-time-not-getting-captured-correctly/m-p/480187#M82345</link>
      <description>&lt;P&gt;Edit: Ignore my comment, I was confusing things. &lt;/P&gt;

&lt;P&gt;Skalli&lt;/P&gt;</description>
      <pubDate>Thu, 12 Sep 2019 08:28:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/index-time-not-getting-captured-correctly/m-p/480187#M82345</guid>
      <dc:creator>skalliger</dc:creator>
      <dc:date>2019-09-12T08:28:48Z</dc:date>
    </item>
    <item>
      <title>Re: index time not getting captured correctly</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/index-time-not-getting-captured-correctly/m-p/480188#M82346</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Please use below configuration in props.conf on Heavy Forwarder or Indexer whichever comes first from Universal Forwarder.&lt;/P&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[yourSourcetype]
TIME_FORMAT=%s
TIME_PREFIX=0x11f4e\"\, \"\$\"\:\ "
MAX_TIMESTAMP_LOOKAHEAD=10
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If above configuration do not work then can you please confirm, are you using &lt;CODE&gt;INDEXED_EXCTRACTIONS = JSON&lt;/CODE&gt; on UF ?&lt;/P&gt;</description>
      <pubDate>Thu, 12 Sep 2019 10:05:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/index-time-not-getting-captured-correctly/m-p/480188#M82346</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2019-09-12T10:05:00Z</dc:date>
    </item>
    <item>
      <title>Re: index time not getting captured correctly</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/index-time-not-getting-captured-correctly/m-p/480189#M82347</link>
      <description>&lt;P&gt;Hi @harsmarvania57 &lt;BR /&gt;
now that seems to be working but linebreak isn't happening properly all are coming as single event. &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Sep 2019 12:28:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/index-time-not-getting-captured-correctly/m-p/480189#M82347</guid>
      <dc:creator>surekhasplunk</dc:creator>
      <dc:date>2019-09-12T12:28:56Z</dc:date>
    </item>
    <item>
      <title>Re: index time not getting captured correctly</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/index-time-not-getting-captured-correctly/m-p/480190#M82348</link>
      <description>&lt;P&gt;Can you please let us know from where you want to break the event ? &lt;/P&gt;</description>
      <pubDate>Thu, 12 Sep 2019 15:55:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/index-time-not-getting-captured-correctly/m-p/480190#M82348</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2019-09-12T15:55:36Z</dc:date>
    </item>
    <item>
      <title>Re: index time not getting captured correctly</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/index-time-not-getting-captured-correctly/m-p/480191#M82349</link>
      <description>&lt;P&gt;This is a common mistake:&lt;/P&gt;

&lt;P&gt;MAX_TIMESTAMP_LOOKAHEAD is not a count of how far into the event to look for the date, it is the number of characters after TIME_PREFIX. &lt;/P&gt;

&lt;P&gt;MAX_TIMESTAMP_LOOKAHEAD = 10 would work here.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 02:07:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/index-time-not-getting-captured-correctly/m-p/480191#M82349</guid>
      <dc:creator>rmjharris</dc:creator>
      <dc:date>2020-09-30T02:07:29Z</dc:date>
    </item>
    <item>
      <title>Re: index time not getting captured correctly</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/index-time-not-getting-captured-correctly/m-p/480192#M82350</link>
      <description>&lt;P&gt;This is the right answer as far as the timestamp is concerned. To correct the line breaking problem you could try either:&lt;/P&gt;

&lt;P&gt;LINE_BREAKER = (},\s)({"alarm")&lt;/P&gt;

&lt;P&gt;or&lt;/P&gt;

&lt;P&gt;BREAK_ONLY_BEFORE = {"alarm"&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 02:07:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/index-time-not-getting-captured-correctly/m-p/480192#M82350</guid>
      <dc:creator>rmjharris</dc:creator>
      <dc:date>2020-09-30T02:07:35Z</dc:date>
    </item>
    <item>
      <title>Re: index time not getting captured correctly</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/index-time-not-getting-captured-correctly/m-p/480193#M82351</link>
      <description>&lt;P&gt;Oh, right. Thanks for the correction. My mistake. I'll change my comment to prevent confusion. &lt;/P&gt;</description>
      <pubDate>Thu, 12 Sep 2019 17:45:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/index-time-not-getting-captured-correctly/m-p/480193#M82351</guid>
      <dc:creator>skalliger</dc:creator>
      <dc:date>2019-09-12T17:45:21Z</dc:date>
    </item>
    <item>
      <title>Re: index time not getting captured correctly</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/index-time-not-getting-captured-correctly/m-p/480194#M82352</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/53085"&gt;@rmjharris&lt;/a&gt; and &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/15147"&gt;@somesoni2&lt;/a&gt; &lt;/P&gt;

&lt;P&gt;Can you please help me now. I have following data in my props.conf file now and &lt;BR /&gt;
[spectrum_alarms]&lt;BR /&gt;
SHOULD_LINEMERGE = false&lt;BR /&gt;
NO_BINARY_CHECK = true&lt;BR /&gt;
CHARSET = UTF-8&lt;BR /&gt;
disabled = false&lt;BR /&gt;
TIME_PREFIX = {\"\@id\":\ \0x11f4e\"\, \"\$\":\ "&lt;BR /&gt;
TIME_FORMAT = %s&lt;BR /&gt;
INDEXED_EXTRACTIONS = JSON&lt;BR /&gt;
KV_MODE = none&lt;BR /&gt;
category = Custom&lt;BR /&gt;
pulldown_type = 1&lt;BR /&gt;
LINE_BREAKER = (},){&lt;BR /&gt;
SEDCMD-add_closing_bracket = s/\"$/"}/g&lt;BR /&gt;
TRUNCATE=0&lt;BR /&gt;
MAX_TIMESTAMP_LOOKAHEAD=900&lt;/P&gt;

&lt;P&gt;And it seems to be working well with proper json format data. &lt;BR /&gt;
The only problem remaining timeformat. &lt;BR /&gt;
Its making all the events as the file creation time and not the time filed which we have mentioned in the props.conf file. Please help here. &lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 02:07:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/index-time-not-getting-captured-correctly/m-p/480194#M82352</guid>
      <dc:creator>surekhasplunk</dc:creator>
      <dc:date>2020-09-30T02:07:59Z</dc:date>
    </item>
    <item>
      <title>Re: index time not getting captured correctly</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/index-time-not-getting-captured-correctly/m-p/480195#M82353</link>
      <description>&lt;P&gt;@surekhasplunk Sample data which you have provided is not proper JSON events and due to that it is merging all events in single event. So try below configuration&lt;/P&gt;

&lt;P&gt;On Heavy Forwarder/Indexer&lt;/P&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[yourSourcetype]
SHOULD_LINEMERGE=false
LINE_BREAKER=([\r\n\s]+)\{\"alarm\"
SEDCMD-test=s/\,\s?$//g
TIME_FORMAT=%s
TIME_PREFIX=0x11f4e\"\, \"\$\"\:\ "
MAX_TIMESTAMP_LOOKAHEAD=10
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;On SearchHead&lt;/P&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[yourSourcetype]
KV_MODE = json
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;EDIT: Updated Indexer props.conf LINE_BREAKER regex.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Sep 2019 08:05:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/index-time-not-getting-captured-correctly/m-p/480195#M82353</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2019-09-13T08:05:50Z</dc:date>
    </item>
  </channel>
</rss>

