<?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: simple timestamp extraction from log file in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/simple-timestamp-extraction-from-log-file/m-p/106166#M22347</link>
    <description>&lt;P&gt;Hi lguinn,&lt;/P&gt;

&lt;P&gt;Thanks for getting back to me.  Oddly the escaped paths were in fact there, not sure why the unescaped ones were posted - my bad.&lt;/P&gt;

&lt;P&gt;The sourcetype is set to 'snmp', and has a number of hosts writing to it - all data in the 'snmp' sourcetype has this issue.&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Thu, 26 Jul 2012 21:53:48 GMT</pubDate>
    <dc:creator>a_splunk_user</dc:creator>
    <dc:date>2012-07-26T21:53:48Z</dc:date>
    <item>
      <title>simple timestamp extraction from log file</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/simple-timestamp-extraction-from-log-file/m-p/106161#M22342</link>
      <description>&lt;P&gt;All of my data from an snmp log file has timestamps which are the modified date of the log file:&lt;BR /&gt;
&lt;CODE&gt;&lt;BR /&gt;
7/5/12&lt;BR /&gt;
2:50:50.000 PM&lt;BR /&gt;
&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;However, I need the associated timestamp for every event within that log file.&lt;BR /&gt;
&lt;CODE&gt;2012-07-23 16:18:32 abc.xyz.net [UDP: [111.222.333.444]:26263-&amp;gt;[0.0.0.0]:0]:&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;This timestamp format seems to be fairly common, so I don't believe I will need to modify the $SPLUNK_HOME/etc/datetime.xml file.&lt;/P&gt;

&lt;P&gt;I must be missing something obvious, but I'm a bit confused as to where else to look.  I believe I have read all the docs and most of the questions out there regarding similar issues.&lt;/P&gt;

&lt;P&gt;Here is my props.conf:&lt;BR /&gt;
&lt;CODE&gt;&lt;BR /&gt;
[source::C:\usr\log\snmptrapd.log]&lt;BR /&gt;
TIME_FORMAT = %Y-%m-%d %H:%M:%S&lt;BR /&gt;
MAX_TIMESTAMP_LOOKAHEAD = 25&lt;BR /&gt;
SHOULD_LINEMERGE = true&lt;BR /&gt;
&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Thanks in advance for any advice!&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 12:08:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/simple-timestamp-extraction-from-log-file/m-p/106161#M22342</guid>
      <dc:creator>a_splunk_user</dc:creator>
      <dc:date>2020-09-28T12:08:03Z</dc:date>
    </item>
    <item>
      <title>Re: simple timestamp extraction from log file</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/simple-timestamp-extraction-from-log-file/m-p/106162#M22343</link>
      <description>&lt;P&gt;Where is your props.conf - on the indexer(s) or on the forwarder? What kind of forwarder?&lt;/P&gt;

&lt;P&gt;Timestamp extraction is part of the data parsing phase. It cannot be done on a Universal Forwarder. So, your props.conf needs to go wherever the parsing occurs - on the indexer(s). Or, if you are using a heavy forwarder, on the heavy forwarder.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jul 2012 20:52:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/simple-timestamp-extraction-from-log-file/m-p/106162#M22343</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2012-07-23T20:52:12Z</dc:date>
    </item>
    <item>
      <title>Re: simple timestamp extraction from log file</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/simple-timestamp-extraction-from-log-file/m-p/106163#M22344</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Sorry for not being clear on that.  The props.conf is on the indexer, reading snmp data from a local log file.&lt;/P&gt;

