<?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: Search with input lookup in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Search-with-input-lookup/m-p/338468#M159712</link>
    <description>&lt;P&gt;Hi Wood,&lt;/P&gt;

&lt;P&gt;Thanks for responding.. &lt;/P&gt;

&lt;P&gt;Is the anyway to show lookup table columns &lt;BR /&gt;
index=ab* host=pr host!=old source=processMonitor* appmon="1" instance=** apphome =**  [ | inputlookup boxdata | search box_live_state=NOTLIVE | fields host  ]&lt;BR /&gt;
 | stats latest(state) as status by host, apphome, instance, appmon&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;sample&lt;/STRONG&gt;&lt;BR /&gt;
| inputlookup boxdata | search host=hostny01&lt;/P&gt;

&lt;P&gt;boxdata&lt;BR /&gt;
box_env box_live_state box_location box_model box_os box_patch box_rack box_rfb box_ver host&lt;BR /&gt;
QA NOTLIVE ABC-DE HPXYZQ RHAS 1234 324 lxmcp 6.9 hostny01&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Thanks&lt;BR /&gt;
HR&lt;/STRONG&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 15:07:10 GMT</pubDate>
    <dc:creator>harsush</dc:creator>
    <dc:date>2020-09-29T15:07:10Z</dc:date>
    <item>
      <title>Search with input lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-with-input-lookup/m-p/338463#M159707</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;

&lt;P&gt;Need Help on run search checking server live or not using lookup&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;boxdata&lt;/STRONG&gt;&lt;BR /&gt;
box_env box_live_state  box_location    box_model   box_os  box_patch   box_rack    box_rfb box_ver host&lt;BR /&gt;
QA  NOTLIVE ABC-DE  HPXYZQ  RHAS    1234    324 lxmcp   6.9 hostny01&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;| inputlookup boxdata | search host=hostny01&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;I want to show process which down only for LIVE servers. Is there a way to use abv lookup to search only Live servers.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;index=ab* host=&lt;EM&gt;pr&lt;/EM&gt;  host!=&lt;EM&gt;old&lt;/EM&gt; source=processMonitor* appmon="1" instance=&lt;/STRONG&gt; apphome =** | search down | stats latest(state) by host, apphome, instance, appmon**&lt;/P&gt;

&lt;P&gt;Thanks&lt;BR /&gt;
HR&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 15:06:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-with-input-lookup/m-p/338463#M159707</guid>
      <dc:creator>harsush</dc:creator>
      <dc:date>2020-09-29T15:06:49Z</dc:date>
    </item>
    <item>
      <title>Re: Search with input lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-with-input-lookup/m-p/338464#M159708</link>
      <description>&lt;P&gt;Hi harsush,&lt;BR /&gt;
Let me understand better:&lt;BR /&gt;
you want to find if a server that you have in a lookup is up or down, correct?&lt;/P&gt;

&lt;P&gt;if this is your need, try something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal 
| eval host=upper(host)
| stats count by host
| append [ | inputlookup your_lookup.csv | eval count=0, host=upper(host) | fields host ]
| stats sum(count) AS Total by host
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;if Total=0 host isn't sending logs, if Total&amp;gt;0 host is sending logs.&lt;BR /&gt;
You can also filter the host list in you lookup.&lt;/P&gt;

&lt;P&gt;Using this search you can create an alert or put results in a dashboard showing status also in graphic mode.&lt;/P&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jul 2017 13:47:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-with-input-lookup/m-p/338464#M159708</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2017-07-31T13:47:24Z</dc:date>
    </item>
    <item>
      <title>Re: Search with input lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-with-input-lookup/m-p/338465#M159709</link>
      <description>&lt;P&gt;If the lookup has a list of servers to search, then like this, with a &lt;CODE&gt;subsearch&lt;/CODE&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=ab* host=pr host!=old source=processMonitor* appmon="1"
