<?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 How do I extract the timestamp from this log? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-the-timestamp-from-this-log/m-p/375222#M110251</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;

&lt;P&gt;Kindly help to exaction the time stamp from the below log.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Aug 23 05:10:50&lt;/STRONG&gt; 1.1.1.1 Aug 22 2017 19:10:51: %ASA-6-302014: Teardown TCP connection 418825708 for inside:1.1.1.1/88 to VMWare-Internal-DMZ:10.1.1.1/12345 duration 0:00:00 bytes 1880 TCP FINs&lt;/P&gt;

&lt;P&gt;We need to extract the bold time for particular host. How do you write the regular expression?&lt;/P&gt;

&lt;P&gt;[host::1.1.1.1]&lt;BR /&gt;
TIME_PREFIX = ?&lt;BR /&gt;
MAX_TIMESTAMP_LOOKAHEAD = ?&lt;/P&gt;

&lt;P&gt;Thanks advance&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 15:25:14 GMT</pubDate>
    <dc:creator>sumitkathpal292</dc:creator>
    <dc:date>2020-09-29T15:25:14Z</dc:date>
    <item>
      <title>How do I extract the timestamp from this log?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-the-timestamp-from-this-log/m-p/375222#M110251</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;

&lt;P&gt;Kindly help to exaction the time stamp from the below log.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Aug 23 05:10:50&lt;/STRONG&gt; 1.1.1.1 Aug 22 2017 19:10:51: %ASA-6-302014: Teardown TCP connection 418825708 for inside:1.1.1.1/88 to VMWare-Internal-DMZ:10.1.1.1/12345 duration 0:00:00 bytes 1880 TCP FINs&lt;/P&gt;

&lt;P&gt;We need to extract the bold time for particular host. How do you write the regular expression?&lt;/P&gt;

&lt;P&gt;[host::1.1.1.1]&lt;BR /&gt;
TIME_PREFIX = ?&lt;BR /&gt;
MAX_TIMESTAMP_LOOKAHEAD = ?&lt;/P&gt;

&lt;P&gt;Thanks advance&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 15:25:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-the-timestamp-from-this-log/m-p/375222#M110251</guid>
      <dc:creator>sumitkathpal292</dc:creator>
      <dc:date>2020-09-29T15:25:14Z</dc:date>
    </item>
    <item>
      <title>Re: How do I extract the timestamp from this log?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-the-timestamp-from-this-log/m-p/375223#M110252</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;

&lt;P&gt;You just can use:&lt;/P&gt;

&lt;P&gt;TIME_PREFIX = ^&lt;BR /&gt;
TIME_FORMAT = %b %d %H:%M:%S&lt;/P&gt;

&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 15:29:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-the-timestamp-from-this-log/m-p/375223#M110252</guid>
      <dc:creator>gfuente</dc:creator>
      <dc:date>2020-09-29T15:29:24Z</dc:date>
    </item>
    <item>
      <title>Re: How do I extract the timestamp from this log?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-the-timestamp-from-this-log/m-p/375224#M110253</link>
      <description>&lt;P&gt;[my_sourcetype]&lt;BR /&gt;
TIME_PREFIX = ^&lt;BR /&gt;
MAX_TIMESTAMP_LOOKAHEAD = 17&lt;BR /&gt;
TIME_FORMAT = %b %d %H:%M:%S&lt;BR /&gt;
LINE_BREAKER = ([\r\n]+)\w+\s\d+\s\d+:\d+:\d+&lt;BR /&gt;
SHOULD_LINEMERGE = False&lt;BR /&gt;
TRUNCATE = 10000&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 15:29:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-the-timestamp-from-this-log/m-p/375224#M110253</guid>
      <dc:creator>skoelpin</dc:creator>
      <dc:date>2020-09-29T15:29:40Z</dc:date>
    </item>
    <item>
      <title>Re: How do I extract the timestamp from this log?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-the-timestamp-from-this-log/m-p/375225#M110254</link>
      <description>&lt;P&gt;Not working . Issue is if i run for real time or last 15 minutes Splunk default props works fine however if i search let's say 5AM logs then it picks  date  Aug 22 and time from first which is 05:10:50.&lt;BR /&gt;
It should pick time and date as Aug 23 05:10:50&lt;/P&gt;

&lt;P&gt;Aug 23 05:10:50 1.1.1.1 Aug 22 2017 19:10:51: %ASA-6-302014: Teardown TCP connection 418825708 for inside:1.1.1.1/88 to VMWare-Internal-DMZ:10.1.1.1/12345 duration 0:00:00 bytes 1880 TCP FINs.&lt;/P&gt;

