<?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 Timestamp extraction issue in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Timestamp-extraction-issue/m-p/50405#M12117</link>
    <description>&lt;P&gt;Hi everyone,&lt;/P&gt;

&lt;P&gt;I have the following log line which has two timestamps and we need to get the SECOND one. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Mar  4 18:50:02 ids1-ecojbs-p01 access_combined: 10.142.1.109 - - [04/Mar/2013:10:50:03 -0800]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;
I tried using the wizard that Splunk provides and changed the setting in &lt;BR /&gt;
Manager » Data inputs » Add data » A file or directory of files » Files &amp;amp; directories » Data preview, to the following&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;NO_BINARY_CHECK=1
SHOULD_LINEMERGE=true
TIME_FORMAT=/[%d/%b/%Y:%H:%M%S]/g
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;
But this regex does not seem to be working out&lt;/P&gt;

&lt;P&gt;Other potential log lines (where the second timestamp needs to be extracted), look like &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Mar  4 18:50:02 ids1-ecojbs-p01 syslog: 10.142.1.109 - - [04/Mar/2013:10:50:03 -0800]
Mar  4 18:50:02 ids1-ecojbs-p01 oslog: 10.142.1.109 - - [04/Mar/2013:10:50:03 -0800]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;
Does anybody know what else ought to be configured in the wizard ?&lt;BR /&gt;
Does it need a TIME_PREFIX ?&lt;BR /&gt;
All input (especially by those who know regex) is welcome !&lt;/P&gt;</description>
    <pubDate>Mon, 04 Mar 2013 19:49:19 GMT</pubDate>
    <dc:creator>asarolkar</dc:creator>
    <dc:date>2013-03-04T19:49:19Z</dc:date>
    <item>
      <title>Timestamp extraction issue</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timestamp-extraction-issue/m-p/50405#M12117</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;

&lt;P&gt;I have the following log line which has two timestamps and we need to get the SECOND one. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Mar  4 18:50:02 ids1-ecojbs-p01 access_combined: 10.142.1.109 - - [04/Mar/2013:10:50:03 -0800]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;
I tried using the wizard that Splunk provides and changed the setting in &lt;BR /&gt;
Manager » Data inputs » Add data » A file or directory of files » Files &amp;amp; directories » Data preview, to the following&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;NO_BINARY_CHECK=1
SHOULD_LINEMERGE=true
TIME_FORMAT=/[%d/%b/%Y:%H:%M%S]/g
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;
But this regex does not seem to be working out&lt;/P&gt;

&lt;P&gt;Other potential log lines (where the second timestamp needs to be extracted), look like &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Mar  4 18:50:02 ids1-ecojbs-p01 syslog: 10.142.1.109 - - [04/Mar/2013:10:50:03 -0800]
Mar  4 18:50:02 ids1-ecojbs-p01 oslog: 10.142.1.109 - - [04/Mar/2013:10:50:03 -0800]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;
Does anybody know what else ought to be configured in the wizard ?&lt;BR /&gt;
Does it need a TIME_PREFIX ?&lt;BR /&gt;
All input (especially by those who know regex) is welcome !&lt;/P&gt;</description>
      <pubDate>Mon, 04 Mar 2013 19:49:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timestamp-extraction-issue/m-p/50405#M12117</guid>
      <dc:creator>asarolkar</dc:creator>
      <dc:date>2013-03-04T19:49:19Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp extraction issue</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timestamp-extraction-issue/m-p/50406#M12118</link>
      <description>&lt;P&gt;Not sure what the leading / and trailing /g in your &lt;CODE&gt;TIME_FORMAT&lt;/CODE&gt; is meant to be? It seems a bit like sed syntax...&lt;/P&gt;

&lt;P&gt;The easiest thing would be to pick a &lt;CODE&gt;TIME_PREFIX&lt;/CODE&gt; that makes Splunk jump to the correct timestamp. From there on I'm fairly sure it will recognize the timestamp format itself. Perhaps&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;TIME_PREFIX = - - \[
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;?&lt;/P&gt;</description>
      <pubDate>Mon, 04 Mar 2013 20:20:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timestamp-extraction-issue/m-p/50406#M12118</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2013-03-04T20:20:12Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp extraction issue</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timestamp-extraction-issue/m-p/50407#M12119</link>
      <description>&lt;P&gt;That partly solved the problem.&lt;/P&gt;

&lt;P&gt;I will pose my question once again (this time with more detail)&lt;/P&gt;</description>
      <pubDate>Tue, 05 Mar 2013 01:56:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timestamp-extraction-issue/m-p/50407#M12119</guid>
      <dc:creator>asarolkar</dc:creator>
      <dc:date>2013-03-05T01:56:56Z</dc:date>
    </item>
  </channel>
</rss>