[ | inputlookup boxdata | search box_live_state="LIVE" | fields host ]
| stats latest(state) by host, apphome, instance, appmon
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Or, if you have a HYUGE number of servers in the file, like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=ab* host=pr host!=old source=processMonitor* appmon="1"
| lookup boxdata host | search box_live_state="LIVE"
| stats latest(state) by host, apphome, instance, appmon
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 31 Jul 2017 14:40:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-with-input-lookup/m-p/338465#M159709</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-07-31T14:40:10Z</dc:date>
    </item>
    <item>
      <title>Re: Search with input lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-with-input-lookup/m-p/338466#M159710</link>
      <description>&lt;P&gt;Hi Cusello,&lt;/P&gt;

&lt;P&gt;Thanks for responding..&lt;/P&gt;

&lt;P&gt;Iam bad in explaining &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;  .. sorry for the confusion .. I hope this time its clear what iam expecting&lt;/P&gt;

&lt;P&gt;Below Search1 will gives me process which are down on diff hosts.. But what i want is to filter out Hosts which are not live ( | inputlookup boxdata | search host=hostny01 )&lt;BR /&gt;
&lt;STRONG&gt;Search1&lt;/STRONG&gt;&lt;BR /&gt;
index=ab* host=pr host!=old source=processMonitor* appmon="1" instance=* apphome =* | search down | stats latest(state) by host, apphome, instance, appmon&lt;/P&gt;

&lt;P&gt;How can i check filter hosts which are not live after getting output from abv search ?&lt;/P&gt;

&lt;P&gt;| inputlookup boxdata | search host=hostny01 &lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;boxdata&lt;/STRONG&gt;&lt;BR /&gt;
box_env box_live_state box_location box_model box_os box_patch box_rack box_rfb box_ver host&lt;BR /&gt;
QA NOTLIVE ABC-DE HPXYZQ RHAS 1234 324 lxmcp 6.9 hostny01&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 15:06:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-with-input-lookup/m-p/338466#M159710</guid>
      <dc:creator>harsush</dc:creator>
      <dc:date>2020-09-29T15:06:58Z</dc:date>
    </item>
    <item>
      <title>Re: Search with input lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-with-input-lookup/m-p/338467#M159711</link>
      <description>&lt;P&gt;Ok try something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=ab* host=pr host!=old source=processMonitor* appmon="1" instance=* apphome =* [ | inputlookup boxdata | search box_live_state=LIVE | fields host  ]
| stats latest(state) by host, apphome, instance, appmon
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;beware to the case of host in search and subsearch: if you're not sure of upper or lower case, you have to transform hosts both in search and subsearch.&lt;/P&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jul 2017 14:58:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-with-input-lookup/m-p/338467#M159711</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2017-07-31T14:58:52Z</dc:date>
    </item>
    <item>
      <title>Re: Search with input lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-with-input-lookup/m-p/338468#M159712</link>
      <description>&lt;P&gt;Hi Wood,&lt;/P&gt;

&lt;P&gt;Thanks for responding.. &lt;/P&gt;

&lt;P&gt;Is the anyway to show lookup table columns &lt;BR /&gt;
index=ab* host=pr host!=old source=processMonitor* appmon="1" instance=** apphome =**  [ | inputlookup boxdata | search box_live_state=NOTLIVE | fields host  ]&lt;BR /&gt;
 | stats latest(state) as status by host, apphome, instance, appmon&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;sample&lt;/STRONG&gt;&lt;BR /&gt;
| inputlookup boxdata | search host=hostny01&lt;/P&gt;

&lt;P&gt;boxdata&lt;BR /&gt;
box_env box_live_state box_location box_model box_os box_patch box_rack box_rfb box_ver host&lt;BR /&gt;
QA NOTLIVE ABC-DE HPXYZQ RHAS 1234 324 lxmcp 6.9 hostny01&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Thanks&lt;BR /&gt;
HR&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 15:07:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-with-input-lookup/m-p/338468#M159712</guid>
      <dc:creator>harsush</dc:creator>
      <dc:date>2020-09-29T15:07:10Z</dc:date>
    </item>
    <item>
      <title>Re: Search with input lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-with-input-lookup/m-p/338469#M159713</link>
      <description>&lt;P&gt;Hi Cusello,&lt;/P&gt;

