<?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 do I recognize a time in epoch seconds? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-recognize-a-time-in-epoch-seconds/m-p/79039#M16195</link>
    <description>&lt;P&gt;No luck. I added&lt;BR /&gt;
TIME_PREFIX=^&lt;BR /&gt;
and then did&lt;BR /&gt;
  splunk stop&lt;BR /&gt;
  splunk clear eventdata&lt;BR /&gt;
  splunk start&lt;BR /&gt;
and the data from that file still shows up identified with "timestamp=none" and the time of all the events reading as the file time.&lt;/P&gt;</description>
    <pubDate>Thu, 28 Oct 2010 01:52:16 GMT</pubDate>
    <dc:creator>bselig</dc:creator>
    <dc:date>2010-10-28T01:52:16Z</dc:date>
    <item>
      <title>How do I recognize a time in epoch seconds?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-recognize-a-time-in-epoch-seconds/m-p/79037#M16193</link>
      <description>&lt;P&gt;Total newbie here.&lt;/P&gt;

&lt;P&gt;I have a data file (a few lines here):&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;1280718483,204.28.227.23:53;5;5.49;13;2183;2183;0;0;0-2103;2-0;3-48;5-32;15-0;*-0;2183;0;0;0;0&lt;BR /&gt;
1280718543,204.28.227.23:53;5;5.75;6;16;16;0;0;0-16;2-0;3-0;5-0;15-0;*-0;16;0;0;0;0&lt;BR /&gt;
1280804716,204.28.227.23:53;4;6.74;77;2412;2412;0;0;0-2332;2-0;3-48;5-32;15-0;*-0;2410;2;0;0;0&lt;BR /&gt;
1280804776,204.28.227.23:53;5;5.57;14;2391;2391;0;0;0-2343;2-0;3-0;5-48;15-0;*-0;2391;0;0;0;0
&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;The actual file has 500+ lines (events?) going back several months.&lt;/P&gt;

&lt;P&gt;The first number in each line (e.g.128071848) is the date in seconds since the epoch.&lt;/P&gt;

&lt;P&gt;How can I get splunk (using 4.1.5) to recognize this as the date?&lt;/P&gt;

&lt;P&gt;The file is called "tns-stats-0.log.0" located in /home/lis/log/lis and I have the following in etc/system/local/props.conf.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;[source::.../lis/tns-stats-0.log.0]&lt;BR /&gt;
TIME_FORMAT=%s
&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;which is supposed to, from what I can gather, treat the format as seconds since epoch.&lt;/P&gt;

&lt;P&gt;Yet, splunk insists on assigning all of the events the time associated with the file itself.&lt;/P&gt;

&lt;P&gt;Someone please tell me what I'm missing here. Based on what I've read in other answers and the splunk docs, this should work.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Oct 2010 00:02:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-recognize-a-time-in-epoch-seconds/m-p/79037#M16193</guid>
      <dc:creator>bselig</dc:creator>
      <dc:date>2010-10-28T00:02:53Z</dc:date>
    </item>
    <item>
      <title>Re: How do I recognize a time in epoch seconds?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-recognize-a-time-in-epoch-seconds/m-p/79038#M16194</link>
      <description>&lt;P&gt;Try adding TIME_PREFIX=^ and perhaps take a look at MAX_TIMESTAMP_LOOKAHEAD if the rest of the event text might include something that looks like an epoch time.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Oct 2010 00:33:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-recognize-a-time-in-epoch-seconds/m-p/79038#M16194</guid>
      <dc:creator>cfrantsen</dc:creator>
      <dc:date>2010-10-28T00:33:03Z</dc:date>
    </item>
    <item>
      <title>Re: How do I recognize a time in epoch seconds?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-recognize-a-time-in-epoch-seconds/m-p/79039#M16195</link>
      <description>&lt;P&gt;No luck. I added&lt;BR /&gt;
