<?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: Use extracted field in a subsearch in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Use-extracted-field-in-a-subsearch/m-p/74695#M18847</link>
    <description>&lt;P&gt;Hi, thanks for your answer. I'm not sure if this gives me the correct result. I would like to check if the same SessionID is used with a different IP-Adress.&lt;/P&gt;</description>
    <pubDate>Tue, 05 Apr 2011 18:07:12 GMT</pubDate>
    <dc:creator>kochera</dc:creator>
    <dc:date>2011-04-05T18:07:12Z</dc:date>
    <item>
      <title>Use extracted field in a subsearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Use-extracted-field-in-a-subsearch/m-p/74693#M18845</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I would like to combine two searches. The first one gives me the session-id which i would like to use in a second search, e.g. &lt;/P&gt;

&lt;P&gt;Query 1: index=main 123.123.123.156 source="/appl/log/www/access.log" |rex field=&lt;EM&gt;raw "\"\s\"(?[A-z,0-9,-.&lt;/EM&gt;]+)"&lt;/P&gt;

&lt;P&gt;Query 2: 
index=main $SessionID$ source="/appl/log/www/access.log"&lt;/P&gt;

&lt;P&gt;Cheers,
Andy&lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2011 13:36:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Use-extracted-field-in-a-subsearch/m-p/74693#M18845</guid>
      <dc:creator>kochera</dc:creator>
      <dc:date>2011-04-05T13:36:29Z</dc:date>
    </item>
    <item>
      <title>Re: Use extracted field in a subsearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Use-extracted-field-in-a-subsearch/m-p/74694#M18846</link>
      <description>&lt;P&gt;Hi kochera&lt;/P&gt;

&lt;P&gt;you could use something like that (I used a different regex for this example!):&lt;/P&gt;

&lt;P&gt;index="main" 123.123.123.156 source="/appl/log/www/access.log" [search index="main" source="/appl/log/www/access.log" | rex field=_raw "(?i)^(?:[^-]*-){5}\s+(?P.+)" | fields requestid ]&lt;/P&gt;

&lt;P&gt;the sub search will result in a list of:&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;( ( requestid="xxxxxxxxxxxxxxxxx" ) OR ( requestid="xxxxxxxxxxxx" ) OR ( requestid="xxxxxxxxx" ) )&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;and this will be used in the search.&lt;/P&gt;

&lt;P&gt;hope this helps&lt;/P&gt;

&lt;P&gt;MuS&lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2011 17:21:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Use-extracted-field-in-a-subsearch/m-p/74694#M18846</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2011-04-05T17:21:17Z</dc:date>
    </item>
    <item>
      <title>Re: Use extracted field in a subsearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Use-extracted-field-in-a-subsearch/m-p/74695#M18847</link>
      <description>&lt;P&gt;Hi, thanks for your answer. I'm not sure if this gives me the correct result. I would like to check if the same SessionID is used with a different IP-Adress.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2011 18:07:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Use-extracted-field-in-a-subsearch/m-p/74695#M18847</guid>
      <dc:creator>kochera</dc:creator>
      <dc:date>2011-04-05T18:07:12Z</dc:date>
    </item>
    <item>
      <title>Re: Use extracted field in a subsearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Use-extracted-field-in-a-subsearch/m-p/74696#M18848</link>
      <description>&lt;P&gt;well then just leave the IP away in the main search, then you should see any SessionID of any IP.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2011 18:41:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Use-extracted-field-in-a-subsearch/m-p/74696#M18848</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2011-04-05T18:41:49Z</dc:date>
    </item>
    <item>
      <title>Re: Use extracted field in a subsearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Use-extracted-field-in-a-subsearch/m-p/74697#M18849</link>
      <description>&lt;P&gt;yes, that's what I'm trying at the moment&lt;/P&gt;

&lt;P&gt;index=main source="/appl/log/www/access.log" [search index=main source="/appl/log/www/access.log" "123.123.123.156" |rex field=&lt;EM&gt;raw "\"\s\"(?&lt;SESSIONID&gt;[A-z,0-9,-.&lt;/SESSIONID&gt;&lt;/EM&gt;]+)"| fields + sessionid]&lt;/P&gt;

&lt;P&gt;But somehow I don't get any results...&lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2011 18:53:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Use-extracted-field-in-a-subsearch/m-p/74697#M18849</guid>
      <dc:creator>kochera</dc:creator>
      <dc:date>2011-04-05T18:53:30Z</dc:date>
    </item>
    <item>
      <title>Re: Use extracted field in a subsearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Use-extracted-field-in-a-subsearch/m-p/74698#M18850</link>
      <description>&lt;P&gt;okay leave the IP completely away in any search; but then I wonder why are you using a sub search anyway?&lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2011 19:36:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Use-extracted-field-in-a-subsearch/m-p/74698#M18850</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2011-04-05T19:36:15Z</dc:date>
    </item>
    <item>
      <title>Re: Use extracted field in a subsearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Use-extracted-field-in-a-subsearch/m-p/74699#M18851</link>
      <description>&lt;P&gt;if I leave the IP away, then I see results but as you mentioned, this doesn't make any sense...&lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2011 19:51:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Use-extracted-field-in-a-subsearch/m-p/74699#M18851</guid>
      <dc:creator>kochera</dc:creator>
      <dc:date>2011-04-05T19:51:14Z</dc:date>
    </item>
  </channel>
</rss>