&lt;P&gt;Help?&lt;/P&gt;</description>
      <pubDate>Thu, 24 Aug 2017 14:47:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-the-timestamp-from-this-log/m-p/375225#M110254</guid>
      <dc:creator>sumitkathpal292</dc:creator>
      <dc:date>2017-08-24T14:47:29Z</dc:date>
    </item>
    <item>
      <title>Re: How do I extract the timestamp from this log?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-the-timestamp-from-this-log/m-p/375226#M110255</link>
      <description>&lt;P&gt;i  have to define in props.conf right , anything in transforms.conf?&lt;/P&gt;</description>
      <pubDate>Thu, 24 Aug 2017 15:53:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-the-timestamp-from-this-log/m-p/375226#M110255</guid>
      <dc:creator>sumitkathpal292</dc:creator>
      <dc:date>2017-08-24T15:53:17Z</dc:date>
    </item>
    <item>
      <title>Re: How do I extract the timestamp from this log?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-the-timestamp-from-this-log/m-p/375227#M110256</link>
      <description>&lt;P&gt;any help?&lt;/P&gt;</description>
      <pubDate>Sat, 26 Aug 2017 09:15:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-the-timestamp-from-this-log/m-p/375227#M110256</guid>
      <dc:creator>sumitkathpal292</dc:creator>
      <dc:date>2017-08-26T09:15:53Z</dc:date>
    </item>
    <item>
      <title>Re: How do I extract the timestamp from this log?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-the-timestamp-from-this-log/m-p/375228#M110257</link>
      <description>&lt;P&gt;Yes you define this in &lt;CODE&gt;props.conf&lt;/CODE&gt;, make sure to replace &lt;CODE&gt;my_sourcetype&lt;/CODE&gt; with your sourcetype name.. After you set this you have to restart splunkd&lt;/P&gt;</description>
      <pubDate>Sat, 26 Aug 2017 13:27:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-the-timestamp-from-this-log/m-p/375228#M110257</guid>
      <dc:creator>skoelpin</dc:creator>
      <dc:date>2017-08-26T13:27:01Z</dc:date>
    </item>
    <item>
      <title>Re: How do I extract the timestamp from this log?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-the-timestamp-from-this-log/m-p/375229#M110258</link>
      <description>&lt;P&gt;This is because you didn't specify the &lt;CODE&gt;MAX_TIMESTAMP_LOOKAHEAD&lt;/CODE&gt; attribute. This defaults to 150 characters relative to your &lt;CODE&gt;TIME_PREFIX&lt;/CODE&gt; attribute. So Splunk may be getting confused since you have 2 timestamps in the first 150 characters. Look at my answer below to see the full base configs you should set in &lt;CODE&gt;props.conf&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 26 Aug 2017 13:31:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-the-timestamp-from-this-log/m-p/375229#M110258</guid>
      <dc:creator>skoelpin</dc:creator>
      <dc:date>2017-08-26T13:31:50Z</dc:date>
    </item>
    <item>
      <title>Re: How do I extract the timestamp from this log?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-the-timestamp-from-this-log/m-p/375230#M110259</link>
      <description>&lt;P&gt;Did this solve your question? If so, can you accept it?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2017 12:17:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-the-timestamp-from-this-log/m-p/375230#M110259</guid>
      <dc:creator>skoelpin</dc:creator>
      <dc:date>2017-08-29T12:17:42Z</dc:date>
    </item>
    <item>
      <title>Re: How do I extract the timestamp from this log?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-the-timestamp-from-this-log/m-p/375231#M110260</link>
      <description>&lt;P&gt;@skoelpin No &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2017 12:39:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-the-timestamp-from-this-log/m-p/375231#M110260</guid>
      <dc:creator>sumitkathpal292</dc:creator>
      <dc:date>2017-08-29T12:39:36Z</dc:date>
    </item>
    <item>
      <title>Re: How do I extract the timestamp from this log?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-the-timestamp-from-this-log/m-p/375232#M110261</link>
      <description>&lt;P&gt;Can you elaborate more on what the issue is? The &lt;CODE&gt;props.conf&lt;/CODE&gt; entry I provided you will work, I tested it!&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2017 14:48:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-the-timestamp-from-this-log/m-p/375232#M110261</guid>
      <dc:creator>skoelpin</dc:creator>
      <dc:date>2017-08-29T14:48:51Z</dc:date>
    </item>
    <item>
      <title>Re: How do I extract the timestamp from this log?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-the-timestamp-from-this-log/m-p/375233#M110262</link>
      <description>&lt;P&gt;If your just looking to extract the bold portion then the extraction will look like this &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;(?&amp;lt;NAME&amp;gt;\w+\s\d+\s+\d+:\d+:\d+)&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2017 14:50:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-the-timestamp-from-this-log/m-p/375233#M110262</guid>
      <dc:creator>skoelpin</dc:creator>
      <dc:date>2017-08-29T14:50:55Z</dc:date>
    </item>
    <item>
      <title>Re: How do I extract the timestamp from this log?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-the-timestamp-from-this-log/m-p/375234#M110263</link>
      <description>&lt;P&gt;[cisco:asa]&lt;BR /&gt;
TIME_PREFIX = ^&lt;BR /&gt;
MAX_TIMESTAMP_LOOKAHEAD = 17&lt;BR /&gt;
TIME_FORMAT = %b %d %H:%M:%S&lt;BR /&gt;
LINE_BREAKER = (?\w+\s\d+\s+\d+:\d+:\d+)&lt;BR /&gt;
SHOULD_LINEMERGE = False&lt;BR /&gt;
TRUNCATE = 10000&lt;/P&gt;

&lt;P&gt;Should i try this ?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 15:31:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-the-timestamp-from-this-log/m-p/375234#M110263</guid>
      <dc:creator>sumitkathpal292</dc:creator>
      <dc:date>2020-09-29T15:31:45Z</dc:date>
    </item>
    <item>
      <title>Re: How do I extract the timestamp from this log?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-the-timestamp-from-this-log/m-p/375235#M110264</link>
      <description>&lt;P&gt;Is &lt;CODE&gt;cisco:asa&lt;/CODE&gt; your sourcetype? If so then yes&lt;/P&gt;

&lt;P&gt;Are you just trying to extract the bold part out or do you want it to timestamp correctly based off the second timestamp? &lt;/P&gt;</description>
      <pubDate>Wed, 30 Aug 2017 13:17:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-the-timestamp-from-this-log/m-p/375235#M110264</guid>
      <dc:creator>skoelpin</dc:creator>
      <dc:date>2017-08-30T13:17:16Z</dc:date>
    </item>
  </channel>
</rss>

