<?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: Query for hosts not sending logs is no longer showing results in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Why-is-search-for-hosts-not-sending-logs-and-no-longer-showing/m-p/620940#M215843</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/229059"&gt;@neerajs_81&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;please try ths different search:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| metasearch index=linux [ | inputlookup linux_servers | table host ] earliest=-24h@h latest=now
| eval host=lower(host)
| stats count BY host
| append [ | inputlookup linux_servers | eval host=lower(host), count=0 | table host count ] 
| stats sum(count) AS total BY host
| where total=0&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
    <pubDate>Tue, 15 Nov 2022 16:36:24 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2022-11-15T16:36:24Z</dc:date>
    <item>
      <title>Why is search for hosts not sending logs and no longer showing results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-search-for-hosts-not-sending-logs-and-no-longer-showing/m-p/620907#M215833</link>
      <description>&lt;P&gt;Hello,&amp;nbsp; We have been using this query to list out hosts that are not sending logs since past 24h.&amp;nbsp; It has been working well and for some unknown reason it has now suddenly stopped working.&amp;nbsp; In the sense it does not show any results despite there r hosts that meet the condition.&amp;nbsp; Can someone pls help to figure out why ?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;| tstats max(_time) as lastSeen_epoch WHERE index=linux [| inputlookup linux_servers | table host ] by host 
| where lastSeen_epoch&amp;lt;relative_time(now(),"-24H") 
| eval LastSeen=strftime(lastSeen_epoch,"%m/%d/%y %H:%M:%S")
| fields host LastSeen&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;Our lookupfile has 700 hosts .&amp;nbsp; Now if i reverse the where condition (just for testing) as shown below ,&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt; where lastSeen_epoch &amp;gt; relative_time(now(),"-24H") &lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;it shows 694 results&amp;nbsp; meaning there are 6 hosts (700-694)&amp;nbsp; that are not logging.&amp;nbsp; &amp;nbsp;So why is the original query not display the 6 hosts ?&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Nov 2022 06:15:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-search-for-hosts-not-sending-logs-and-no-longer-showing/m-p/620907#M215833</guid>
      <dc:creator>neerajs_81</dc:creator>
      <dc:date>2022-11-16T06:15:51Z</dc:date>
    </item>
    <item>
      <title>Re: Query for hosts not sending logs is no longer showing results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-search-for-hosts-not-sending-logs-and-no-longer-showing/m-p/620909#M215834</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/229059"&gt;@neerajs_81&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;maybe it will be a stupid try, but adding equal to the condition?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| tstats max(_time) as lastSeen_epoch WHERE index=linux [| inputlookup linux_servers | table host ] by host 
| where lastSeen_epoch&amp;lt;=relative_time(now(),"-24H") 
| eval LastSeen=strftime(lastSeen_epoch,"%m/%d/%y %H:%M:%S")
| fields host LastSeen&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 15 Nov 2022 14:17:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-search-for-hosts-not-sending-logs-and-no-longer-showing/m-p/620909#M215834</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-11-15T14:17:00Z</dc:date>
    </item>
    <item>
      <title>Re: Query for hosts not sending logs is no longer showing results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-search-for-hosts-not-sending-logs-and-no-longer-showing/m-p/620927#M215839</link>
      <description>&lt;P&gt;That didn't work either.&amp;nbsp; It shows 0 results. Thanks for responding.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Nov 2022 16:01:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-search-for-hosts-not-sending-logs-and-no-longer-showing/m-p/620927#M215839</guid>
      <dc:creator>neerajs_81</dc:creator>
      <dc:date>2022-11-15T16:01:03Z</dc:date>
    </item>
    <item>
      <title>Re: Query for hosts not sending logs is no longer showing results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-search-for-hosts-not-sending-logs-and-no-longer-showing/m-p/620940#M215843</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/229059"&gt;@neerajs_81&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;please try ths different search:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| metasearch index=linux [ | inputlookup linux_servers | table host ] earliest=-24h@h latest=now
