<?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 How to filter transaction results based on results of a subsearch? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-transaction-results-based-on-results-of-a/m-p/206892#M60277</link>
    <description>&lt;P&gt;I have a search which is using transaction to create events for each transaction. I then need to filter those events to show only transaction events containing one of many IP addresses returned from a subsearch.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host=ADFS* sourcetype="WinEventLog:Security" (EventCode=4624 OR EventCode=501 OR EventCode=299 OR EventCode=410) 
| fields _time, Account_Name, Security_ID, Activity_ID, Instance_ID, X_MS_Forwarded_Client_IP, EventCode 
| eval Account_Name=mvindex(Account_Name, 1) 
| rex field=X_MS_Forwarded_Client_IP mode=sed "s/(,\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})//" 
| transaction Security_ID Activity_ID Instance_ID maxspan=10s startswith=EventCode=4624 endswith=EventCode=410
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The results of which will contain the IP address in the X_MS_Forwarded_Client_IP field.&lt;/P&gt;

&lt;P&gt;This is the subsearch I have to find my target IP addresses which I need to filter on:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[index="its-o365-audit" Status=Delivered SenderAddress="&amp;lt;&amp;gt;" FromIP!=129.100.* FromIP!=10.* 
| top 100 FromIP | search count&amp;gt;5 | table FromIP | rename FromIP as X_MS_Forwarded_Client_IP]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Not sure how to filter from here? I can do search X_MS_Forwarded_Client_IP="1.2.3.4" but that only works if I want to hard code a single IP into my search. I want to see all transactions for all IPs returned from the subsearch.&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
Andrew&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 07:43:20 GMT</pubDate>
    <dc:creator>aculveruwo</dc:creator>
    <dc:date>2020-09-29T07:43:20Z</dc:date>
    <item>
      <title>How to filter transaction results based on results of a subsearch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-transaction-results-based-on-results-of-a/m-p/206892#M60277</link>
      <description>&lt;P&gt;I have a search which is using transaction to create events for each transaction. I then need to filter those events to show only transaction events containing one of many IP addresses returned from a subsearch.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host=ADFS* sourcetype="WinEventLog:Security" (EventCode=4624 OR EventCode=501 OR EventCode=299 OR EventCode=410) 
| fields _time, Account_Name, Security_ID, Activity_ID, Instance_ID, X_MS_Forwarded_Client_IP, EventCode 
| eval Account_Name=mvindex(Account_Name, 1) 
| rex field=X_MS_Forwarded_Client_IP mode=sed "s/(,\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})//" 
| transaction Security_ID Activity_ID Instance_ID maxspan=10s startswith=EventCode=4624 endswith=EventCode=410
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The results of which will contain the IP address in the X_MS_Forwarded_Client_IP field.&lt;/P&gt;

&lt;P&gt;This is the subsearch I have to find my target IP addresses which I need to filter on:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[index="its-o365-audit" Status=Delivered SenderAddress="&amp;lt;&amp;gt;" FromIP!=129.100.* FromIP!=10.* 
| top 100 FromIP | search count&amp;gt;5 | table FromIP | rename FromIP as X_MS_Forwarded_Client_IP]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Not sure how to filter from here? I can do search X_MS_Forwarded_Client_IP="1.2.3.4" but that only works if I want to hard code a single IP into my search. I want to see all transactions for all IPs returned from the subsearch.&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
Andrew&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 07:43:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-filter-transaction-results-based-on-results-of-a/m-p/206892#M60277</guid>
      <dc:creator>aculveruwo</dc:creator>
      <dc:date>2020-09-29T07:43:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter transaction results based on results of a subsearch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-transaction-results-based-on-results-of-a/m-p/206893#M60278</link>
      <description>&lt;P&gt;Figured it out using a join.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host=ADFS* sourcetype="WinEventLog:Security" (EventCode=4624 OR EventCode=501 OR EventCode=299 OR EventCode=410) | fields _time, Account_Name, Security_ID, Activity_ID, Instance_ID, X_MS_Forwarded_Client_IP, EventCode | eval Account_Name=mvindex(Account_Name, 1) | rex field=X_MS_Forwarded_Client_IP mode=sed "s/(,\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})//" | transaction Security_ID Activity_ID Instance_ID maxspan=10s startswith=EventCode=4624 endswith=EventCode=410 | join X_MS_Forwarded_Client_IP [ search index="its-o365-audit" Status=Delivered SenderAddress="&amp;lt;&amp;gt;" FromIP!=129.100.* FromIP!=10.* | top 100 FromIP | search count&amp;gt;5 | table FromIP | rename FromIP as X_MS_Forwarded_Client_IP ] | rename X_MS_Forwarded_Client_IP as IP | stats count by Account_Name, IP
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 27 Oct 2015 21:16:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-filter-transaction-results-based-on-results-of-a/m-p/206893#M60278</guid>
      <dc:creator>aculveruwo</dc:creator>
      <dc:date>2015-10-27T21:16:41Z</dc:date>
    </item>
  </channel>
</rss>

