<?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: Unique host list but only when the # of hosts is &amp;lt; some #. To be used for alert content (inline table) in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Unique-host-list-but-only-when-the-of-hosts-is-lt-some-To-be/m-p/572148#M199405</link>
    <description>&lt;P&gt;Edited to specify what the question is.&amp;nbsp; &amp;nbsp;Yeah, the search can be optimized, will change that. thanks...&lt;/P&gt;</description>
    <pubDate>Sun, 24 Oct 2021 12:30:54 GMT</pubDate>
    <dc:creator>sjringo</dc:creator>
    <dc:date>2021-10-24T12:30:54Z</dc:date>
    <item>
      <title>Unique host list but only when the # of hosts is &lt; some #. To be used for alert content (inline table)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Unique-host-list-but-only-when-the-of-hosts-is-lt-some-To-be/m-p/572145#M199403</link>
      <description>&lt;P&gt;&lt;SPAN&gt;index=anIndex sourcetype=aSourceType ("*Starting application:*" AND (host="aHostName*")) | stats values(host) AS ServerList&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The above query gives me a list of distinct server names.&amp;nbsp; What I am attempting to do is use this query for an alert and provide the list of server's but only when the # of servers in the distinct list returned in the above query is less than a specified #.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I will be configuring the alert to trigger when the results are &amp;gt; 0 since the trigger condition will be in the query and not the alert.&lt;/P&gt;&lt;P&gt;How do I modify the query above to only provide ServerList if the # of distinct servers in that list is &amp;lt; 10 ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 24 Oct 2021 12:28:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Unique-host-list-but-only-when-the-of-hosts-is-lt-some-To-be/m-p/572145#M199403</guid>
      <dc:creator>sjringo</dc:creator>
      <dc:date>2021-10-24T12:28:36Z</dc:date>
    </item>
    <item>
      <title>Re: Unique host list but only when the # of hosts is &lt; some #. To be used for alert content (inline table)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Unique-host-list-but-only-when-the-of-hosts-is-lt-some-To-be/m-p/572146#M199404</link>
      <description>&lt;P&gt;Ok, but where's the question? What's your problem with that?&lt;/P&gt;&lt;P&gt;And remember that AND is implicit so you don't have to write (condA AND (condB)). Just do condA condB on their own. And avoid wildcard at the beginning of a search term - it will cause splunk to read all the events from given time range to find a match.&amp;nbsp; Especially if your search term starts at the word boundary - there's no point of adding that wildcard at the beginning. Check for yourself - search for "Starting application:" and "*Starting application:" and compare execution time.&lt;/P&gt;</description>
      <pubDate>Sun, 24 Oct 2021 12:23:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Unique-host-list-but-only-when-the-of-hosts-is-lt-some-To-be/m-p/572146#M199404</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2021-10-24T12:23:35Z</dc:date>
    </item>
    <item>
      <title>Re: Unique host list but only when the # of hosts is &lt; some #. To be used for alert content (inline table)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Unique-host-list-but-only-when-the-of-hosts-is-lt-some-To-be/m-p/572148#M199405</link>
      <description>&lt;P&gt;Edited to specify what the question is.&amp;nbsp; &amp;nbsp;Yeah, the search can be optimized, will change that. thanks...&lt;/P&gt;</description>
      <pubDate>Sun, 24 Oct 2021 12:30:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Unique-host-list-but-only-when-the-of-hosts-is-lt-some-To-be/m-p/572148#M199405</guid>
      <dc:creator>sjringo</dc:creator>
      <dc:date>2021-10-24T12:30:54Z</dc:date>
    </item>
    <item>
      <title>Re: Unique host list but only when the # of hosts is &lt; some #. To be used for alert content (inline table)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Unique-host-list-but-only-when-the-of-hosts-is-lt-some-To-be/m-p/572150#M199406</link>
      <description>&lt;P&gt;Since you have a multivalued field, you can do&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;&amp;lt;your search&amp;gt; | where mvcount(ServerList)&amp;gt;10&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 24 Oct 2021 12:36:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Unique-host-list-but-only-when-the-of-hosts-is-lt-some-To-be/m-p/572150#M199406</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2021-10-24T12:36:24Z</dc:date>
    </item>
    <item>
      <title>Re: Unique host list but only when the # of hosts is &lt; some #. To be used for alert content (inline table)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Unique-host-list-but-only-when-the-of-hosts-is-lt-some-To-be/m-p/572151#M199407</link>
      <description>&lt;P&gt;Was not aware of mvcount(...)&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for you input and suggestions, its greatly appreciated !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 24 Oct 2021 12:40:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Unique-host-list-but-only-when-the-of-hosts-is-lt-some-To-be/m-p/572151#M199407</guid>
      <dc:creator>sjringo</dc:creator>
      <dc:date>2021-10-24T12:40:06Z</dc:date>
    </item>
  </channel>
</rss>