&lt;P&gt;Thanks for responding.. &lt;/P&gt;

&lt;P&gt;Is the anyway to show lookup table columns &lt;BR /&gt;
index=ab* host=pr host!=old source=processMonitor* appmon="1" instance=** apphome =**  [ | inputlookup boxdata | search box_live_state=NOTLIVE | fields host  ]&lt;BR /&gt;
 | stats latest(state) as status by host, apphome, instance, appmon&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;sample&lt;/STRONG&gt;&lt;BR /&gt;
| inputlookup boxdata | search host=hostny01&lt;/P&gt;

&lt;P&gt;boxdata&lt;BR /&gt;
box_env box_live_state box_location box_model box_os box_patch box_rack box_rfb box_ver host&lt;BR /&gt;
QA NOTLIVE ABC-DE HPXYZQ RHAS 1234 324 lxmcp 6.9 hostny01&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Thanks&lt;BR /&gt;
HR&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 15:07:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-with-input-lookup/m-p/338469#M159713</guid>
      <dc:creator>harsush</dc:creator>
      <dc:date>2020-09-29T15:07:12Z</dc:date>
    </item>
    <item>
      <title>Re: Search with input lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-with-input-lookup/m-p/338470#M159714</link>
      <description>&lt;P&gt;You have merely restated your original question with no additional detail or clarity.  have you even tried my answers?  If they do not work, explain why.&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jul 2017 16:12:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-with-input-lookup/m-p/338470#M159714</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-07-31T16:12:52Z</dc:date>
    </item>
    <item>
      <title>Re: Search with input lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-with-input-lookup/m-p/338471#M159715</link>
      <description>&lt;P&gt;Hi Wood, &lt;/P&gt;

&lt;P&gt;Answer 2 - Incorrect syntax &lt;BR /&gt;
&lt;STRONG&gt;index=ab* host=pr host!=old source=processMonitor*  appmon="1" instance=* apphome =* | search down  | inputlookup boxdata host | search box_live_state="LIVE" | stats latest(state) by host, apphome, instance, appmon&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Error in 'inputlookup' command: Invalid argument: 'host'&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;I tried your answers as shown below. But what i want is how to show box_live_state column in the output &lt;/P&gt;

&lt;P&gt;index=ab* host=pr host!=old source=processMonitor* appmon="1" instance=* apphome =* | search down   [ | inputlookup boxdata | search box_live_state=NOTLIVE | fields host | table box_live_state ]&lt;BR /&gt;
 | stats latest(state) as status by host, apphome, instance, appmon&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;sample&lt;/STRONG&gt;&lt;BR /&gt;
| inputlookup boxdata | search host=hostny01&lt;/P&gt;

&lt;P&gt;boxdata&lt;BR /&gt;
box_env box_live_state box_location box_model box_os box_patch box_rack box_rfb box_ver host&lt;BR /&gt;
QA NOTLIVE ABC-DE HPXYZQ RHAS 1234 324 lxmcp 6.9 hostny01&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Thanks&lt;BR /&gt;
HR&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 15:07:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-with-input-lookup/m-p/338471#M159715</guid>
      <dc:creator>harsush</dc:creator>
      <dc:date>2020-09-29T15:07:15Z</dc:date>
    </item>
    <item>
      <title>Re: Search with input lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-with-input-lookup/m-p/338472#M159716</link>
      <description>&lt;P&gt;Just cut-and-paste it.  You changed my &lt;CODE&gt;|lookup boxdata host&lt;/CODE&gt; to &lt;CODE&gt;|inputlookup boxdata host&lt;/CODE&gt; which, as Splunk says, is incorrect.&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jul 2017 17:41:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-with-input-lookup/m-p/338472#M159716</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-07-31T17:41:57Z</dc:date>
    </item>
  </channel>
</rss>

