<?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 search by variable created within a join query? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-by-variable-created-within-a-join-query/m-p/246032#M189070</link>
    <description>&lt;P&gt;I want join/combine two searches by their common value to compare transaction success/failure rate at both places. i tried something below, but unable to search by evaluated result&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Step1&lt;/STRONG&gt;: Extract substring from second log as this value exactly doesn't match within first log.&lt;/P&gt;

&lt;P&gt;index=indexoffirstlog sourcetype="&lt;EM&gt;secondlog&lt;/EM&gt;" eval length=len(fieldinterestedin) | eval transaction_id=substr(fieldinterestedin, 6, length)&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Step2:&lt;/STRONG&gt;  Search results within first log where result contain transaction_id (Not Joined yet, just checking first log query alone)&lt;/P&gt;

&lt;P&gt;index=indexoffsfirstlog sourcetype="&lt;EM&gt;firstlog&lt;/EM&gt;" matchstringoffirstlog&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Step3:&lt;/STRONG&gt; Now join both searches and search by transaction_id&lt;/P&gt;

&lt;P&gt;index=indexoffirstlog AND index=indexofsecondlog sourcetype="&lt;EM&gt;secondlog&lt;/EM&gt;" matchstringoffirstlog | eval length=len(fieldinterestedin) | eval result=substr(fieldinterestedin, 6, length) | search result&lt;/P&gt;

&lt;P&gt;But i am not getting any results. appreciate any advice.&lt;/P&gt;</description>
    <pubDate>Fri, 11 Mar 2016 13:53:40 GMT</pubDate>
    <dc:creator>akonduru</dc:creator>
    <dc:date>2016-03-11T13:53:40Z</dc:date>
    <item>
      <title>How to search by variable created within a join query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-by-variable-created-within-a-join-query/m-p/246032#M189070</link>
      <description>&lt;P&gt;I want join/combine two searches by their common value to compare transaction success/failure rate at both places. i tried something below, but unable to search by evaluated result&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Step1&lt;/STRONG&gt;: Extract substring from second log as this value exactly doesn't match within first log.&lt;/P&gt;

&lt;P&gt;index=indexoffirstlog sourcetype="&lt;EM&gt;secondlog&lt;/EM&gt;" eval length=len(fieldinterestedin) | eval transaction_id=substr(fieldinterestedin, 6, length)&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Step2:&lt;/STRONG&gt;  Search results within first log where result contain transaction_id (Not Joined yet, just checking first log query alone)&lt;/P&gt;

&lt;P&gt;index=indexoffsfirstlog sourcetype="&lt;EM&gt;firstlog&lt;/EM&gt;" matchstringoffirstlog&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Step3:&lt;/STRONG&gt; Now join both searches and search by transaction_id&lt;/P&gt;

&lt;P&gt;index=indexoffirstlog AND index=indexofsecondlog sourcetype="&lt;EM&gt;secondlog&lt;/EM&gt;" matchstringoffirstlog | eval length=len(fieldinterestedin) | eval result=substr(fieldinterestedin, 6, length) | search result&lt;/P&gt;

&lt;P&gt;But i am not getting any results. appreciate any advice.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Mar 2016 13:53:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-by-variable-created-within-a-join-query/m-p/246032#M189070</guid>
      <dc:creator>akonduru</dc:creator>
      <dc:date>2016-03-11T13:53:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to search by variable created within a join query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-by-variable-created-within-a-join-query/m-p/246033#M189071</link>
      <description>&lt;P&gt;Is the length of fieldinterestedin constant?&lt;/P&gt;</description>
      <pubDate>Fri, 11 Mar 2016 17:41:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-by-variable-created-within-a-join-query/m-p/246033#M189071</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-03-11T17:41:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to search by variable created within a join query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-by-variable-created-within-a-join-query/m-p/246034#M189072</link>
      <description>&lt;P&gt;No, It is not same. length varies. But fieldinterestedin always start wit constant like "ABCD23423fsdfsd" where ABCD is constant.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Mar 2016 20:29:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-by-variable-created-within-a-join-query/m-p/246034#M189072</guid>
      <dc:creator>akonduru</dc:creator>
      <dc:date>2016-03-11T20:29:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to search by variable created within a join query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-by-variable-created-within-a-join-query/m-p/246035#M189073</link>
      <description>&lt;P&gt;Final doubt, if you remove the constant part in the fieldinterestedin field from search 2, would it match exactly with fieldinterestedin in search 1?&lt;/P&gt;</description>
      <pubDate>Fri, 11 Mar 2016 20:37:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-by-variable-created-within-a-join-query/m-p/246035#M189073</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-03-11T20:37:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to search by variable created within a join query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-by-variable-created-within-a-join-query/m-p/246036#M189074</link>
      <description>&lt;P&gt;yes, it match except the constant part which is why i am doing substring to take off Constant part.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Mar 2016 23:39:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-by-variable-created-within-a-join-query/m-p/246036#M189074</guid>
      <dc:creator>akonduru</dc:creator>
      <dc:date>2016-03-11T23:39:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to search by variable created within a join query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-by-variable-created-within-a-join-query/m-p/246037#M189075</link>
      <description>&lt;P&gt;Change your &lt;CODE&gt;AND&lt;/CODE&gt; to &lt;CODE&gt;OR&lt;/CODE&gt;!&lt;/P&gt;</description>
      <pubDate>Sat, 12 Mar 2016 00:02:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-by-variable-created-within-a-join-query/m-p/246037#M189075</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-03-12T00:02:09Z</dc:date>
    </item>
  </channel>
</rss>