TIME_PREFIX=^&lt;BR /&gt;
and then did&lt;BR /&gt;
  splunk stop&lt;BR /&gt;
  splunk clear eventdata&lt;BR /&gt;
  splunk start&lt;BR /&gt;
and the data from that file still shows up identified with "timestamp=none" and the time of all the events reading as the file time.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Oct 2010 01:52:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-recognize-a-time-in-epoch-seconds/m-p/79039#M16195</guid>
      <dc:creator>bselig</dc:creator>
      <dc:date>2010-10-28T01:52:16Z</dc:date>
    </item>
    <item>
      <title>Re: How do I recognize a time in epoch seconds?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-recognize-a-time-in-epoch-seconds/m-p/79040#M16196</link>
      <description>&lt;P&gt;Add the following to props.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;TIME_FORMAT=%s
TIME_PREFIX=^
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 28 Oct 2010 02:09:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-recognize-a-time-in-epoch-seconds/m-p/79040#M16196</guid>
      <dc:creator>ftk</dc:creator>
      <dc:date>2010-10-28T02:09:06Z</dc:date>
    </item>
    <item>
      <title>Re: How do I recognize a time in epoch seconds?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-recognize-a-time-in-epoch-seconds/m-p/79041#M16197</link>
      <description>&lt;P&gt;Have tried that in that order and reversed (though maybe the prefix info should be seen first). After I changed props.conf in etc/system/local I stopped splunk, cleaned evendata and restarted splunk.&lt;BR /&gt;
Still getting the same results where in the events table it shows "_time" as the file time and "timestamp" as 'none'.&lt;/P&gt;

&lt;P&gt;Seems like your suggestion is how it should work (that's what I've been trying), but it insists on not behaving that way and I'm at a loss as to where to look to see why. Any insight into splunk logs that might have info about either not finding the data or not interping it right?&lt;/P&gt;</description>
      <pubDate>Thu, 28 Oct 2010 02:50:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-recognize-a-time-in-epoch-seconds/m-p/79041#M16197</guid>
      <dc:creator>bselig</dc:creator>
      <dc:date>2010-10-28T02:50:52Z</dc:date>
    </item>
    <item>
      <title>Re: How do I recognize a time in epoch seconds?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-recognize-a-time-in-epoch-seconds/m-p/79042#M16198</link>
      <description>&lt;P&gt;Hmm, are we certain that your props.conf line is hitting? With the ... it should hit, but would you mind using the full path to the log file (or using sourcetype instead) and trying this again?&lt;/P&gt;</description>
      <pubDate>Thu, 28 Oct 2010 03:36:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-recognize-a-time-in-epoch-seconds/m-p/79042#M16198</guid>
      <dc:creator>ftk</dc:creator>
      <dc:date>2010-10-28T03:36:47Z</dc:date>
    </item>
    <item>
      <title>Re: How do I recognize a time in epoch seconds?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-recognize-a-time-in-epoch-seconds/m-p/79043#M16199</link>
      <description>&lt;P&gt;Yeah. The open question I had was if the props.conf file is hitting. I did try the full absolute path to the file to no avail.&lt;BR /&gt;
One of the things that isn't real clear to a newbie like myself is which of the various props.conf one should be modifying. This is currently in system/local. Will try sourcetype next.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Oct 2010 03:50:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-recognize-a-time-in-epoch-seconds/m-p/79043#M16199</guid>
      <dc:creator>bselig</dc:creator>
      <dc:date>2010-10-28T03:50:57Z</dc:date>
    </item>
    <item>
      <title>Re: How do I recognize a time in epoch seconds?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-recognize-a-time-in-epoch-seconds/m-p/79044#M16200</link>
      <description>&lt;P&gt;OK - here's what seems to be necessary.&lt;/P&gt;

