<?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 Display only events that fulfill all IN conditions in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Display-only-events-that-fulfill-all-IN-conditions/m-p/693712#M235993</link>
    <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;i have a search that query's for 4 IN conditions and then list them. The search works fine but i need help with one request. I only want to display the events that fulfill all 4 conditions within the IN statement:&lt;/P&gt;&lt;P&gt;Search:&lt;/P&gt;&lt;P&gt;index=wineventlog EventCode=5145 file_name="\\\\*\\IPC$" RelativeTargetName IN (samr,lsarpc,srvsvc,winreg) src_user!=*$&lt;BR /&gt;| stats count by src_user,src_ip,RelativeTargetName,host_fqdn&lt;BR /&gt;| stats list(RelativeTargetName) by src_ip, src_user,host_fqdn&lt;/P&gt;&lt;P&gt;Table:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="splunk_question.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/31812iDEA5B6A108745A2F/image-size/large?v=v2&amp;amp;px=999" role="button" title="splunk_question.png" alt="splunk_question.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;So in only want to see the events that match all 4 RelativeTargetNames not the one that matches only one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be appreciated &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 18 Jul 2024 10:15:52 GMT</pubDate>
    <dc:creator>DanielAmlung</dc:creator>
    <dc:date>2024-07-18T10:15:52Z</dc:date>
    <item>
      <title>Display only events that fulfill all IN conditions</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Display-only-events-that-fulfill-all-IN-conditions/m-p/693712#M235993</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;i have a search that query's for 4 IN conditions and then list them. The search works fine but i need help with one request. I only want to display the events that fulfill all 4 conditions within the IN statement:&lt;/P&gt;&lt;P&gt;Search:&lt;/P&gt;&lt;P&gt;index=wineventlog EventCode=5145 file_name="\\\\*\\IPC$" RelativeTargetName IN (samr,lsarpc,srvsvc,winreg) src_user!=*$&lt;BR /&gt;| stats count by src_user,src_ip,RelativeTargetName,host_fqdn&lt;BR /&gt;| stats list(RelativeTargetName) by src_ip, src_user,host_fqdn&lt;/P&gt;&lt;P&gt;Table:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="splunk_question.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/31812iDEA5B6A108745A2F/image-size/large?v=v2&amp;amp;px=999" role="button" title="splunk_question.png" alt="splunk_question.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;So in only want to see the events that match all 4 RelativeTargetNames not the one that matches only one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be appreciated &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jul 2024 10:15:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Display-only-events-that-fulfill-all-IN-conditions/m-p/693712#M235993</guid>
      <dc:creator>DanielAmlung</dc:creator>
      <dc:date>2024-07-18T10:15:52Z</dc:date>
    </item>
    <item>
      <title>Re: Display only events that fulfill all IN conditions</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Display-only-events-that-fulfill-all-IN-conditions/m-p/693719#M235995</link>
      <description>&lt;P&gt;hi&lt;BR /&gt;&lt;BR /&gt;have you tried mvexpand&amp;nbsp;&lt;SPAN&gt;list(RelativeTargetName)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jul 2024 10:47:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Display-only-events-that-fulfill-all-IN-conditions/m-p/693719#M235995</guid>
      <dc:creator>sintjm</dc:creator>
      <dc:date>2024-07-18T10:47:28Z</dc:date>
    </item>
    <item>
      <title>Re: Display only events that fulfill all IN conditions</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Display-only-events-that-fulfill-all-IN-conditions/m-p/693722#M235997</link>
      <description>&lt;P&gt;Hi, thanks for the answer, but i don't want to expand the multi value field. So this is not what iam looking for&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jul 2024 10:57:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Display-only-events-that-fulfill-all-IN-conditions/m-p/693722#M235997</guid>
      <dc:creator>DanielAmlung</dc:creator>
      <dc:date>2024-07-18T10:57:34Z</dc:date>
    </item>
    <item>
      <title>Re: Display only events that fulfill all IN conditions</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Display-only-events-that-fulfill-all-IN-conditions/m-p/693723#M235998</link>
      <description>&lt;LI-CODE lang="markup"&gt;| stats list(RelativeTargetName) as RelativeTargetName by src_ip, src_user,host_fqdn
| where mvcount(RelativeTargetName) = 4&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 18 Jul 2024 11:01:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Display-only-events-that-fulfill-all-IN-conditions/m-p/693723#M235998</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-07-18T11:01:45Z</dc:date>
    </item>
    <item>
      <title>Re: Display only events that fulfill all IN conditions</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Display-only-events-that-fulfill-all-IN-conditions/m-p/693726#M236000</link>
      <description>&lt;P&gt;As an additional hint, you could add your all four search term literally to limit the initial search results for a bit of a performance boost.&lt;/P&gt;&lt;PRE&gt;index=wineventlog EventCode=5145 file_name="\\\\*\\IPC$" RelativeTargetName IN (samr,lsarpc,srvsvc,winreg) src_user!=*$ samr lsarpc srvsvc winreg&lt;BR /&gt;| stats count by src_user,src_ip,RelativeTargetName,host_fqdn&lt;BR /&gt;| stats list(RelativeTargetName) by src_ip, src_user,host_fqdn&lt;/PRE&gt;&lt;P&gt;But whether this is significantly beneficial you'd have to see the job inspect page.&lt;/P&gt;&lt;P&gt;Another way to limit your results (as opposed to &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt; 's solution which works on the summarized data) would be to add all four values explicitly as field values, not with the IN clause.&lt;/P&gt;&lt;PRE&gt;index=wineventlog EventCode=5145 file_name="\\\\*\\IPC$" RelativeTargetName=samr, RelativeTargetName=lsarpc RelativeTargetName=srvsvc RelativeTargetName=winreg src_user!=*$ &lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 18 Jul 2024 11:08:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Display-only-events-that-fulfill-all-IN-conditions/m-p/693726#M236000</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2024-07-18T11:08:34Z</dc:date>
    </item>
    <item>
      <title>Re: Display only events that fulfill all IN conditions</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Display-only-events-that-fulfill-all-IN-conditions/m-p/693727#M236001</link>
      <description>&lt;P&gt;Thanks for pointing me in the right direction. I slightly modified the search and it now works:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;index=wineventlog EventCode=5145 file_name="\\\\*\\IPC$" RelativeTargetName IN (samr,lsarpc,srvsvc,winreg) src_user!=*$&lt;BR /&gt;| stats count by src_user,src_ip,RelativeTargetName,host_fqdn&lt;BR /&gt;| stats list(RelativeTargetName) as all by src_ip, src_user,host_fqdn&lt;BR /&gt;| where mvcount(all) = 4&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jul 2024 11:15:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Display-only-events-that-fulfill-all-IN-conditions/m-p/693727#M236001</guid>
      <dc:creator>DanielAmlung</dc:creator>
      <dc:date>2024-07-18T11:15:43Z</dc:date>
    </item>
  </channel>
</rss>

