<?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 lookahead in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/timestamp-lookahead/m-p/432887#M170693</link>
    <description>&lt;P&gt;Hello&lt;/P&gt;

&lt;P&gt;i have this event for example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;$changeSystemTimeCmd 1533808153 -newTime 1533808153 -oldTime 1533808147
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;i need to set the timestamp to take the first number after the first string. in this can it is &lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;$changeSystemTimeCmd&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;but it can be any string.&lt;BR /&gt;
i tried with timestamp lookahead 30 but the problem is that i can't know what will be the length of this first string&lt;BR /&gt;
how can i set timestamp lookahead regex to take the first number after first string ?&lt;/P&gt;</description>
    <pubDate>Tue, 18 Jun 2019 12:02:37 GMT</pubDate>
    <dc:creator>sarit_s</dc:creator>
    <dc:date>2019-06-18T12:02:37Z</dc:date>
    <item>
      <title>timestamp lookahead</title>
      <link>https://community.splunk.com/t5/Splunk-Search/timestamp-lookahead/m-p/432887#M170693</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;

&lt;P&gt;i have this event for example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;$changeSystemTimeCmd 1533808153 -newTime 1533808153 -oldTime 1533808147
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;i need to set the timestamp to take the first number after the first string. in this can it is &lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;$changeSystemTimeCmd&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;but it can be any string.&lt;BR /&gt;
i tried with timestamp lookahead 30 but the problem is that i can't know what will be the length of this first string&lt;BR /&gt;
how can i set timestamp lookahead regex to take the first number after first string ?&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jun 2019 12:02:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/timestamp-lookahead/m-p/432887#M170693</guid>
      <dc:creator>sarit_s</dc:creator>
      <dc:date>2019-06-18T12:02:37Z</dc:date>
    </item>
    <item>
      <title>Re: timestamp lookahead</title>
      <link>https://community.splunk.com/t5/Splunk-Search/timestamp-lookahead/m-p/432888#M170694</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;You can use below configuration on Indexer/Heavy Forwarder whichever comes from UF to setup timestamp at index time if you don't have any whitespace in first string.&lt;/P&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[yoursourcetype]
TIME_FORMAT=%s
TIME_PREFIX=^(?:[^\s]+)\s
MAX_TIMESTAMP_LOOKAHEAD=10
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 18 Jun 2019 12:18:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/timestamp-lookahead/m-p/432888#M170694</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2019-06-18T12:18:18Z</dc:date>
    </item>
    <item>
      <title>Re: timestamp lookahead</title>
      <link>https://community.splunk.com/t5/Splunk-Search/timestamp-lookahead/m-p/432889#M170695</link>
      <description>&lt;P&gt;i don't have indexer or HF&lt;BR /&gt;
im running on all in one configuration so the sourcetype configuration located on props.conf in the app&lt;/P&gt;

&lt;P&gt;it is working ! can you please explain why MAX_TIMESTAMP_LOOKAHEAD=10 ?&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 00:59:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/timestamp-lookahead/m-p/432889#M170695</guid>
      <dc:creator>sarit_s</dc:creator>
      <dc:date>2020-09-30T00:59:56Z</dc:date>
    </item>
    <item>
      <title>Re: timestamp lookahead</title>
      <link>https://community.splunk.com/t5/Splunk-Search/timestamp-lookahead/m-p/432890#M170696</link>
      <description>&lt;P&gt;If you are running standalone splunk instance then also it will work. I have tested same config in Add Data in my lab splunk instance and it is working for me.  &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;MAX_TIMESTAMP_LOOKAHEAD&lt;/CODE&gt; will count after &lt;CODE&gt;TIME_PREFIX&lt;/CODE&gt;, in above config &lt;CODE&gt;TIME_PREFIX&lt;/CODE&gt; regex cover till first whitespace so this &lt;CODE&gt;$changeSystemTimeCmd&lt;/CODE&gt; is captured with TIME_PREFIX regex and after that you have 10 digit epoch time format so I have given 10 in &lt;CODE&gt;MAX_TIMESTAMP_LOOKAHEAD&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 00:59:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/timestamp-lookahead/m-p/432890#M170696</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2020-09-30T00:59:59Z</dc:date>
    </item>
    <item>
      <title>Re: timestamp lookahead</title>
      <link>https://community.splunk.com/t5/Splunk-Search/timestamp-lookahead/m-p/432891#M170697</link>
      <description>&lt;P&gt;thanks for your answer&lt;BR /&gt;
it is working&lt;/P&gt;

&lt;P&gt;i see it is also work without MAX_TIMESTAMP_LOOKAHEAD &lt;BR /&gt;
the thing is that im afraid that the epoch time will be with more than 10 digits so if it is not necessary to limit i think it will be better&lt;/P&gt;

&lt;P&gt;what do you think ?&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 01:00:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/timestamp-lookahead/m-p/432891#M170697</guid>
      <dc:creator>sarit_s</dc:creator>
      <dc:date>2020-09-30T01:00:01Z</dc:date>
    </item>
    <item>
      <title>Re: timestamp lookahead</title>
      <link>https://community.splunk.com/t5/Splunk-Search/timestamp-lookahead/m-p/432892#M170698</link>
      <description>&lt;P&gt;If you do not set &lt;CODE&gt;MAX_TIMESTAMP_LOOKAHEAD&lt;/CODE&gt; then it will take default value which is 128 character, I'll suggest to define &lt;CODE&gt;MAX_TIMESTAMP_LOOKAHEAD&lt;/CODE&gt; with max length of your epoch time.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jun 2019 12:35:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/timestamp-lookahead/m-p/432892#M170698</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2019-06-18T12:35:56Z</dc:date>
    </item>
  </channel>
</rss>

