<?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: Unable to fetch result of hosts which are not having any activity from last 60 mins in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Unable-to-fetch-result-of-hosts-which-are-not-having-any/m-p/566343#M197374</link>
    <description>&lt;P&gt;I don't know if there's a FAQ here, but this kind of question should definitely be there (I answered similar one few days ago).&lt;/P&gt;&lt;P&gt;Splunk's works by passing from each step to the next one a set of records (events, stats). But it doesn't know where this data comes from (what was the command which resulted in this data).&lt;/P&gt;&lt;P&gt;So if you tell it to search for events fulfilling a given set of conditions during given timerange, it does so. But if some of those conditions can't be fulfilled, they simply don't produce any events but splunk doesn't know further down the road what the conditions were.&lt;/P&gt;&lt;P&gt;Thus if you want to have the rows saying that some hosts have 0 stats, you have to prepare such records yourself.&lt;/P&gt;&lt;P&gt;See &lt;A href="https://community.splunk.com/t5/Splunk-Search/Need-to-display-count-having-zero-events/m-p/565220" target="_blank"&gt;https://community.splunk.com/t5/Splunk-Search/Need-to-display-count-having-zero-events/m-p/565220&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 08 Sep 2021 17:14:59 GMT</pubDate>
    <dc:creator>PickleRick</dc:creator>
    <dc:date>2021-09-08T17:14:59Z</dc:date>
    <item>
      <title>Unable to fetch result of hosts which are not having any activity from last 60 mins</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Unable-to-fetch-result-of-hosts-which-are-not-having-any/m-p/566336#M197371</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;I am trying to fetch the count and percentage of hosts having success and failures along with failure percentage.&lt;/P&gt;&lt;P&gt;host =&lt;BR /&gt;Server1&lt;BR /&gt;Server2&lt;BR /&gt;Server3&lt;BR /&gt;Server4&lt;BR /&gt;Server5&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;But if count of spcecific host is having no event, I want to show that as well even with result =0.&lt;/P&gt;&lt;P&gt;I am running below query but it is missing some servers because there are no events on specific sevrers form last 2 hours.&lt;/P&gt;&lt;P&gt;index=server_list host IN (Server1,Server2,Server3,Server4,Server5) events_status = "*"&lt;BR /&gt;| eval pass=if(like(event_status,"20%"),1,0)&lt;BR /&gt;| eval fail=if(!like(event_status,"20%"),1,0)&lt;BR /&gt;| stats count as Overall_Volume,sum(pass) as Passed, sum(fail) as Failed by host&lt;BR /&gt;| eval Failure_Rate=round(Failed_Requests/(Passed_Requests+Failed_Requests)*100,2)&lt;BR /&gt;| fillnull value=0&lt;/P&gt;&lt;P&gt;Below result I am getting, because Server4 and Server5 dont have any traffic from last 2 Hours -&lt;/P&gt;&lt;P&gt;host&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Overall_Volume Passed Failed Failure_Rate&lt;BR /&gt;Server1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 50&lt;BR /&gt;Server2&amp;nbsp; &amp;nbsp; &amp;nbsp; 10&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;6&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;4&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 40&lt;BR /&gt;Server3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 100&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone help in query so that I should get all Servers with values as 0 if no traffic.&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;</description>
      <pubDate>Wed, 08 Sep 2021 16:45:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Unable-to-fetch-result-of-hosts-which-are-not-having-any/m-p/566336#M197371</guid>
      <dc:creator>sahil237888</dc:creator>
      <dc:date>2021-09-08T16:45:33Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to fetch result of hosts which are not having any activity from last 60 mins</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Unable-to-fetch-result-of-hosts-which-are-not-having-any/m-p/566343#M197374</link>
      <description>&lt;P&gt;I don't know if there's a FAQ here, but this kind of question should definitely be there (I answered similar one few days ago).&lt;/P&gt;&lt;P&gt;Splunk's works by passing from each step to the next one a set of records (events, stats). But it doesn't know where this data comes from (what was the command which resulted in this data).&lt;/P&gt;&lt;P&gt;So if you tell it to search for events fulfilling a given set of conditions during given timerange, it does so. But if some of those conditions can't be fulfilled, they simply don't produce any events but splunk doesn't know further down the road what the conditions were.&lt;/P&gt;&lt;P&gt;Thus if you want to have the rows saying that some hosts have 0 stats, you have to prepare such records yourself.&lt;/P&gt;&lt;P&gt;See &lt;A href="https://community.splunk.com/t5/Splunk-Search/Need-to-display-count-having-zero-events/m-p/565220" target="_blank"&gt;https://community.splunk.com/t5/Splunk-Search/Need-to-display-count-having-zero-events/m-p/565220&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Sep 2021 17:14:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Unable-to-fetch-result-of-hosts-which-are-not-having-any/m-p/566343#M197374</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2021-09-08T17:14:59Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to fetch result of hosts which are not having any activity from last 60 mins</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Unable-to-fetch-result-of-hosts-which-are-not-having-any/m-p/566751#M197503</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/231884"&gt;@PickleRick&lt;/a&gt;&amp;nbsp;-&lt;/P&gt;&lt;P&gt;this query is giving 0 for each server even if there is traffic on that server.&lt;/P&gt;&lt;P&gt;Can you suggest any other query?&lt;/P&gt;</description>
      <pubDate>Sun, 12 Sep 2021 16:42:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Unable-to-fetch-result-of-hosts-which-are-not-having-any/m-p/566751#M197503</guid>
      <dc:creator>sahil237888</dc:creator>
      <dc:date>2021-09-12T16:42:41Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to fetch result of hosts which are not having any activity from last 60 mins</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Unable-to-fetch-result-of-hosts-which-are-not-having-any/m-p/566753#M197504</link>
      <description>&lt;P&gt;Well, of course the query on its own will give you results of 0. You have to append your own results and sum them up. That's the point.&lt;/P&gt;</description>
      <pubDate>Sun, 12 Sep 2021 18:00:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Unable-to-fetch-result-of-hosts-which-are-not-having-any/m-p/566753#M197504</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2021-09-12T18:00:35Z</dc:date>
    </item>
  </channel>
</rss>

