<?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: Timestamp splitted in log files in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Timestamp-splitted-in-log-files/m-p/147445#M41208</link>
    <description>&lt;P&gt;sourcetype = mysourcetype | table date, time &lt;/P&gt;

&lt;P&gt;Do you get values for fields date, time?&lt;BR /&gt;
And hope you restarted/refreshed splunk after props.conf change.&lt;/P&gt;</description>
    <pubDate>Wed, 30 Apr 2014 16:06:32 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2014-04-30T16:06:32Z</dc:date>
    <item>
      <title>Timestamp splitted in log files</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timestamp-splitted-in-log-files/m-p/147440#M41203</link>
      <description>&lt;P&gt;Hi all,&lt;BR /&gt;
I'm trying to extract the timestamp from a crappy unstructured logs.&lt;BR /&gt;
Every event is one line with 300 character/digits, and field are in fixed position (example: from 1 to 10 means hostname, from 11 to 12 means status, and so on).&lt;BR /&gt;
I need to compose my timestamp merging 2 different fields: from position 15 to 20 and from position 60 to 66.&lt;/P&gt;

&lt;P&gt;Any hints?&lt;/P&gt;

&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Wed, 30 Apr 2014 13:55:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timestamp-splitted-in-log-files/m-p/147440#M41203</guid>
      <dc:creator>bizza</dc:creator>
      <dc:date>2014-04-30T13:55:50Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp splitted in log files</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timestamp-splitted-in-log-files/m-p/147441#M41204</link>
      <description>&lt;P&gt;Can you post an example of the first 75 characters?&lt;/P&gt;</description>
      <pubDate>Wed, 30 Apr 2014 14:13:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timestamp-splitted-in-log-files/m-p/147441#M41204</guid>
      <dc:creator>lukejadamec</dc:creator>
      <dc:date>2014-04-30T14:13:39Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp splitted in log files</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timestamp-splitted-in-log-files/m-p/147442#M41205</link>
      <description>&lt;P&gt;Just an example, with 1 instead of orig digit and A instead of char, white space are actually the same.&lt;BR /&gt;
Extracted timestamp shoud be 201404300833 in %Y%m&amp;amp;d%H%M format&lt;/P&gt;

&lt;P&gt;1111111111   1.20140430AAA111  11AAAA AAAAA    AA11111111111110833111A   AAAAAAAAA 111111111                  AAAAAAAA1111111&lt;/P&gt;</description>
      <pubDate>Wed, 30 Apr 2014 14:26:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timestamp-splitted-in-log-files/m-p/147442#M41205</guid>
      <dc:creator>bizza</dc:creator>
      <dc:date>2014-04-30T14:26:25Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp splitted in log files</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timestamp-splitted-in-log-files/m-p/147443#M41206</link>
      <description>&lt;P&gt;Based on your example, the following regex will extract the date and time fields.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[\s\S]{13}(?&amp;lt;date&amp;gt;\d{8})[\s\S]{36}(?&amp;lt;time&amp;gt;\d{4})
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You could then combine them at search time using &lt;CODE&gt;eval ts=date.time&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Apr 2014 14:57:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timestamp-splitted-in-log-files/m-p/147443#M41206</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2014-04-30T14:57:51Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp splitted in log files</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timestamp-splitted-in-log-files/m-p/147444#M41207</link>
      <description>&lt;P&gt;I put in my props.conf, in the right sourcetype:&lt;BR /&gt;
EXTRACT-extract_time = your_regex&lt;/P&gt;

&lt;P&gt;And I searched &lt;BR /&gt;
sourcetype = mysourcetype | eval ts=date.time&lt;/P&gt;

&lt;P&gt;If it is supposed to work it don't.&lt;BR /&gt;
What I'm missing?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 16:30:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timestamp-splitted-in-log-files/m-p/147444#M41207</guid>
      <dc:creator>bizza</dc:creator>
      <dc:date>2020-09-28T16:30:20Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp splitted in log files</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timestamp-splitted-in-log-files/m-p/147445#M41208</link>
      <description>&lt;P&gt;sourcetype = mysourcetype | table date, time &lt;/P&gt;

&lt;P&gt;Do you get values for fields date, time?&lt;BR /&gt;
And hope you restarted/refreshed splunk after props.conf change.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Apr 2014 16:06:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timestamp-splitted-in-log-files/m-p/147445#M41208</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-04-30T16:06:32Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp splitted in log files</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timestamp-splitted-in-log-files/m-p/147446#M41209</link>
      <description>&lt;P&gt;Yep, I restarted Splunk after that.&lt;BR /&gt;
Using table command I see correctly date and time fields, and in the left column too, but I'm not able to use it as timestamp in my searches&lt;/P&gt;</description>
      <pubDate>Wed, 30 Apr 2014 16:12:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timestamp-splitted-in-log-files/m-p/147446#M41209</guid>
      <dc:creator>bizza</dc:creator>
      <dc:date>2014-04-30T16:12:09Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp splitted in log files</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timestamp-splitted-in-log-files/m-p/147447#M41210</link>
      <description>&lt;P&gt;Just how, exactly, are you trying to use the date and time fields?&lt;/P&gt;</description>
      <pubDate>Wed, 30 Apr 2014 16:25:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timestamp-splitted-in-log-files/m-p/147447#M41210</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2014-04-30T16:25:50Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp splitted in log files</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timestamp-splitted-in-log-files/m-p/147448#M41211</link>
      <description>&lt;P&gt;I just need to graph data using ts (from eval) as timestamp&lt;/P&gt;</description>
      <pubDate>Wed, 30 Apr 2014 16:36:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timestamp-splitted-in-log-files/m-p/147448#M41211</guid>
      <dc:creator>bizza</dc:creator>
      <dc:date>2014-04-30T16:36:43Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp splitted in log files</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timestamp-splitted-in-log-files/m-p/147449#M41212</link>
      <description>&lt;P&gt;Assuming &lt;CODE&gt;sourcetype=mysourcetype | eval ts=date.time | table date, time, ts&lt;/CODE&gt; produces results, you'll want to convert ts from a string into an integer using &lt;CODE&gt;strptime()&lt;/CODE&gt; and use that value in your graph.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Apr 2014 16:46:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timestamp-splitted-in-log-files/m-p/147449#M41212</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2014-04-30T16:46:48Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp splitted in log files</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timestamp-splitted-in-log-files/m-p/147450#M41213</link>
      <description>&lt;P&gt;sourcetype="mysourcetype" | eval ts=date.time | eval _time = strptime(ts, "%Y%m%d%H%M") | timechart count by my_field &lt;/P&gt;

&lt;P&gt;works great!&lt;/P&gt;

&lt;P&gt;thanks&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 16:30:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timestamp-splitted-in-log-files/m-p/147450#M41213</guid>
      <dc:creator>bizza</dc:creator>
      <dc:date>2020-09-28T16:30:29Z</dc:date>
    </item>
  </channel>
</rss>

