<?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 How to incorporate metadata command in my lookup table to be able to view time offline? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-incorporate-metadata-command-in-my-lookup-table-to-be/m-p/213704#M62694</link>
    <description>&lt;P&gt;I have a few searches I have added a lookup table to.  All of them work, but one.  The one below uses &lt;CODE&gt;metadata&lt;/CODE&gt; and I'm not sure how to make it work with the lookup table.  My goal it to find host that have not connected in the last 5 min.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| metadata  [| inputlookup Meeting_Rooms | fields host] | eval age = now()-lastTime | where age &amp;gt; 50  | convert ctime(lastTime) | eval field_in_ddhhmmss=tostring((age) , "duration") |rename field_in_ddhhmmss as "Time Offline" lastTime as "Last Time" | sort + "lastTime" | table host "Time Offline" "Last Time"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This is not getting any results.  If I replace  &lt;CODE&gt;[| inputlookup Meeting_Rooms | fields host]&lt;/CODE&gt; with &lt;CODE&gt;type=hosts&lt;/CODE&gt; it works fine, but will show all host.  Any ideas how I can make this work with my lookup table?&lt;/P&gt;</description>
    <pubDate>Mon, 26 Sep 2016 18:32:53 GMT</pubDate>
    <dc:creator>chadman</dc:creator>
    <dc:date>2016-09-26T18:32:53Z</dc:date>
    <item>
      <title>How to incorporate metadata command in my lookup table to be able to view time offline?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-incorporate-metadata-command-in-my-lookup-table-to-be/m-p/213704#M62694</link>
      <description>&lt;P&gt;I have a few searches I have added a lookup table to.  All of them work, but one.  The one below uses &lt;CODE&gt;metadata&lt;/CODE&gt; and I'm not sure how to make it work with the lookup table.  My goal it to find host that have not connected in the last 5 min.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| metadata  [| inputlookup Meeting_Rooms | fields host] | eval age = now()-lastTime | where age &amp;gt; 50  | convert ctime(lastTime) | eval field_in_ddhhmmss=tostring((age) , "duration") |rename field_in_ddhhmmss as "Time Offline" lastTime as "Last Time" | sort + "lastTime" | table host "Time Offline" "Last Time"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This is not getting any results.  If I replace  &lt;CODE&gt;[| inputlookup Meeting_Rooms | fields host]&lt;/CODE&gt; with &lt;CODE&gt;type=hosts&lt;/CODE&gt; it works fine, but will show all host.  Any ideas how I can make this work with my lookup table?&lt;/P&gt;</description>
      <pubDate>Mon, 26 Sep 2016 18:32:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-incorporate-metadata-command-in-my-lookup-table-to-be/m-p/213704#M62694</guid>
      <dc:creator>chadman</dc:creator>
      <dc:date>2016-09-26T18:32:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to incorporate metadata command in my lookup table to be able to view time offline?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-incorporate-metadata-command-in-my-lookup-table-to-be/m-p/213705#M62695</link>
      <description>&lt;P&gt;I think I have it working with this.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup Meeting_Rooms | join type=left host [metadata type=hosts] | eval age = now()-lastTime | where age &amp;gt; 50  | convert ctime(lastTime) | eval field_in_ddhhmmss=tostring((age) , "duration") |rename field_in_ddhhmmss as "Time Offline" lastTime as "Last Time" | sort + "lastTime" | table host "Time Offline" "Last Time"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 26 Sep 2016 18:57:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-incorporate-metadata-command-in-my-lookup-table-to-be/m-p/213705#M62695</guid>
      <dc:creator>chadman</dc:creator>
      <dc:date>2016-09-26T18:57:17Z</dc:date>
    </item>
  </channel>
</rss>

