<?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: TIME_PREFIX in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/TIME-PREFIX/m-p/63598#M12775</link>
    <description>&lt;P&gt;Let me rephrase. Is there any function like this?&lt;/P&gt;

&lt;P&gt;index=gops STATUS=closed | eval close_date=strptime(CLOSE_DATE,"%m/%d/%y %H:%M") | where close_date&amp;gt;datediff (@now, -30m)&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 11:53:12 GMT</pubDate>
    <dc:creator>shangshin</dc:creator>
    <dc:date>2020-09-28T11:53:12Z</dc:date>
    <item>
      <title>TIME_PREFIX</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/TIME-PREFIX/m-p/63593#M12770</link>
      <description>&lt;P&gt;I have an autosys log with 4 columns (JobName|Start|End|Status) and would like to add them in splunk.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Check_Job|05/22/2012 02:09:17|05/22/2012 02:09:18|SUCCESS
Extract_Job|05/22/2012 03:09:17|05/22/2012 03:09:18|SUCCESS
Database_Job|05/22/2012 02:09:17||RUNNING
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Two questions --&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;How can I set the primary event time to be end time (column 3)? Can I use TIME_PREFIX=\d{2}/\d{2}/\d{4} \d{2}:\d{2}:\d{2}&lt;/LI&gt;
&lt;LI&gt;Is it possible to set a secondary event time?&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Wed, 30 May 2012 14:27:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/TIME-PREFIX/m-p/63593#M12770</guid>
      <dc:creator>shangshin</dc:creator>
      <dc:date>2012-05-30T14:27:51Z</dc:date>
    </item>
    <item>
      <title>Re: TIME_PREFIX</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/TIME-PREFIX/m-p/63594#M12771</link>
      <description>&lt;P&gt;This link has an example that I included on your previous question.  Splunk will only use one timestamp to represent the event time.&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Data/Configurepositionaltimestampextraction" target="_blank"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Data/Configurepositionaltimestampextraction&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Once you get the regex ok for the TIME_PREFIX you will also need to set MAX_TIMESTAMP_LOOKAHEAD.  In this case i think set it to 50.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 11:53:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/TIME-PREFIX/m-p/63594#M12771</guid>
      <dc:creator>sdaniels</dc:creator>
      <dc:date>2020-09-28T11:53:04Z</dc:date>
    </item>
    <item>
      <title>Re: TIME_PREFIX</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/TIME-PREFIX/m-p/63595#M12772</link>
      <description>&lt;P&gt;The string length of the first column, job name, is between 3 - 60 characters. How can I be sure splunk won't pick start time as the event time knowing the timestamp format of start and end time is identical?&lt;/P&gt;</description>
      <pubDate>Wed, 30 May 2012 14:53:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/TIME-PREFIX/m-p/63595#M12772</guid>
      <dc:creator>shangshin</dc:creator>
      <dc:date>2012-05-30T14:53:41Z</dc:date>
    </item>
    <item>
      <title>Re: TIME_PREFIX</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/TIME-PREFIX/m-p/63596#M12773</link>
      <description>&lt;P&gt;Yes, that makes it more challenging.  I think this is what you were looking for...manipulating the second date field anyways and leaving the current time stamp as is.&lt;/P&gt;

&lt;P&gt;&lt;A href="http://splunk-base.splunk.com/answers/4249/searching-mulitple-time-fields-within-a-record"&gt;http://splunk-base.splunk.com/answers/4249/searching-mulitple-time-fields-within-a-record&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 May 2012 14:56:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/TIME-PREFIX/m-p/63596#M12773</guid>
      <dc:creator>sdaniels</dc:creator>
      <dc:date>2012-05-30T14:56:36Z</dc:date>
    </item>
    <item>
      <title>Re: TIME_PREFIX</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/TIME-PREFIX/m-p/63597#M12774</link>
      <description>&lt;P&gt;This is not a bad solution. Is it possible to use relative time for the function strptime? (e.g. -30m or -2h)&lt;BR /&gt;
The reason I am asking this is because I need to set up an alert and using a specific time won't be feasible.&lt;/P&gt;</description>
      <pubDate>Wed, 30 May 2012 15:39:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/TIME-PREFIX/m-p/63597#M12774</guid>
      <dc:creator>shangshin</dc:creator>
      <dc:date>2012-05-30T15:39:23Z</dc:date>
    </item>
    <item>
      <title>Re: TIME_PREFIX</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/TIME-PREFIX/m-p/63598#M12775</link>
      <description>&lt;P&gt;Let me rephrase. Is there any function like this?&lt;/P&gt;

&lt;P&gt;index=gops STATUS=closed | eval close_date=strptime(CLOSE_DATE,"%m/%d/%y %H:%M") | where close_date&amp;gt;datediff (@now, -30m)&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 11:53:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/TIME-PREFIX/m-p/63598#M12775</guid>
      <dc:creator>shangshin</dc:creator>
      <dc:date>2020-09-28T11:53:12Z</dc:date>
    </item>
    <item>
      <title>Re: TIME_PREFIX</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/TIME-PREFIX/m-p/63599#M12776</link>
      <description>&lt;P&gt;relative_time will do the magic. I am good. thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 30 May 2012 15:54:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/TIME-PREFIX/m-p/63599#M12776</guid>
      <dc:creator>shangshin</dc:creator>
      <dc:date>2012-05-30T15:54:31Z</dc:date>
    </item>
    <item>
      <title>Re: TIME_PREFIX</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/TIME-PREFIX/m-p/63600#M12777</link>
      <description>&lt;P&gt;not sure if those will apply to anything other than the indexed _time for the event but i'm not sure exactly what you are referencing.  You can caluculate the time now() in epoch time and do conversions i think...just not as elegant a solution. &lt;A href="http://splunk-base.splunk.com/answers/117/how-do-i-get-the-current-time"&gt;http://splunk-base.splunk.com/answers/117/how-do-i-get-the-current-time&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 May 2012 15:58:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/TIME-PREFIX/m-p/63600#M12777</guid>
      <dc:creator>sdaniels</dc:creator>
      <dc:date>2012-05-30T15:58:57Z</dc:date>
    </item>
  </channel>
</rss>

