<?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 Complex subsearch: Need to extract value of field and pipe into another search in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Complex-subsearch-Need-to-extract-value-of-field-and-pipe-into/m-p/39675#M9079</link>
    <description>&lt;P&gt;So I’m trying to link a couple different fields together to get the data I’m looking for, but it involves a couple steps and not sure how to put this subsearch together. I’ve been able to extract fields, but still some more steps to go. Anyway here is what I’m trying to do:&lt;/P&gt;

&lt;P&gt;1 - Find MID’s from lines with “&lt;EM&gt;Veriifcation-Fail&lt;/EM&gt;”&lt;/P&gt;

&lt;P&gt;Jan 31 11:43:28 x.x.x.x mail_logs: Info: MID &lt;EM&gt;401106733&lt;/EM&gt; Custom Log Entry: Verification-Fail&lt;/P&gt;

&lt;P&gt;2 - Then search for that same MID to find the associated ICID&lt;/P&gt;

&lt;P&gt;Jan 31 11:44:35 x.x.x.x mail_logs: Info: MID 1252214406 ICID 2116684223 &lt;STRONG&gt;From: &lt;A href="mailto:user@company.com"&gt;user@company.com&lt;/A&gt;&lt;/STRONG&gt;  (with &amp;lt; &amp;gt; around email - will not come up in this editor)&lt;/P&gt;

&lt;P&gt;3 - Then I take the ICID and search for that&lt;/P&gt;

&lt;P&gt;grep &lt;EM&gt;2116684223&lt;/EM&gt; logfile&lt;/P&gt;

&lt;P&gt;Jan 31 11:44:35 x.x.x.x maillogs: Info: New SMTP ICID &lt;EM&gt;2116684223&lt;/EM&gt; interface Data 1 (10.10.10.10) address &lt;STRONG&gt;10.10.10.10&lt;/STRONG&gt; reverse dns host &lt;STRONG&gt;host.domain.local&lt;/STRONG&gt; verified no&lt;/P&gt;

&lt;P&gt;The data I need are the FROM: and the SMTP IP and HOST in &lt;STRONG&gt;bold&lt;/STRONG&gt; above.&lt;/P&gt;

&lt;P&gt;Any help at all is appreciated. Very new to splunk, but just need nudge in the right direction.&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
    <pubDate>Thu, 21 Feb 2013 21:06:12 GMT</pubDate>
    <dc:creator>whateverman</dc:creator>
    <dc:date>2013-02-21T21:06:12Z</dc:date>
    <item>
      <title>Complex subsearch: Need to extract value of field and pipe into another search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Complex-subsearch-Need-to-extract-value-of-field-and-pipe-into/m-p/39675#M9079</link>
      <description>&lt;P&gt;So I’m trying to link a couple different fields together to get the data I’m looking for, but it involves a couple steps and not sure how to put this subsearch together. I’ve been able to extract fields, but still some more steps to go. Anyway here is what I’m trying to do:&lt;/P&gt;

&lt;P&gt;1 - Find MID’s from lines with “&lt;EM&gt;Veriifcation-Fail&lt;/EM&gt;”&lt;/P&gt;

&lt;P&gt;Jan 31 11:43:28 x.x.x.x mail_logs: Info: MID &lt;EM&gt;401106733&lt;/EM&gt; Custom Log Entry: Verification-Fail&lt;/P&gt;

&lt;P&gt;2 - Then search for that same MID to find the associated ICID&lt;/P&gt;

&lt;P&gt;Jan 31 11:44:35 x.x.x.x mail_logs: Info: MID 1252214406 ICID 2116684223 &lt;STRONG&gt;From: &lt;A href="mailto:user@company.com"&gt;user@company.com&lt;/A&gt;&lt;/STRONG&gt;  (with &amp;lt; &amp;gt; around email - will not come up in this editor)&lt;/P&gt;

&lt;P&gt;3 - Then I take the ICID and search for that&lt;/P&gt;

&lt;P&gt;grep &lt;EM&gt;2116684223&lt;/EM&gt; logfile&lt;/P&gt;

&lt;P&gt;Jan 31 11:44:35 x.x.x.x maillogs: Info: New SMTP ICID &lt;EM&gt;2116684223&lt;/EM&gt; interface Data 1 (10.10.10.10) address &lt;STRONG&gt;10.10.10.10&lt;/STRONG&gt; reverse dns host &lt;STRONG&gt;host.domain.local&lt;/STRONG&gt; verified no&lt;/P&gt;

&lt;P&gt;The data I need are the FROM: and the SMTP IP and HOST in &lt;STRONG&gt;bold&lt;/STRONG&gt; above.&lt;/P&gt;

&lt;P&gt;Any help at all is appreciated. Very new to splunk, but just need nudge in the right direction.&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Feb 2013 21:06:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Complex-subsearch-Need-to-extract-value-of-field-and-pipe-into/m-p/39675#M9079</guid>
      <dc:creator>whateverman</dc:creator>
      <dc:date>2013-02-21T21:06:12Z</dc:date>
    </item>
    <item>
      <title>Re: Complex subsearch: Need to extract value of field and pipe into another search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Complex-subsearch-Need-to-extract-value-of-field-and-pipe-into/m-p/39676#M9080</link>
      <description>&lt;P&gt;I think this is very similar to some other questions that have nice detailed answers -- &lt;/P&gt;

&lt;P&gt;&lt;A href="http://splunk-base.splunk.com/answers/29172/transaction-problems-with-lots-of-events-and-multiple-fields"&gt;http://splunk-base.splunk.com/answers/29172/transaction-problems-with-lots-of-events-and-multiple-fields&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;&lt;A href="http://splunk-base.splunk.com/answers/29489/using-transaction-with-one-to-many-relationships"&gt;http://splunk-base.splunk.com/answers/29489/using-transaction-with-one-to-many-relationships&lt;/A&gt; &lt;/P&gt;

&lt;P&gt;I would check out the &lt;CODE&gt;transaction&lt;/CODE&gt; command thoroughly, and just put the subsearch idea on hold for a while.   Then after you feel you have a grasp for &lt;CODE&gt;transaction&lt;/CODE&gt; as a tool take a look at &lt;CODE&gt;searchtxn&lt;/CODE&gt;.  The searchtxn command was to a significant extent created precisely to address dcid - mid - icid use cases,  however I think you'll get the hang of it faster if you go slow and bone up on &lt;CODE&gt;transaction&lt;/CODE&gt; first. &lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Transaction"&gt;http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Transaction&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0.2/SearchReference/Searchtxn"&gt;http://docs.splunk.com/Documentation/Splunk/5.0.2/SearchReference/Searchtxn&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Feb 2013 03:55:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Complex-subsearch-Need-to-extract-value-of-field-and-pipe-into/m-p/39676#M9080</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2013-02-22T03:55:28Z</dc:date>
    </item>
    <item>
      <title>Re: Complex subsearch: Need to extract value of field and pipe into another search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Complex-subsearch-Need-to-extract-value-of-field-and-pipe-into/m-p/39677#M9081</link>
      <description>&lt;P&gt;ok, thanks! I just read the transaction reference page, and I feel much more confident. Exactly what I was looking for. Let's hope it works well though. I will update with my results. Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 22 Feb 2013 07:27:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Complex-subsearch-Need-to-extract-value-of-field-and-pipe-into/m-p/39677#M9081</guid>
      <dc:creator>whateverman</dc:creator>
      <dc:date>2013-02-22T07:27:08Z</dc:date>
    </item>
  </channel>
</rss>

