<?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: how do I clac time out using eval in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/how-do-I-clac-time-out-using-eval/m-p/145166#M40423</link>
    <description>&lt;P&gt;OUT time &amp;gt; (current_time + 1hr) then mark status as TIMEOUT else 'ACTIVE'&lt;/P&gt;</description>
    <pubDate>Mon, 08 Jun 2015 23:18:00 GMT</pubDate>
    <dc:creator>SasiB137</dc:creator>
    <dc:date>2015-06-08T23:18:00Z</dc:date>
    <item>
      <title>how do I clac time out using eval</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-do-I-clac-time-out-using-eval/m-p/145164#M40421</link>
      <description>&lt;P&gt;in,out,name&lt;BR /&gt;
05-06-2015 11:37:04,05-06-2015 11:37:04 ,uid2&lt;BR /&gt;
05-06-2015 11:36:06,,uid2&lt;/P&gt;

&lt;P&gt;how do I do this,&lt;BR /&gt;
If out time is not in the event and &lt;BR /&gt;
OUT time &amp;gt; (current_time + 1hr) then mark status as TIMEOUT&lt;/P&gt;

&lt;P&gt;lets say now is 05-06-2015 12:47:00 then expected output should be as &lt;/P&gt;

&lt;P&gt;==================================&lt;BR /&gt;
in,out,name&lt;BR /&gt;
05-06-2015 11:37:04,05-06-2015 11:37:04 ,uid2  -&amp;gt; expected is -&amp;gt; LOGOUT&lt;/P&gt;

&lt;H1&gt;05-06-2015 11:36:06,,uid2 -&amp;gt; TIMEOUT &lt;/H1&gt;</description>
      <pubDate>Mon, 08 Jun 2015 22:47:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-do-I-clac-time-out-using-eval/m-p/145164#M40421</guid>
      <dc:creator>SasiB137</dc:creator>
      <dc:date>2015-06-08T22:47:09Z</dc:date>
    </item>
    <item>
      <title>Re: how do I clac time out using eval</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-do-I-clac-time-out-using-eval/m-p/145165#M40422</link>
      <description>&lt;P&gt;Like this (probably not exactly what you need but I am having trouble comprehending your example; this should get you started anyway):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | eval status=if(isnull(out), "TIMEOUT", "LOGOUT") | table in out name status
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 08 Jun 2015 23:08:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-do-I-clac-time-out-using-eval/m-p/145165#M40422</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-06-08T23:08:12Z</dc:date>
    </item>
    <item>
      <title>Re: how do I clac time out using eval</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-do-I-clac-time-out-using-eval/m-p/145166#M40423</link>
      <description>&lt;P&gt;OUT time &amp;gt; (current_time + 1hr) then mark status as TIMEOUT else 'ACTIVE'&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jun 2015 23:18:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-do-I-clac-time-out-using-eval/m-p/145166#M40423</guid>
      <dc:creator>SasiB137</dc:creator>
      <dc:date>2015-06-08T23:18:00Z</dc:date>
    </item>
    <item>
      <title>Re: how do I clac time out using eval</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-do-I-clac-time-out-using-eval/m-p/145167#M40424</link>
      <description>&lt;P&gt;Based on your comment:&lt;/P&gt;

&lt;P&gt;OUT time &amp;gt; (current_time + 1hr) then mark status as TIMEOUT else 'ACTIVE'&lt;/P&gt;

&lt;P&gt;This is the search (but it doesn't make any sense to me because now event should "happen after" now()):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | eval outEpoch= strptime(out, "%m-%d-%Y %H:%M:%S") | eval status=if(outEpoch &amp;gt; (now() + 60*60), "TIMEOUT", "ACTIVE")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 08 Jun 2015 23:42:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-do-I-clac-time-out-using-eval/m-p/145167#M40424</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-06-08T23:42:57Z</dc:date>
    </item>
  </channel>
</rss>

