<?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: problem extracting timestamps in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/problem-extracting-timestamps/m-p/77584#M15875</link>
    <description>&lt;P&gt;It's strange. Please clean event at all, then try to re-index the file.&lt;/P&gt;</description>
    <pubDate>Mon, 18 Jun 2012 12:13:42 GMT</pubDate>
    <dc:creator>Takajian</dc:creator>
    <dc:date>2012-06-18T12:13:42Z</dc:date>
    <item>
      <title>problem extracting timestamps</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/problem-extracting-timestamps/m-p/77579#M15870</link>
      <description>&lt;P&gt;I'm unable to get correct timestamps for my snmptrap log-file.&lt;/P&gt;

&lt;P&gt;This is an example of an snmptrap :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;2012-06-18 11:55:12 servername [UDP: [10.10.10.10]:32768-&amp;gt;[0.0.0.0]:0]:
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Splunk does not take 2012-06-18 11:55:12 as timestamp, instead it takes the last-modified date of the log-file which remains the same as it is an always-edited file.&lt;/P&gt;

&lt;P&gt;I've tried with following settings in props.conf :&lt;BR /&gt;
&lt;CODE&gt;[snmptrap]&lt;BR /&gt;
SHOULD_LINEMERGE=False&lt;BR /&gt;
TIME_PREFIX=&lt;BR /&gt;
TIME_FORMAT=%Y-%m-%d %H:%M:%S&lt;BR /&gt;
LINE_BREAKER=([\r\n]+)\d{4}-\d{2}-\d{2}\s\d{d}&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;But still not getting the correct timestamp.&lt;BR /&gt;
What am I doing wrong?&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jun 2012 10:20:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/problem-extracting-timestamps/m-p/77579#M15870</guid>
      <dc:creator>StefNighthawk</dc:creator>
      <dc:date>2012-06-18T10:20:09Z</dc:date>
    </item>
    <item>
      <title>Re: problem extracting timestamps</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/problem-extracting-timestamps/m-p/77580#M15871</link>
      <description>&lt;P&gt;If you change your props.conf, it will not affect until you reboot splunk and re-index the data. And you do not need "LINE_BREAKER" setting when "SHOULD_LINEMERGE=false". &lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 11:57:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/problem-extracting-timestamps/m-p/77580#M15871</guid>
      <dc:creator>Takajian</dc:creator>
      <dc:date>2020-09-28T11:57:18Z</dc:date>
    </item>
    <item>
      <title>Re: problem extracting timestamps</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/problem-extracting-timestamps/m-p/77581#M15872</link>
      <description>&lt;P&gt;I've restarted the entire server instead of the splunk service only.&lt;BR /&gt;
Thus the log file has been recreated and with it it's modification time.&lt;BR /&gt;
Currently I have no way to tell whether Splunk is using the file modification time or the timestamp.&lt;/P&gt;

&lt;P&gt;I already see that timestartpos and timeendpos have values.&lt;BR /&gt;
The weird thing is that the timestamping went OK for more than two days and then suddenly stopped. Before I configured TIME*&lt;EM&gt;&lt;EM&gt;FORMAT the timestartpos and timeendpos were (0,20), when timestamping broke their value became null and now with TIME&lt;/EM&gt;&lt;/EM&gt;*FORMAT its (0,19).&lt;/P&gt;

&lt;P&gt;I hope timestamping will stay correct this time.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 11:57:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/problem-extracting-timestamps/m-p/77581#M15872</guid>
      <dc:creator>StefNighthawk</dc:creator>
      <dc:date>2020-09-28T11:57:20Z</dc:date>
    </item>
    <item>
      <title>Re: problem extracting timestamps</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/problem-extracting-timestamps/m-p/77582#M15873</link>
      <description>&lt;P&gt;I think I can index your timestamp of the file by default setting. How did you log the snmptrap to the file? Does the file contains the timestamp as you described? &lt;/P&gt;</description>
      <pubDate>Mon, 18 Jun 2012 11:30:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/problem-extracting-timestamps/m-p/77582#M15873</guid>
      <dc:creator>Takajian</dc:creator>
      <dc:date>2012-06-18T11:30:37Z</dc:date>
    </item>
    <item>
      <title>Re: problem extracting timestamps</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/problem-extracting-timestamps/m-p/77583#M15874</link>
      <description>&lt;P&gt;I used snmptrapd from net-snmp to create a log-file locally on the splunk server. Each event in the file starts with the timestamp like &lt;EM&gt;2012-06-18 11:55:12&lt;/EM&gt;. Until yesterday there was no problem using the default setting.&lt;BR /&gt;
Once splunk started to use the file modification time instead of the timestamp events started to no longer be properly split.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jun 2012 11:50:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/problem-extracting-timestamps/m-p/77583#M15874</guid>
      <dc:creator>StefNighthawk</dc:creator>
      <dc:date>2012-06-18T11:50:34Z</dc:date>
    </item>
    <item>
      <title>Re: problem extracting timestamps</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/problem-extracting-timestamps/m-p/77584#M15875</link>
      <description>&lt;P&gt;It's strange. Please clean event at all, then try to re-index the file.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jun 2012 12:13:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/problem-extracting-timestamps/m-p/77584#M15875</guid>
      <dc:creator>Takajian</dc:creator>
      <dc:date>2012-06-18T12:13:42Z</dc:date>
    </item>
  </channel>
</rss>

