<?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: Splunk Condition Search in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Condition-Search/m-p/660723#M228116</link>
    <description>&lt;P&gt;&lt;FONT face="courier new,courier"&gt;values(*) as *&lt;/FONT&gt; means take the values of all other fields and put them into fields by the same name.&amp;nbsp; So each field that existed before &lt;FONT face="courier new,courier"&gt;stats&lt;/FONT&gt; will exist after it, but possibly with more than one value in each.&lt;/P&gt;</description>
    <pubDate>Fri, 13 Oct 2023 18:51:32 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2023-10-13T18:51:32Z</dc:date>
    <item>
      <title>Splunk Condition Search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Condition-Search/m-p/660698#M228100</link>
      <description>&lt;P&gt;Let's say im running a search where I want to look at domains traveled to.&lt;/P&gt;&lt;P&gt;index=web_traffic sourcetype=domains domain IN ("*.com", "*.org*", "*.edu*")&lt;/P&gt;&lt;P&gt;I want to do a count on how domains that have appeared less than 5 times over the search period. How can I accomplish this? I know I could do a&lt;/P&gt;&lt;P&gt;stats count by domain&lt;/P&gt;&lt;P&gt;but after that, I'm unable to grab the rest of the results in the index such as time, etc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Oct 2023 17:27:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-Condition-Search/m-p/660698#M228100</guid>
      <dc:creator>MM0071</dc:creator>
      <dc:date>2023-10-13T17:27:19Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Condition Search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Condition-Search/m-p/660705#M228105</link>
      <description>&lt;P&gt;The &lt;FONT face="courier new,courier"&gt;stats&lt;/FONT&gt; command is transforming, which means only the fields referenced in it are available to subsequent commands.&amp;nbsp; In this case, they would be count and domain.&amp;nbsp; To make other fields available, include them in &lt;FONT face="courier new,courier"&gt;stats&lt;/FONT&gt;.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| status count, values(*) as * by domain&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Note that fields other than count and domain may be multi-valued and so may require special handling using mv* functions.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Oct 2023 17:28:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-Condition-Search/m-p/660705#M228105</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2023-10-13T17:28:28Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Condition Search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Condition-Search/m-p/660714#M228111</link>
      <description>&lt;P&gt;Thank you so much for the help. Can you explain to me what the follow line means?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;values(*) as *&lt;/P&gt;</description>
      <pubDate>Fri, 13 Oct 2023 18:25:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-Condition-Search/m-p/660714#M228111</guid>
      <dc:creator>MM0071</dc:creator>
      <dc:date>2023-10-13T18:25:23Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Condition Search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Condition-Search/m-p/660720#M228115</link>
      <description>&lt;P&gt;It's a way of telling Splunk to rename the fields.&lt;/P&gt;&lt;P&gt;Normally if you just do&lt;/P&gt;&lt;PRE&gt;| stats values(*)&lt;/PRE&gt;&lt;P&gt;it will name the resulting fields values(fielda), values(fieldb), values(fieldc) and so on. If you just want to see what those values are that's no problem but that's not very convenient to work with such fields later. So if you do&lt;/P&gt;&lt;PRE&gt;| stats values(*) as *&lt;/PRE&gt;&lt;P&gt;The resulting mutivalued fields will be named the same as the original fields which you are summarizing were so instead of values(fielda) you'll still have fielda.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Oct 2023 18:47:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-Condition-Search/m-p/660720#M228115</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2023-10-13T18:47:14Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Condition Search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Condition-Search/m-p/660723#M228116</link>
      <description>&lt;P&gt;&lt;FONT face="courier new,courier"&gt;values(*) as *&lt;/FONT&gt; means take the values of all other fields and put them into fields by the same name.&amp;nbsp; So each field that existed before &lt;FONT face="courier new,courier"&gt;stats&lt;/FONT&gt; will exist after it, but possibly with more than one value in each.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Oct 2023 18:51:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-Condition-Search/m-p/660723#M228116</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2023-10-13T18:51:32Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Condition Search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Condition-Search/m-p/660725#M228117</link>
      <description>&lt;P&gt;Gotcha. So how can I implement logic so only show domains that show up 5 or less times?&lt;/P&gt;</description>
      <pubDate>Fri, 13 Oct 2023 18:52:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-Condition-Search/m-p/660725#M228117</guid>
      <dc:creator>MM0071</dc:creator>
      <dc:date>2023-10-13T18:52:15Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Condition Search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Condition-Search/m-p/660731#M228121</link>
      <description>&lt;P&gt;You have the count field so you can use the &lt;EM&gt;where&lt;/EM&gt; command to filter the events.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Oct 2023 18:56:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-Condition-Search/m-p/660731#M228121</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2023-10-13T18:56:41Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Condition Search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Condition-Search/m-p/660733#M228122</link>
      <description>&lt;P&gt;Is it as simple as:&amp;nbsp;&lt;/P&gt;&lt;P&gt;| stats count, values(*) as * by domain &amp;lt; 5&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I get an error trying to do&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;| where stats count, values(*) as * by domain &amp;lt; 5&lt;/P&gt;</description>
      <pubDate>Fri, 13 Oct 2023 19:04:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-Condition-Search/m-p/660733#M228122</guid>
      <dc:creator>MM0071</dc:creator>
      <dc:date>2023-10-13T19:04:02Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Condition Search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Condition-Search/m-p/660738#M228123</link>
      <description>&lt;P&gt;No. Don't try to squeeze everything into one command &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;PRE&gt;| stats count, values(*) as * by domain&lt;/PRE&gt;&lt;P&gt;This will give you results groupped by domain.&lt;/P&gt;&lt;P&gt;So now you have to filter the results with another command.&lt;/P&gt;&lt;PRE&gt;| where count&amp;lt;=5&lt;/PRE&gt;&lt;P&gt;And you're home.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Oct 2023 19:50:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-Condition-Search/m-p/660738#M228123</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2023-10-13T19:50:33Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Condition Search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Condition-Search/m-p/660885#M228174</link>
      <description>&lt;P&gt;thank you. much appreciated.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2023 15:31:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-Condition-Search/m-p/660885#M228174</guid>
      <dc:creator>MM0071</dc:creator>
      <dc:date>2023-10-16T15:31:23Z</dc:date>
    </item>
  </channel>
</rss>

