<?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 limit results to one (1) for each host? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-limit-results-to-one-1-for-each-host/m-p/660519#M228041</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/237299"&gt;@Bleepie&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;did you tried with dedup (&lt;A href="https://docs.splunk.com/Documentation/SCS/current/SearchReference/DedupCommandOverview" target="_blank"&gt;https://docs.splunk.com/Documentation/SCS/current/SearchReference/DedupCommandOverview&lt;/A&gt;)?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;your_search&amp;gt;
| dedup host
| sort host
| table host&lt;/LI-CODE&gt;&lt;P&gt;but in this way you have only the list of hosts with events.&lt;/P&gt;&lt;P&gt;If you want o check if there are some missing host, you have to create a lookup (called e.g. perimeter.csv) containing at least one column called host and then run a search like the following:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| tstats count WHERE index=your_index BY host
| append [ | inputlookup perimeter.csv | eval count=0 | fields host count ]
| stats sum(count) AS total BY host
| where total=0&lt;/LI-CODE&gt;&lt;P&gt;in this way, if you have results the host is missed.&lt;/P&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>Thu, 12 Oct 2023 12:11:45 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2023-10-12T12:11:45Z</dc:date>
    <item>
      <title>How to limit results to one (1) for each host?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-limit-results-to-one-1-for-each-host/m-p/660500#M228027</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;How do I limit the results per host? I have any (random) search query. I have 10 hosts. For each hosts, hundreds of events are shown. In a statistics table, I want to show only 1 event, per host. This way, I can check if each host has the logfile. It doesn't matter what the contents of the logfile are.&lt;/P&gt;&lt;P&gt;How do I perform this search?&lt;BR /&gt;&lt;BR /&gt;This statistics table, or splunk dashboard, will have the following function:&lt;BR /&gt;&lt;BR /&gt;Check if log exists on every server&lt;/P&gt;</description>
      <pubDate>Thu, 12 Oct 2023 10:26:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-limit-results-to-one-1-for-each-host/m-p/660500#M228027</guid>
      <dc:creator>Bleepie</dc:creator>
      <dc:date>2023-10-12T10:26:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to limit results to one (1) for each host?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-limit-results-to-one-1-for-each-host/m-p/660519#M228041</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/237299"&gt;@Bleepie&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;did you tried with dedup (&lt;A href="https://docs.splunk.com/Documentation/SCS/current/SearchReference/DedupCommandOverview" target="_blank"&gt;https://docs.splunk.com/Documentation/SCS/current/SearchReference/DedupCommandOverview&lt;/A&gt;)?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;your_search&amp;gt;
| dedup host
| sort host
| table host&lt;/LI-CODE&gt;&lt;P&gt;but in this way you have only the list of hosts with events.&lt;/P&gt;&lt;P&gt;If you want o check if there are some missing host, you have to create a lookup (called e.g. perimeter.csv) containing at least one column called host and then run a search like the following:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| tstats count WHERE index=your_index BY host
| append [ | inputlookup perimeter.csv | eval count=0 | fields host count ]
| stats sum(count) AS total BY host
| where total=0&lt;/LI-CODE&gt;&lt;P&gt;in this way, if you have results the host is missed.&lt;/P&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>Thu, 12 Oct 2023 12:11:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-limit-results-to-one-1-for-each-host/m-p/660519#M228041</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2023-10-12T12:11:45Z</dc:date>
    </item>
  </channel>
</rss>

