<?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: OR operator between subsearch and fields in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-OR-operator-between-subsearch-and-fields/m-p/618811#M215065</link>
    <description>&lt;P&gt;Thanks for quick reply! but it didn't work&lt;/P&gt;</description>
    <pubDate>Sat, 29 Oct 2022 00:20:14 GMT</pubDate>
    <dc:creator>splunkxorsplunk</dc:creator>
    <dc:date>2022-10-29T00:20:14Z</dc:date>
    <item>
      <title>How to use OR operator between subsearch and fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-OR-operator-between-subsearch-and-fields/m-p/618808#M215063</link>
      <description>&lt;P&gt;Hey Splunkers,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have the following search but it is not working as expected. What I am trying to achieve is if one of the conditions matches I will table out some fields.&lt;/P&gt;
&lt;P&gt;condition 1 : if user_action="Update*"&lt;/P&gt;
&lt;P&gt;OR&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Condition 2:&amp;nbsp; within each 5 min bucket, if any user has access more than 400 destination in the same index, index1&lt;/P&gt;
&lt;P&gt;but it doesn't work. How can I check both condition on the same search?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advanced!&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;index=index1
``` condition 1 ```
( user_action="Update*" )

OR
``` condition 2 ```
(
[search index=index1 NOT user IN ("system*", "nobody*")
| bin _time span=5m
| stats values(dest) count by _time, user
| where count &amp;gt; 400 ]
)

| table _time, user, dest&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;</description>
      <pubDate>Sat, 29 Oct 2022 00:42:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-OR-operator-between-subsearch-and-fields/m-p/618808#M215063</guid>
      <dc:creator>splunkxorsplunk</dc:creator>
      <dc:date>2022-10-29T00:42:46Z</dc:date>
    </item>
    <item>
      <title>Re: OR operator between subsearch and fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-OR-operator-between-subsearch-and-fields/m-p/618810#M215064</link>
      <description>&lt;P&gt;Just literally replace the or with&lt;/P&gt;&lt;P&gt;&amp;nbsp;| append&amp;nbsp;&lt;/P&gt;&lt;P&gt;And remove the next set of parentheses&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Oct 2022 23:59:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-OR-operator-between-subsearch-and-fields/m-p/618810#M215064</guid>
      <dc:creator>johnhuang</dc:creator>
      <dc:date>2022-10-28T23:59:18Z</dc:date>
    </item>
    <item>
      <title>Re: OR operator between subsearch and fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-OR-operator-between-subsearch-and-fields/m-p/618811#M215065</link>
      <description>&lt;P&gt;Thanks for quick reply! but it didn't work&lt;/P&gt;</description>
      <pubDate>Sat, 29 Oct 2022 00:20:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-OR-operator-between-subsearch-and-fields/m-p/618811#M215065</guid>
      <dc:creator>splunkxorsplunk</dc:creator>
      <dc:date>2022-10-29T00:20:14Z</dc:date>
    </item>
    <item>
      <title>Re: OR operator between subsearch and fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-OR-operator-between-subsearch-and-fields/m-p/618813#M215066</link>
      <description>&lt;P&gt;Either one of these:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=index1 user_action="Update"
| append [search index=index1 NOT user IN ("system*", "nobody*")
| bucket _time span=5m
| stats count as event_ct values(dest) AS dest BY _time user
| where count&amp;gt;400]
| table _time user dest

index=index1
| bucket _time span=5m
| eventstats count AS event_ct BY _time user
| search event_ct&amp;gt;400 OR user_action="Update"
| table _time user dest&lt;/LI-CODE&gt;</description>
      <pubDate>Sat, 29 Oct 2022 02:38:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-OR-operator-between-subsearch-and-fields/m-p/618813#M215066</guid>
      <dc:creator>johnhuang</dc:creator>
      <dc:date>2022-10-29T02:38:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to use OR operator between subsearch and fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-OR-operator-between-subsearch-and-fields/m-p/618815#M215068</link>
      <description>&lt;P&gt;It worked! Thanks Johnhuang!&lt;/P&gt;</description>
      <pubDate>Sat, 29 Oct 2022 03:36:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-OR-operator-between-subsearch-and-fields/m-p/618815#M215068</guid>
      <dc:creator>splunkxorsplunk</dc:creator>
      <dc:date>2022-10-29T03:36:59Z</dc:date>
    </item>
  </channel>
</rss>