&lt;P&gt;First - in etc/system/local/props.conf put the sourcetype and the format:&lt;BR /&gt;
[tns-stats]&lt;BR /&gt;&lt;BR /&gt;
TIME_FORMAT=%s&lt;BR /&gt;&lt;BR /&gt;
Doing it with a source path spec seems to not take.&lt;/P&gt;

&lt;P&gt;THEN (and this seems to be the secret sauce), in etc/apps/search/input.conf have&lt;/P&gt;

&lt;P&gt;[monitor:///home/lis/log/lis/tns-stats-0.log.0]&lt;BR /&gt;&lt;BR /&gt;
sourcetype = tns-stats  &lt;/P&gt;

&lt;P&gt;and then it assigns the right timestamp to each event line.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Oct 2010 03:59:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-recognize-a-time-in-epoch-seconds/m-p/79044#M16200</guid>
      <dc:creator>bselig</dc:creator>
      <dc:date>2010-10-28T03:59:26Z</dc:date>
    </item>
    <item>
      <title>Re: How do I recognize a time in epoch seconds?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-recognize-a-time-in-epoch-seconds/m-p/79045#M16201</link>
      <description>&lt;P&gt;CRAP! - what I put gets munged together by this input box - the "[tns-stats]" and "TIME_FORMAT=%s" should be on separate lines. Same for the "[monitor:///home/lis/log/lis/tns-stats-0.log.0]" and "sourcetype = tns-stats" that goes in input.conf.&lt;BR /&gt;
--- hope that's readable (is there markup for these comment boxes so one can be more informative?)&lt;/P&gt;</description>
      <pubDate>Thu, 28 Oct 2010 04:01:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-recognize-a-time-in-epoch-seconds/m-p/79045#M16201</guid>
      <dc:creator>bselig</dc:creator>
      <dc:date>2010-10-28T04:01:44Z</dc:date>
    </item>
    <item>
      <title>Re: How do I recognize a time in epoch seconds?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-recognize-a-time-in-epoch-seconds/m-p/79046#M16202</link>
      <description>&lt;P&gt;The REAL answer is that you appear to have to use sourcetype and not just [source::] in props.conf:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;[tns-stats]&lt;BR /&gt;
TIME_FORMAT=%s
&lt;/CODE&gt;  &lt;/P&gt;

&lt;P&gt;AND, then you have to define the sourcetype in apps/search/input.conf:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;
[monitor:///home/lis/log/lis/tns-stats-0.log.0]&lt;BR /&gt;
sourcetype = tns-stats&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;which seems a bit odd to me since I thought the global spec would be seen before the app level spec, but then what do I know.&lt;/P&gt;

&lt;P&gt;Anyway, this now works.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Oct 2010 04:05:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-recognize-a-time-in-epoch-seconds/m-p/79046#M16202</guid>
      <dc:creator>bselig</dc:creator>
      <dc:date>2010-10-28T04:05:44Z</dc:date>
    </item>
    <item>
      <title>Re: How do I recognize a time in epoch seconds?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-recognize-a-time-in-epoch-seconds/m-p/79047#M16203</link>
      <description>&lt;P&gt;Thanks to ftk for nudging me towards the sourcetype route. I did the "answer my own question" so I could better format a succinct answer fo those that come after.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Oct 2010 04:07:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-recognize-a-time-in-epoch-seconds/m-p/79047#M16203</guid>
      <dc:creator>bselig</dc:creator>
      <dc:date>2010-10-28T04:07:18Z</dc:date>
    </item>
    <item>
      <title>Re: How do I recognize a time in epoch seconds?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-recognize-a-time-in-epoch-seconds/m-p/79048#M16204</link>
      <description>&lt;P&gt;As for markup in comments, you can use the backtick (above the ~) to escape code.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Oct 2010 07:14:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-recognize-a-time-in-epoch-seconds/m-p/79048#M16204</guid>
      <dc:creator>ftk</dc:creator>
      <dc:date>2010-10-28T07:14:39Z</dc:date>
    </item>
  </channel>
</rss>