| eval host=lower(host)
| stats count BY host
| append [ | inputlookup linux_servers | eval host=lower(host), count=0 | table host count ] 
| stats sum(count) AS total BY host
| where total=0&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 15 Nov 2022 16:36:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-search-for-hosts-not-sending-logs-and-no-longer-showing/m-p/620940#M215843</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-11-15T16:36:24Z</dc:date>
    </item>
    <item>
      <title>Re: Query for hosts not sending logs is no longer showing results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-search-for-hosts-not-sending-logs-and-no-longer-showing/m-p/620991#M215854</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp; That query worked.&amp;nbsp; So how is it that this one is working while the earlier isn't&amp;nbsp; ?&amp;nbsp; Secondly can you pls clarify why are we appending the same lookup file again&amp;nbsp; when we have already called the lookup file at the beginning&amp;nbsp; ?&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;| append [ | inputlookup linux_deployed_servers | eval host=lower(host), count=0 | table host count ]&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Nov 2022 05:22:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-search-for-hosts-not-sending-logs-and-no-longer-showing/m-p/620991#M215854</guid>
      <dc:creator>neerajs_81</dc:creator>
      <dc:date>2022-11-16T05:22:59Z</dc:date>
    </item>
    <item>
      <title>Re: Query for hosts not sending logs is no longer showing results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-search-for-hosts-not-sending-logs-and-no-longer-showing/m-p/621003#M215861</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/229059"&gt;@neerajs_81&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;the subsearch using the lookup at the beginning is only to limit the main search only to the servers of the lookup and avoid other results.&lt;/P&gt;&lt;P&gt;The real check is made after the append.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 16 Nov 2022 07:10:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-search-for-hosts-not-sending-logs-and-no-longer-showing/m-p/621003#M215861</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-11-16T07:10:44Z</dc:date>
    </item>
    <item>
      <title>Re: Query for hosts not sending logs is no longer showing results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-search-for-hosts-not-sending-logs-and-no-longer-showing/m-p/621043#M215878</link>
      <description>&lt;P&gt;Curious - any way to further optimize your search to also make it show&amp;nbsp; LastSeenTime of those hosts ?&amp;nbsp; Even if its in epoch i can convert it into human readable format&amp;nbsp; .&amp;nbsp; I tried the following way in your stats command but the lastSeen column comes out empty.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| stats sum(count) AS total max(_time) as lastTime  BY host &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Nov 2022 12:31:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-search-for-hosts-not-sending-logs-and-no-longer-showing/m-p/621043#M215878</guid>
      <dc:creator>neerajs_81</dc:creator>
      <dc:date>2022-11-16T12:31:10Z</dc:date>
    </item>
    <item>
      <title>Re: Query for hosts not sending logs is no longer showing results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-search-for-hosts-not-sending-logs-and-no-longer-showing/m-p/621046#M215880</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/229059"&gt;@neerajs_81&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;it's correct: the algorithm of my search is that total is equal to zero only when there isn't any event in the main search, so you cannot have the LastSeen value.&lt;/P&gt;&lt;P&gt;Maybe this is the problem of your original search.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 16 Nov 2022 12:59:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-search-for-hosts-not-sending-logs-and-no-longer-showing/m-p/621046#M215880</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-11-16T12:59:00Z</dc:date>
    </item>
    <item>
      <title>Re: Query for hosts not sending logs is no longer showing results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-search-for-hosts-not-sending-logs-and-no-longer-showing/m-p/621051#M215883</link>
      <description>&lt;P&gt;Ahh. Didn't realize that. Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 16 Nov 2022 13:18:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-search-for-hosts-not-sending-logs-and-no-longer-showing/m-p/621051#M215883</guid>
      <dc:creator>neerajs_81</dc:creator>
      <dc:date>2022-11-16T13:18:30Z</dc:date>
    </item>
  </channel>
</rss>

