<?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 to use a lookup table to find servers that have never reported to Splunk? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-lookup-table-to-find-servers-that-have-never/m-p/395278#M114780</link>
    <description>&lt;P&gt;You're going to run into so many false positives trying to monitor at the host level. Perhaps you should try at the sourcetype level &lt;/P&gt;

&lt;P&gt;Regardless, you should use MetaWoot for this &lt;/P&gt;

&lt;P&gt;&lt;A href="https://splunkbase.splunk.com/app/2949/"&gt;https://splunkbase.splunk.com/app/2949/&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 08 Aug 2018 17:40:32 GMT</pubDate>
    <dc:creator>skoelpin</dc:creator>
    <dc:date>2018-08-08T17:40:32Z</dc:date>
    <item>
      <title>How to use a lookup table to find servers that have never reported to Splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-lookup-table-to-find-servers-that-have-never/m-p/395277#M114779</link>
      <description>&lt;P&gt;I'm trying to use a lookup table to find servers that are not reporting or have &lt;STRONG&gt;NEVER reported to Splunk&lt;/STRONG&gt;.&lt;BR /&gt;&lt;BR /&gt;
Since I don't have admin access to the Splunk instance, I write the info from our DB of servers to the event log of a specific server and then import it nightly via an alert with a an action of "output results to lookup".&lt;BR /&gt;&lt;BR /&gt;
When I run the search below, it always returns "Error in 'inputlookup' command: Invalid argument: 'NOT'" - regardless of whether I use the word NOT.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup siteservers NOT [search host=Server  Channel=System ProviderName=EventLog EventID=6013]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;"Servers" contains the value from the lookup that I want to match to the host field. Event 6013 is just the daily windows uptime event - if it's not found then I have a server that's not reporting.&lt;BR /&gt;
I suspect that the fact that the parameter "local=t" is not available with the inputlookup command may be part of the problem. The lookup must be used with the "local=t" parameter.  Our admin tells me that making the lookup table available across the cluster is very difficult.&lt;BR /&gt;
Any ideas on how to make this work would be much appreciated.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Aug 2018 17:30:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-lookup-table-to-find-servers-that-have-never/m-p/395277#M114779</guid>
      <dc:creator>rgcox1</dc:creator>
      <dc:date>2018-08-08T17:30:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to use a lookup table to find servers that have never reported to Splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-lookup-table-to-find-servers-that-have-never/m-p/395278#M114780</link>
      <description>&lt;P&gt;You're going to run into so many false positives trying to monitor at the host level. Perhaps you should try at the sourcetype level &lt;/P&gt;

&lt;P&gt;Regardless, you should use MetaWoot for this &lt;/P&gt;

&lt;P&gt;&lt;A href="https://splunkbase.splunk.com/app/2949/"&gt;https://splunkbase.splunk.com/app/2949/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Aug 2018 17:40:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-lookup-table-to-find-servers-that-have-never/m-p/395278#M114780</guid>
      <dc:creator>skoelpin</dc:creator>
      <dc:date>2018-08-08T17:40:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to use a lookup table to find servers that have never reported to Splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-lookup-table-to-find-servers-that-have-never/m-p/395279#M114781</link>
      <description>&lt;P&gt;Metawoot looks good, but not sure how it can help find a server that has never reported to Splunk? Not to mention I'm not an admin on this Splunk instance.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Aug 2018 22:14:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-lookup-table-to-find-servers-that-have-never/m-p/395279#M114781</guid>
      <dc:creator>rgcox1</dc:creator>
      <dc:date>2018-08-08T22:14:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to use a lookup table to find servers that have never reported to Splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-lookup-table-to-find-servers-that-have-never/m-p/395280#M114782</link>
      <description>&lt;P&gt;so, &lt;BR /&gt;
if you are counting on an event code, you can count on any event from windows for letting you know that the windows systems are up&lt;BR /&gt;
try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  | tstats max(_time) as last_event where index = &amp;lt;yourDataIndex&amp;gt; by host
    | eval now_time = now()
    | eval last_seen_ago_in_seconds = now_time - last_event
    | sort - last_seen_ago_in_seconds
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;or compare against your lookup&lt;/P&gt;

