<?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 Forming a Subquery in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/Forming-a-Subquery/m-p/330130#M4819</link>
    <description>&lt;P&gt;We are feeding logs from a messaging middleware into our Splunk installation.  Input and output logs for this middleware are respectively being stored with &lt;CODE&gt;sourcetype&lt;/CODE&gt; flags &lt;CODE&gt;app_input&lt;/CODE&gt; and &lt;CODE&gt;app_output&lt;/CODE&gt;, with each &lt;CODE&gt;app_input&lt;/CODE&gt;/&lt;CODE&gt;app_output&lt;/CODE&gt; pair containing a common, alphanumeric &lt;CODE&gt;transactionid&lt;/CODE&gt; contained in square brackets.  We're trying to build a single line search that will result in a listing of ALL I/O log pairs for which either the &lt;CODE&gt;app_input&lt;/CODE&gt; or &lt;CODE&gt;app_output&lt;/CODE&gt; contains a specified string.&lt;/P&gt;

&lt;P&gt;Attempting to solve this, we started with &lt;CODE&gt;sourcetype=app_* some_search | rex "\[(?&amp;lt;transactionid&amp;gt;[A-Za-z0-9]+)\]\"&lt;/CODE&gt;.  Now, we'd like the search to continue using each extracted &lt;CODE&gt;transactionid&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;We've tried queries w. subqueries along the lines of &lt;CODE&gt;sourcetype=app_* [ search sourcetype=app_* some_search | rex "\[(?&amp;lt;transactionid&amp;gt;[A-Za-z0-9]+)\]" | rename transactionid as query&lt;/CODE&gt; without any apparent luck.&lt;/P&gt;

&lt;P&gt;Any assistance would be greatly appreciated.&lt;/P&gt;

&lt;P&gt;Thank you in advance,&lt;/P&gt;

&lt;P&gt;Harold Falkmeyer&lt;/P&gt;</description>
    <pubDate>Thu, 08 Jun 2017 09:05:20 GMT</pubDate>
    <dc:creator>hfalkmeyer</dc:creator>
    <dc:date>2017-06-08T09:05:20Z</dc:date>
    <item>
      <title>Forming a Subquery</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Forming-a-Subquery/m-p/330130#M4819</link>
      <description>&lt;P&gt;We are feeding logs from a messaging middleware into our Splunk installation.  Input and output logs for this middleware are respectively being stored with &lt;CODE&gt;sourcetype&lt;/CODE&gt; flags &lt;CODE&gt;app_input&lt;/CODE&gt; and &lt;CODE&gt;app_output&lt;/CODE&gt;, with each &lt;CODE&gt;app_input&lt;/CODE&gt;/&lt;CODE&gt;app_output&lt;/CODE&gt; pair containing a common, alphanumeric &lt;CODE&gt;transactionid&lt;/CODE&gt; contained in square brackets.  We're trying to build a single line search that will result in a listing of ALL I/O log pairs for which either the &lt;CODE&gt;app_input&lt;/CODE&gt; or &lt;CODE&gt;app_output&lt;/CODE&gt; contains a specified string.&lt;/P&gt;

&lt;P&gt;Attempting to solve this, we started with &lt;CODE&gt;sourcetype=app_* some_search | rex "\[(?&amp;lt;transactionid&amp;gt;[A-Za-z0-9]+)\]\"&lt;/CODE&gt;.  Now, we'd like the search to continue using each extracted &lt;CODE&gt;transactionid&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;We've tried queries w. subqueries along the lines of &lt;CODE&gt;sourcetype=app_* [ search sourcetype=app_* some_search | rex "\[(?&amp;lt;transactionid&amp;gt;[A-Za-z0-9]+)\]" | rename transactionid as query&lt;/CODE&gt; without any apparent luck.&lt;/P&gt;

&lt;P&gt;Any assistance would be greatly appreciated.&lt;/P&gt;

&lt;P&gt;Thank you in advance,&lt;/P&gt;

&lt;P&gt;Harold Falkmeyer&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jun 2017 09:05:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Forming-a-Subquery/m-p/330130#M4819</guid>
      <dc:creator>hfalkmeyer</dc:creator>
      <dc:date>2017-06-08T09:05:20Z</dc:date>
    </item>
    <item>
      <title>Re: Forming a Subquery</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Forming-a-Subquery/m-p/330131#M4820</link>
      <description>&lt;P&gt;Have you tried creating a extracted field for your &lt;CODE&gt;transactionid&lt;/CODE&gt;?&lt;/P&gt;

&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/6.6.1/Scenarios/Extractfields"&gt;https://docs.splunk.com/Documentation/Splunk/6.6.1/Scenarios/Extractfields&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Make noticed of Part 4, building an extracted field with the field extractor tool. &lt;/P&gt;</description>
      <pubDate>Thu, 08 Jun 2017 14:10:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Forming-a-Subquery/m-p/330131#M4820</guid>
      <dc:creator>jordanb93</dc:creator>
      <dc:date>2017-06-08T14:10:05Z</dc:date>
    </item>
    <item>
      <title>Re: Forming a Subquery</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Forming-a-Subquery/m-p/330132#M4821</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;sourcetype=app_* some_search 
| rex "\[(?&amp;lt;transactionid&amp;gt;[A-Za-z0-9]+)\]"
| stats values(*) as * by transactionid
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;... or, alternately...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=app_* some_search 
| rex "\[(?&amp;lt;transactionid&amp;gt;[A-Za-z0-9]+)\]"
| transaction transactionid
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;HR /&gt;

&lt;P&gt;Removed the extra slash before the final quote.&lt;BR /&gt;
Added alternate to use &lt;CODE&gt;transaction&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jun 2017 14:50:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Forming-a-Subquery/m-p/330132#M4821</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-06-08T14:50:33Z</dc:date>
    </item>
  </channel>
</rss>

