<?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: Display hosts with no data in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Display-hosts-with-no-data/m-p/293351#M88566</link>
    <description>&lt;P&gt;Sure, thanks to  dineshraj9&lt;BR /&gt;
"abc" should be deleted in base search&lt;/P&gt;

&lt;P&gt;Also about report speed, for example&lt;BR /&gt;
you can filter excess events and accelerate your search&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.6.0/Report/Acceleratereports#How_reports_qualify_for_report_acceleration"&gt;http://docs.splunk.com/Documentation/Splunk/6.6.0/Report/Acceleratereports#How_reports_qualify_for_report_acceleration&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 15 May 2017 13:09:06 GMT</pubDate>
    <dc:creator>andrey2007</dc:creator>
    <dc:date>2017-05-15T13:09:06Z</dc:date>
    <item>
      <title>Display hosts with no data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Display-hosts-with-no-data/m-p/293342#M88557</link>
      <description>&lt;P&gt;Currently, I have a search where I'm looking for a specific string in a set of logs across a large number of hosts (62) over the last 4 hours - I'm expecting to see all 62 but only 50 appear. Example of my search: &lt;CODE&gt;index=... sourcetype=... "abc" | dedup host | table host&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Is there a way I can get the 12 missing hosts from the search I'm currently using? When I try &lt;CODE&gt;NOT "abc"&lt;/CODE&gt;, I get all 62 hosts returned which shows that they're all getting picked up correctly.&lt;/P&gt;

&lt;P&gt;Can I potentially search for the hosts without the string and remove the first list hosts from the total list in order to get the remaining hosts?&lt;/P&gt;</description>
      <pubDate>Mon, 15 May 2017 11:40:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Display-hosts-with-no-data/m-p/293342#M88557</guid>
      <dc:creator>sepkarimpour</dc:creator>
      <dc:date>2017-05-15T11:40:45Z</dc:date>
    </item>
    <item>
      <title>Re: Display hosts with no data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Display-hosts-with-no-data/m-p/293343#M88558</link>
      <description>&lt;P&gt;You can go this fay to add new specific field based on your search "abc" and filter necessary data &lt;/P&gt;

&lt;P&gt;index=... sourcetype=... "abc" | eval new_field=if(like(_raw,"%abc%"),"with_abc","without_abc") | stats latest(new_field) as new_field by host | search new_field=without_abc&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 14:04:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Display-hosts-with-no-data/m-p/293343#M88558</guid>
      <dc:creator>andrey2007</dc:creator>
      <dc:date>2020-09-29T14:04:43Z</dc:date>
    </item>
    <item>
      <title>Re: Display hosts with no data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Display-hosts-with-no-data/m-p/293344#M88559</link>
      <description>&lt;P&gt;You have to flag the events where you have the required text and then filter this way -&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=... sourcetype=... | eval exists=(like(_raw,"%abc%"),1,0) | stats max(exists) as exists by host | where exists&amp;lt;1
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 15 May 2017 11:56:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Display-hosts-with-no-data/m-p/293344#M88559</guid>
      <dc:creator>dineshraj9</dc:creator>
      <dc:date>2017-05-15T11:56:37Z</dc:date>
    </item>
    <item>
      <title>Re: Display hosts with no data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Display-hosts-with-no-data/m-p/293345#M88560</link>
      <description>&lt;P&gt;When I try this, it still brings back no results. When I remove the search at the end, it shows that only "with_abc" values remain, which is the issue I'm having in the first place. I tried removing the string in the first part of the search query, but it just gives me the hosts without that string (which isn't helpful as it's still all of them). I'm just wondering if you can set a value if it doesn't appear at all in the search. Thanks though.&lt;/P&gt;</description>
      <pubDate>Mon, 15 May 2017 12:26:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Display-hosts-with-no-data/m-p/293345#M88560</guid>
      <dc:creator>sepkarimpour</dc:creator>
      <dc:date>2017-05-15T12:26:40Z</dc:date>
    </item>
    <item>
      <title>Re: Display hosts with no data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Display-hosts-with-no-data/m-p/293346#M88561</link>
      <description>&lt;P&gt;The problem is the base search has "abc" in it. So it won't provide the hosts where the event is not present. Try the search I have provided.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=... sourcetype=... | eval exists=(like(_raw,"%abc%"),1,0) | stats max(exists) as exists by host | where exists&amp;lt;1
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 15 May 2017 12:37:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Display-hosts-with-no-data/m-p/293346#M88561</guid>
      <dc:creator>dineshraj9</dc:creator>
      <dc:date>2017-05-15T12:37:36Z</dc:date>
    </item>
    <item>
      <title>Re: Display hosts with no data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Display-hosts-with-no-data/m-p/293347#M88562</link>
      <description>&lt;P&gt;Similar to the answer above from Andrey, no results are produced and when I remove the 'where ...', only values that have the value of 1 remain.&lt;/P&gt;

