<?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: create table based on end time and time limit in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/create-table-based-on-end-time-and-time-limit/m-p/449794#M127348</link>
    <description>&lt;P&gt;It is correct this process ended before its limit.&lt;BR /&gt;
Only the time distinguishes it&lt;/P&gt;</description>
    <pubDate>Sat, 21 Jul 2018 16:27:15 GMT</pubDate>
    <dc:creator>Carolina</dc:creator>
    <dc:date>2018-07-21T16:27:15Z</dc:date>
    <item>
      <title>create table based on end time and time limit</title>
      <link>https://community.splunk.com/t5/Splunk-Search/create-table-based-on-end-time-and-time-limit/m-p/449792#M127346</link>
      <description>&lt;P&gt;Hi, &lt;/P&gt;

&lt;P&gt;i need to create a table with the following conditions:&lt;BR /&gt;
This is my log:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;proceso,start,end,diferencia,tiempo
PRUEBA02,19:10:00.00,01:00:00.00,05:10:00.00,22:50:00.10
PRUEBA03,01:00:00.00,03:00:00.00,02:00:00.00,04:00:00.00
PRUEBA04,22:00:00.00,00:00:00.00,03:00:00.00,23:00:00.00
PRUEBA05,18:00:00.00,04:00:00.00,10:00:00.00,22:30:00.00
PRUEBA06,21:00:00.00,02:00:00.00,05:00:00.00,01:00:00.00
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I require to alert when the  &lt;STRONG&gt;tiempo&lt;/STRONG&gt; field is greater the end field. &lt;BR /&gt;
The fields have a format of 24 hours. &lt;BR /&gt;
In addition, some processes may end earlier than planned&lt;/P&gt;

&lt;P&gt;I use the command &lt;STRONG&gt;where&lt;/STRONG&gt; but but as a result it shows me the events that ended earlier and its limit is the next day.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source="pruebajob.csv" host="LAPTOP-3UME9D0Q" index="test"
| eval time1=strftime(strptime(tiempo,"%H:%M:%S.%2N"),"%H")
| eval time2=strftime(strptime(end,"%H:%M:%S.%2N"),"%H")
| eval time3=strftime(strptime(diferencia,"%H:%M:%S.%2N"),"%H")
| eval value=time1+time3
| eval compare=if(time1&amp;gt;time2,value,time3)
| where time1&amp;lt;compare
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;it is possible to create create a table?&lt;/P&gt;</description>
      <pubDate>Sat, 21 Jul 2018 14:26:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/create-table-based-on-end-time-and-time-limit/m-p/449792#M127346</guid>
      <dc:creator>Carolina</dc:creator>
      <dc:date>2018-07-21T14:26:23Z</dc:date>
    </item>
    <item>
      <title>Re: create table based on end time and time limit</title>
      <link>https://community.splunk.com/t5/Splunk-Search/create-table-based-on-end-time-and-time-limit/m-p/449793#M127347</link>
      <description>&lt;P&gt;From the above example for the process PRUEBA02, tiempo : 22:50:00.10 , end :01:00:00.00&lt;BR /&gt;
How do you distinguish between current day or next day? Is this process completed before the limit which is 01 AM?&lt;/P&gt;</description>
      <pubDate>Sat, 21 Jul 2018 14:47:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/create-table-based-on-end-time-and-time-limit/m-p/449793#M127347</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2018-07-21T14:47:49Z</dc:date>
    </item>
    <item>
      <title>Re: create table based on end time and time limit</title>
      <link>https://community.splunk.com/t5/Splunk-Search/create-table-based-on-end-time-and-time-limit/m-p/449794#M127348</link>
      <description>&lt;P&gt;It is correct this process ended before its limit.&lt;BR /&gt;
Only the time distinguishes it&lt;/P&gt;</description>
      <pubDate>Sat, 21 Jul 2018 16:27:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/create-table-based-on-end-time-and-time-limit/m-p/449794#M127348</guid>
      <dc:creator>Carolina</dc:creator>
      <dc:date>2018-07-21T16:27:15Z</dc:date>
    </item>
    <item>
      <title>Re: create table based on end time and time limit</title>
      <link>https://community.splunk.com/t5/Splunk-Search/create-table-based-on-end-time-and-time-limit/m-p/449795#M127349</link>
      <description>&lt;P&gt;Hi Carolina,&lt;BR /&gt;
you have to transform times in epochtime before comparing, something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; source="pruebajob.csv" host="LAPTOP-3UME9D0Q" index="test"
| eval et_end=strptime(end,"%H:%M:%S.%2N"), et_tiempo=strptime(tiempo,"%H:%M:%S.%2N")
| where et_tiempo&amp;gt;et_end
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Sat, 21 Jul 2018 16:40:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/create-table-based-on-end-time-and-time-limit/m-p/449795#M127349</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2018-07-21T16:40:34Z</dc:date>
    </item>
    <item>
      <title>Re: create table based on end time and time limit</title>
      <link>https://community.splunk.com/t5/Splunk-Search/create-table-based-on-end-time-and-time-limit/m-p/449796#M127350</link>
      <description>&lt;P&gt;Thank you !&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jul 2018 23:17:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/create-table-based-on-end-time-and-time-limit/m-p/449796#M127350</guid>
      <dc:creator>Carolina</dc:creator>
      <dc:date>2018-07-25T23:17:09Z</dc:date>
    </item>
  </channel>
</rss>

