<?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 same as log message time in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Index-time-not-same-as-log-message-time/m-p/61683#M12308</link>
    <description>&lt;P&gt;I'm confused about the /whaterver/is/displayed/in ...&lt;BR /&gt;
Reading the article they had [source::/Applications/splunk/var/spool/splunk] but the source types documents says things like:&lt;BR /&gt;
access_combined&lt;BR /&gt;
access_combined_wcookie&lt;BR /&gt;
asterisk_queue&lt;/P&gt;

&lt;P&gt;Currently I think my sourcetype is syslog&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 14:05:12 GMT</pubDate>
    <dc:creator>jalfrey</dc:creator>
    <dc:date>2020-09-28T14:05:12Z</dc:date>
    <item>
      <title>Index time not same as log message time</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Index-time-not-same-as-log-message-time/m-p/61681#M12306</link>
      <description>&lt;P&gt;I just setup another splunk server. Foolishly I forgot to turn on NTP and the system clock was way off. The first chunk of log messages came in via Syslog and are indexed on when the were received by syslog (local time) not the correct date/time that appears in the log message. &lt;/P&gt;

&lt;P&gt;Jun 12 03:59:58 10.0.59.59 id=firewall sn=0017C569F354 time="2013-06-12 10:59:59" fw=10.0.59.59 pri=6 c=1024 m=537 msg="Connection Closed" app=49176 sess=Web n=3268362 usr="admin" src=10.0.0.236:54609:X1 dst=10.0.59.59:80:X1 proto=tcp/http sent=775 rcvd=1659 &lt;/P&gt;

&lt;P&gt;As you can see from the log above the local time is: "12 03:59:58" where the log message time (remote) is time="2013-06-12 10:59:59"&lt;/P&gt;

&lt;P&gt;do I need to teach splunk how to extract that date/time field or do I need to switch splunk to index based on log source time instead? If so how do I do that?&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jun 2013 18:12:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Index-time-not-same-as-log-message-time/m-p/61681#M12306</guid>
      <dc:creator>jalfrey</dc:creator>
      <dc:date>2013-06-12T18:12:12Z</dc:date>
    </item>
    <item>
      <title>Re: Index time not same as log message time</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Index-time-not-same-as-log-message-time/m-p/61682#M12307</link>
      <description>&lt;P&gt;Splunk tries to find the timestamp in an event automatically. This works sometimes, but not in your case.&lt;/P&gt;

&lt;P&gt;You can read about time stamp assignement &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Data/HowSplunkextractstimestamps"&gt;here&lt;/A&gt; and there is even an example of what can be done if events contain more than one timestamp &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Data/ConfigurePositionalTimestampExtraction"&gt;here&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;What you have to do to get started is create a props.conf file in $SPLUNK_HOME/etc/system/local&lt;BR /&gt;
Insert the following:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[source::/whatever/is/displayed/in/the/source/field/of/your/events]
TIME_PREFIX = time="
TIME_FORMAT = %Y-%m-%d %H:%M:%S 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And then restart Splunk&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jun 2013 21:13:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Index-time-not-same-as-log-message-time/m-p/61682#M12307</guid>
      <dc:creator>chris</dc:creator>
      <dc:date>2013-06-12T21:13:44Z</dc:date>
    </item>
    <item>
      <title>Re: Index time not same as log message time</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Index-time-not-same-as-log-message-time/m-p/61683#M12308</link>
      <description>&lt;P&gt;I'm confused about the /whaterver/is/displayed/in ...&lt;BR /&gt;
Reading the article they had [source::/Applications/splunk/var/spool/splunk] but the source types documents says things like:&lt;BR /&gt;
access_combined&lt;BR /&gt;
access_combined_wcookie&lt;BR /&gt;
asterisk_queue&lt;/P&gt;

&lt;P&gt;Currently I think my sourcetype is syslog&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 14:05:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Index-time-not-same-as-log-message-time/m-p/61683#M12308</guid>
      <dc:creator>jalfrey</dc:creator>
      <dc:date>2020-09-28T14:05:12Z</dc:date>
    </item>
    <item>
      <title>Re: Index time not same as log message time</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Index-time-not-same-as-log-message-time/m-p/61684#M12309</link>
      <description>&lt;P&gt;Hi jalfrey, you can apply  props stanzas to sources or sourcetypes. The source is the path to a file the sourcetype is used to classify different sources with the same format. It is a good thing to work with sourcetypes. Splunk comes with predefined sourcetypes but you can also create your own if you have home grown applications with special log formats. I posted the example with the [source::xy] stanza because I thought it's the easiest way to start. Here is more Info:&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Data/Whysourcetypesmatter"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Data/Whysourcetypesmatter&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jun 2013 21:37:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Index-time-not-same-as-log-message-time/m-p/61684#M12309</guid>
      <dc:creator>chris</dc:creator>
      <dc:date>2013-06-13T21:37:06Z</dc:date>
    </item>
  </channel>
</rss>