&lt;P&gt;What does the like (...) part do? Does it look in the raw output of the logs for the string I'm looking for? &lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 15 May 2017 12:40:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Display-hosts-with-no-data/m-p/293347#M88562</guid>
      <dc:creator>sepkarimpour</dc:creator>
      <dc:date>2017-05-15T12:40:40Z</dc:date>
    </item>
    <item>
      <title>Re: Display hosts with no data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Display-hosts-with-no-data/m-p/293348#M88563</link>
      <description>&lt;P&gt;The like function searches for the pattern in the field you provide(here you are searching if "abc" is part of the _raw event, if yes then set as 1 and else set as 0. So if there are no "abc" events from a host, the max value of exists field would be 0.&lt;/P&gt;

&lt;P&gt;Check if the text is enclosed with "%" when you add in like function. &lt;/P&gt;</description>
      <pubDate>Mon, 15 May 2017 12:51:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Display-hosts-with-no-data/m-p/293348#M88563</guid>
      <dc:creator>dineshraj9</dc:creator>
      <dc:date>2017-05-15T12:51:12Z</dc:date>
    </item>
    <item>
      <title>Re: Display hosts with no data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Display-hosts-with-no-data/m-p/293349#M88564</link>
      <description>&lt;P&gt;Ah! I thought I had tried this but I think I had missed the if as it is above but once I added that back in, it works as I'm wanting. Thanks!&lt;/P&gt;

&lt;P&gt;Just following up though: Since it's looking through a huge number of events now (in the last four hours, it went through over 27m events for the last four hours), it's a lot slower than before. Is there any way to optimise this so it's slightly faster/takes less time?&lt;/P&gt;</description>
      <pubDate>Mon, 15 May 2017 12:52:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Display-hosts-with-no-data/m-p/293349#M88564</guid>
      <dc:creator>sepkarimpour</dc:creator>
      <dc:date>2017-05-15T12:52:27Z</dc:date>
    </item>
    <item>
      <title>Re: Display hosts with no data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Display-hosts-with-no-data/m-p/293350#M88565</link>
      <description>&lt;P&gt;Hi sepkarimpour,&lt;BR /&gt;
you have to create a lookup with all your hosts (e.g. perimeter.csv where the column with hostname ic called "host") and then run a search like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=your_index sourcetype=your_sourcetype "abc" 
| eval host=upper(host)
| stats count by host
| append [ | inputlookup perimeter.csv | eval count=0, host=upper(host) | fields host, coult ]
| stats sum(count) AS Total by host
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;in this way:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;hosts with Total =0 are missed,&lt;/LI&gt;
&lt;LI&gt;host with Total&amp;gt;0 have logs.&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;If you like you can create an alert for Total=0 or a dashboard that shows status of each host, this dashboard can also graphically shows status using icons or semaphores.&lt;/P&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 15 May 2017 12:53:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Display-hosts-with-no-data/m-p/293350#M88565</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2017-05-15T12:53:42Z</dc:date>
    </item>
    <item>
      <title>Re: Display hosts with no data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Display-hosts-with-no-data/m-p/293351#M88566</link>
      <description>&lt;P&gt;Sure, thanks to  dineshraj9&lt;BR /&gt;
"abc" should be deleted in base search&lt;/P&gt;

&lt;P&gt;Also about report speed, for example&lt;BR /&gt;
you can filter excess events and accelerate your search&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.6.0/Report/Acceleratereports#How_reports_qualify_for_report_acceleration"&gt;http://docs.splunk.com/Documentation/Splunk/6.6.0/Report/Acceleratereports#How_reports_qualify_for_report_acceleration&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 15 May 2017 13:09:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Display-hosts-with-no-data/m-p/293351#M88566</guid>
      <dc:creator>andrey2007</dc:creator>
      <dc:date>2017-05-15T13:09:06Z</dc:date>
    </item>
    <item>
      <title>Re: Display hosts with no data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Display-hosts-with-no-data/m-p/293352#M88567</link>
      <description>&lt;P&gt;thank you cusello this approach helped me today!!!&lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2018 20:35:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Display-hosts-with-no-data/m-p/293352#M88567</guid>
      <dc:creator>newbie2tech</dc:creator>
      <dc:date>2018-02-15T20:35:38Z</dc:date>
    </item>
    <item>
      <title>Re: Display hosts with no data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Display-hosts-with-no-data/m-p/293353#M88568</link>
      <description>&lt;P&gt;Thank you!  This was so helpful for me today!&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jul 2018 15:21:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Display-hosts-with-no-data/m-p/293353#M88568</guid>
      <dc:creator>marlog</dc:creator>
      <dc:date>2018-07-11T15:21:53Z</dc:date>
    </item>
  </channel>
</rss>