&lt;P&gt;Thx&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jul 2012 13:44:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/simple-timestamp-extraction-from-log-file/m-p/106163#M22344</guid>
      <dc:creator>a_splunk_user</dc:creator>
      <dc:date>2012-07-24T13:44:22Z</dc:date>
    </item>
    <item>
      <title>Re: simple timestamp extraction from log file</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/simple-timestamp-extraction-from-log-file/m-p/106164#M22345</link>
      <description>&lt;P&gt;This is still an issue - any help is appreciated please.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jul 2012 14:00:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/simple-timestamp-extraction-from-log-file/m-p/106164#M22345</guid>
      <dc:creator>a_splunk_user</dc:creator>
      <dc:date>2012-07-26T14:00:35Z</dc:date>
    </item>
    <item>
      <title>Re: simple timestamp extraction from log file</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/simple-timestamp-extraction-from-log-file/m-p/106165#M22346</link>
      <description>&lt;P&gt;Maybe this is the problem. I found this in the documentation for &lt;STRONG&gt;props.conf&lt;/STRONG&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;**Considerations for Windows file paths:**

When you specify Windows-based file paths as part of a [source::&amp;lt;source&amp;gt;] stanza, you must
escape any backslashes contained within the specified file path.

Example: [source::c:\\path_to\\file.txt]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So try this instead:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[source::C:\\usr\\log\\snmptrapd.log]
TIME_FORMAT = %Y-%m-%d %H:%M:%S
MAX_TIMESTAMP_LOOKAHEAD = 25
SHOULD_LINEMERGE = true
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Also, just in case this isn't the problem - what sourcetype is assigned to this data?&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jul 2012 20:02:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/simple-timestamp-extraction-from-log-file/m-p/106165#M22346</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2012-07-26T20:02:45Z</dc:date>
    </item>
    <item>
      <title>Re: simple timestamp extraction from log file</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/simple-timestamp-extraction-from-log-file/m-p/106166#M22347</link>
      <description>&lt;P&gt;Hi lguinn,&lt;/P&gt;

&lt;P&gt;Thanks for getting back to me.  Oddly the escaped paths were in fact there, not sure why the unescaped ones were posted - my bad.&lt;/P&gt;

&lt;P&gt;The sourcetype is set to 'snmp', and has a number of hosts writing to it - all data in the 'snmp' sourcetype has this issue.&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jul 2012 21:53:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/simple-timestamp-extraction-from-log-file/m-p/106166#M22347</guid>
      <dc:creator>a_splunk_user</dc:creator>
      <dc:date>2012-07-26T21:53:48Z</dc:date>
    </item>
    <item>
      <title>Re: simple timestamp extraction from log file</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/simple-timestamp-extraction-from-log-file/m-p/106167#M22348</link>
      <description>&lt;P&gt;I checked to see if "snmp" is a built-in sourcetype, and it is not. So I would love to see the props.conf that references the snmp sourcetype, and any transforms.conf stanzas as well.&lt;/P&gt;

&lt;P&gt;Otherwise, I am out of ideas.... &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jul 2012 08:08:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/simple-timestamp-extraction-from-log-file/m-p/106167#M22348</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2012-07-27T08:08:59Z</dc:date>
    </item>
    <item>
      <title>Re: simple timestamp extraction from log file</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/simple-timestamp-extraction-from-log-file/m-p/106168#M22349</link>
      <description>&lt;P&gt;The solution ended up being a modified props.conf file like so:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[snmp]
NO_BINARY_CHECK = 1
pulldown_type = 1
TIME_FORMAT = %Y-%m-%d %H:%M:%S
MAX_TIMESTAMP_LOOKAHEAD = 25
SHOULD_LINEMERGE = true
BREAK_ONLY_BEFORE_DATE = TRUE
TIME_PREFIX = ^
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Once that is done I can search on sourcetype=snmp, and the timestamps are correctly registered with Splunk.&lt;/P&gt;

&lt;P&gt;Hope this helps others!&lt;/P&gt;</description>
      <pubDate>Thu, 09 Aug 2012 15:08:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/simple-timestamp-extraction-from-log-file/m-p/106168#M22349</guid>
      <dc:creator>a_splunk_user</dc:creator>
      <dc:date>2012-08-09T15:08:13Z</dc:date>
    </item>
  </channel>
</rss>