&lt;P&gt;hope it helps&lt;/P&gt;</description>
      <pubDate>Wed, 08 Aug 2018 22:44:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-lookup-table-to-find-servers-that-have-never/m-p/395280#M114782</guid>
      <dc:creator>adonio</dc:creator>
      <dc:date>2018-08-08T22:44:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to use a lookup table to find servers that have never reported to Splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-lookup-table-to-find-servers-that-have-never/m-p/395281#M114783</link>
      <description>&lt;P&gt;My problem is finding servers that have &lt;STRONG&gt;&lt;EM&gt;NEVER reported to Splunk&lt;/EM&gt;&lt;/STRONG&gt;.  The lookup table contains the list of all active servers, and I'm looking for servers from that list that have not sent an uptime event over the last 24 hours.  This would indicate that Splunk has not been installed or has other issues that need to be addressed.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Aug 2018 22:50:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-lookup-table-to-find-servers-that-have-never/m-p/395281#M114783</guid>
      <dc:creator>rgcox1</dc:creator>
      <dc:date>2018-08-08T22:50:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to use a lookup table to find servers that have never reported to Splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-lookup-table-to-find-servers-that-have-never/m-p/395282#M114784</link>
      <description>&lt;P&gt;maybe this, considering you have hosts in your &lt;CODE&gt;all_hosts.csv&lt;/CODE&gt; that never touched splunk&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  | inputlookup all_hosts.csv | table host 
    | append [
    | tstats max(_time) as last_event where index = * by host
    | eval now_time = now()
    | eval last_seen_ago_in_seconds = now_time - last_event
    | sort -last_seen_ago_in_seconds ]
    | stats values(*) as * by host
    | eval MISSING = if(isnull(last_seen_ago_in_seconds) OR last_seen_ago_in_seconds&amp;gt;86400,"MISSING","GOOD")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 09 Aug 2018 03:03:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-lookup-table-to-find-servers-that-have-never/m-p/395282#M114784</guid>
      <dc:creator>adonio</dc:creator>
      <dc:date>2018-08-09T03:03:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to use a lookup table to find servers that have never reported to Splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-lookup-table-to-find-servers-that-have-never/m-p/395283#M114785</link>
      <description>&lt;P&gt;Good idea, but returns servers not in my lookup table – i.e. from other sites.  Changing append to “join left” comes a lot closer to what I’m looking for.  In fact, if the join was not case sensitive, the job would be done.  A few of the host names returned are lower case, and they don’t get matched in my lookup.&lt;BR /&gt;
Thanks for pointing me in a good direction.  Not sure I’ll get closer to solving the problem than this.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup site9servers where OSname=*Windows*
    | eval host=Server
    | table host
    | join type=left host [
         | tstats max(_time) as last_event  by host
         | eval now_time = now()
         | eval last_seen_ago_in_seconds = now_time - last_event
         | sort -last_seen_ago_in_seconds ]
         | stats values(*) as * by host
         | eval MISSING = if(isnull(last_seen_ago_in_seconds) OR last_seen_ago_in_seconds&amp;gt;86400,"MISSING","GOOD")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 09 Aug 2018 22:22:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-lookup-table-to-find-servers-that-have-never/m-p/395283#M114785</guid>
      <dc:creator>rgcox1</dc:creator>
      <dc:date>2018-08-09T22:22:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to use a lookup table to find servers that have never reported to Splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-lookup-table-to-find-servers-that-have-never/m-p/395284#M114786</link>
      <description>&lt;P&gt;glad it helped&lt;BR /&gt;
you can get over the case sensitivity with &lt;CODE&gt;eval lower&lt;/CODE&gt; or &lt;CODE&gt;eval upper&lt;/CODE&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | inputlookup site9servers where OSname=*Windows*
         | eval host=upper(Server)
         | table host
         | join type=left host [
              | tstats max(_time) as last_event  by host
              | eval now_time = now()
              | eval last_seen_ago_in_seconds = now_time - last_event
              | sort -last_seen_ago_in_seconds
              | eval host = upper(host) ]
              | stats values(*) as * by host
              | eval MISSING = if(isnull(last_seen_ago_in_seconds) OR last_seen_ago_in_seconds&amp;gt;86400,"MISSING","GOOD")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 09 Aug 2018 22:53:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-lookup-table-to-find-servers-that-have-never/m-p/395284#M114786</guid>
      <dc:creator>adonio</dc:creator>
      <dc:date>2018-08-09T22:53:36Z</dc:date>
    </item>
  </channel>
</rss>

