<?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: Pass parameters from one search to another in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Pass-parameters-from-one-search-to-another/m-p/83209#M21171</link>
    <description>&lt;P&gt;I'd extract the "type1" value as a field and then create a transaction.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | transaction maxevents=2 startswith="GET | FAIL"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Alternatively if you have some kind of unique identifier that connects the two, using a subsearch is more efficient. Say your log looks more like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;id592 | GET | FAIL | 1000ms
id592 | type1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then you could extract the identifier (let's call the field "id") and the type1 value ("type") and do:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;type=* [search "GET | FAIL" | fields id]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 02 Mar 2012 13:43:01 GMT</pubDate>
    <dc:creator>Ayn</dc:creator>
    <dc:date>2012-03-02T13:43:01Z</dc:date>
    <item>
      <title>Pass parameters from one search to another</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Pass-parameters-from-one-search-to-another/m-p/83208#M21170</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;

&lt;P&gt;We have a system which always logs two lines, Eg:&lt;/P&gt;

&lt;P&gt;1) Operation | Status | Time&lt;BR /&gt;
2) Operation | Type&lt;/P&gt;

&lt;P&gt;I want a search which would return all the second lines, where the first line Status is Failed.&lt;BR /&gt;
Eg. If I have these four logs, I want a search which returns only the 4th line (because the status of the operation is fail)&lt;/P&gt;

&lt;P&gt;GET | SUCCESS | 100ms&lt;BR /&gt;
GET | type1&lt;/P&gt;

&lt;P&gt;GET | FAIL | 1000ms&lt;BR /&gt;
GET | type1&lt;/P&gt;

&lt;P&gt;Any ideas on how I can achieve this?&lt;/P&gt;

&lt;P&gt;Thanks a lot!&lt;/P&gt;</description>
      <pubDate>Fri, 02 Mar 2012 13:02:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Pass-parameters-from-one-search-to-another/m-p/83208#M21170</guid>
      <dc:creator>simonattardGO</dc:creator>
      <dc:date>2012-03-02T13:02:13Z</dc:date>
    </item>
    <item>
      <title>Re: Pass parameters from one search to another</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Pass-parameters-from-one-search-to-another/m-p/83209#M21171</link>
      <description>&lt;P&gt;I'd extract the "type1" value as a field and then create a transaction.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | transaction maxevents=2 startswith="GET | FAIL"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Alternatively if you have some kind of unique identifier that connects the two, using a subsearch is more efficient. Say your log looks more like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;id592 | GET | FAIL | 1000ms
id592 | type1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then you could extract the identifier (let's call the field "id") and the type1 value ("type") and do:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;type=* [search "GET | FAIL" | fields id]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 02 Mar 2012 13:43:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Pass-parameters-from-one-search-to-another/m-p/83209#M21171</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2012-03-02T13:43:01Z</dc:date>
    </item>
  </channel>
</rss>

