<?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: How to compare fields across multiple sourcetypes in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-fields-across-multiple-sourcetypes/m-p/242430#M72118</link>
    <description>&lt;P&gt;I still do not get it at all.  Explain it like this:&lt;BR /&gt;
Search 1:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;blah blah1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Search 2:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;blah blah 2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Results 1:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;boo-hoo 1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Results 2:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;boo-hoo 2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Desired Results:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;foo bar success
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sun, 06 Mar 2016 04:09:55 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2016-03-06T04:09:55Z</dc:date>
    <item>
      <title>How to compare fields across multiple sourcetypes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-fields-across-multiple-sourcetypes/m-p/242427#M72115</link>
      <description>&lt;P&gt;Hi all,&lt;BR /&gt;
Im working on a search that essentially would take the field results from one search where I'm looking for a specific &lt;CODE&gt;PBM&lt;/CODE&gt; ("Problem Number") and the &lt;CODE&gt;RMTMS&lt;/CODE&gt; ("Reporting Serial Numbers") associated with it, and comparing it across another search where the update history of various machines are listed.  In this other data I extract the "Bundle" and the serial number &lt;CODE&gt;MTMS&lt;/CODE&gt; , so that I can compare the &lt;CODE&gt;MTMS&lt;/CODE&gt; and &lt;CODE&gt;RMTMS&lt;/CODE&gt; fields for equality, while appending the Bundle Information to it. Essentially my end result would be a table that lists the Serial Number of each machine that has reported that specific problem number, as well as what Code level it is on.&lt;BR /&gt;
Here is what i have so far, which is pretty much just the two searches, however I haven't been able to compare the two fields, I have used join(the current search), append, and append pipe, however I might be using them incorrectly. &lt;BR /&gt;
Thank you in advance for any help.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=* "PMB#1" 
|rex field=storageFacilityMTMS "(?&amp;lt;RMTMS&amp;gt;2123-900\S+)" 
| stats values(PMB)  values(RMTMS) as RMTMS
| join [ search index=*  "Code Levels" " Package Level" AND "Sea.ha" 
| rex "(?:\n|.)\s+(?&amp;lt;BU1&amp;gt;(?:8[7]+\.\d+\.\d+\.\d+))"
| rex "(?m)Package:\s+ha(?:\n|.)*?VRMF:\s+(?&amp;lt;BU2&amp;gt;87\S+)"
| rex "(?m)Package:\s+sfi(?:\n|.)*?VRMF:\s+(?&amp;lt;BU3&amp;gt;87\S+)"
| rex "(?m)Package:\s+se(?:\n|.)*?VRMF:\s+(?&amp;lt;BU3&amp;gt;87\S+)"
| eval Bundle=0 | foreach BU* [ eval Bundle=max(largest_BU, BU1,BU2, BU3 ) ]
| rex "(?m)Package:\s+SEA.ha(?:\n|.)*?MTMS:(?&amp;lt;MT&amp;gt;\s+\d+\-\d+\S\S+)"  
| eval MTMS=coalesce(MT,RMTMS) 
| rex "(?m)Package:\s+SEA.ha(?:\n|.)*?Package Level:\s+(?&amp;lt;LIC&amp;gt;\d+\.\d+\.\d+\.\d+)" 
| rex "(?m)Package:\s+SEA.ha.*?(?&amp;lt;MTMS&amp;gt;\s+\d+\-\d+\S\S+)" 
| eval MTMS=coalesce(MT,MS)| stats list(MTMS) as MTMS , list(Bundle) as Bundle ] 
|makemv RMTMS|mvexpand RMTMS | stats   list(MTMS) as MTMS values(RMTMS) as RMTMS , list(Bundle) as Bundle,| makemv MTMS| mvexpand MTMS| stats list(RMTMS) as MTMS , list(Bundle) as Bundle
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Search 1 (before join command)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;PMB       RMTMS
#1        2123-900-1
          2123-900-2
          2123-900-3
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Search 2 (after the join command in search)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;MTMS            Bundle
2123-900-1       87.1
2123-900-2       87.2
2123-900-7       87.3
2123-900-8       87.4
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Combined Results ( matched RMTMS and MTMTS)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;PMB    Matched_MTMS's        Bundle
#1        2123-900-1           87.1
          2123-900-2           87.2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In a nutshell im running two separate searches where I'm trying to match a field from each to create a single field ( RMTMS, MTMS) while adding the other fields to it ( PMB, Bundle). &lt;/P&gt;</description>
      <pubDate>Fri, 20 Nov 2015 21:12:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-fields-across-multiple-sourcetypes/m-p/242427#M72115</guid>
      <dc:creator>raby1996</dc:creator>
      <dc:date>2015-11-20T21:12:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare fields across multiple sourcetypes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-fields-across-multiple-sourcetypes/m-p/242428#M72116</link>
      <description>&lt;P&gt;You need to explain &lt;EM&gt;exactly&lt;/EM&gt; how the 2 datasets relate and what you are trying correlate.  The best way to do that is go give a minimalist set of sample events and then a mockup of the desired output.  If you do this, I believe somebody will be able to help you.  As it is, I have no idea what you are trying to do but I am certain that your existing search is WAY over-complicated.&lt;/P&gt;</description>
      <pubDate>Sat, 21 Nov 2015 19:22:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-fields-across-multiple-sourcetypes/m-p/242428#M72116</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-11-21T19:22:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare fields across multiple sourcetypes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-fields-across-multiple-sourcetypes/m-p/242429#M72117</link>
      <description>&lt;P&gt;Yes your are right, thank you for pointing that out, I have revised it and hopefully it makes more sense now.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Nov 2015 20:18:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-fields-across-multiple-sourcetypes/m-p/242429#M72117</guid>
      <dc:creator>raby1996</dc:creator>
      <dc:date>2015-11-23T20:18:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare fields across multiple sourcetypes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-fields-across-multiple-sourcetypes/m-p/242430#M72118</link>
      <description>&lt;P&gt;I still do not get it at all.  Explain it like this:&lt;BR /&gt;
Search 1:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;blah blah1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Search 2:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;blah blah 2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Results 1:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;boo-hoo 1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Results 2:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;boo-hoo 2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Desired Results:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;foo bar success
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 06 Mar 2016 04:09:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-fields-across-multiple-sourcetypes/m-p/242430#M72118</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-03-06T04:09:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare fields across multiple sourcetypes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-fields-across-multiple-sourcetypes/m-p/242431#M72119</link>
      <description>&lt;P&gt;If I'm understanding this correctly, is this what you are looking for:&lt;/P&gt;

&lt;P&gt;You do a search of problem tickets that have individual ID numbers:  search PBM&lt;/P&gt;

&lt;P&gt;The results are logs for the problem tickets with the various RMTMS values.  The RMTMS values are the serial numbers of the machines associated to the problem tickets.&lt;/P&gt;

&lt;P&gt;You then want to take the serial numbers and search your asset inventory to see what the patch level is and compare the systems to see if they are equivalent?&lt;/P&gt;

&lt;P&gt;So for instance, I've got problem ID PBM 8675309.  The RMTMS values that come back for are serial numbers 00042, 01337, and 01010.  I will then search my asset inventory to see if those three systems are all running NT 4 Patch 6 and IIS 3.12?&lt;/P&gt;

&lt;P&gt;So then my end table would be:&lt;BR /&gt;
00042 - NT 4 P 6 - IIS 3.12&lt;BR /&gt;
01337 - OS/S IIS - IBM 2&lt;BR /&gt;
01010 - NT 4 P 6 - IIS 3.11&lt;/P&gt;

&lt;P&gt;Is that correct?&lt;/P&gt;</description>
      <pubDate>Tue, 08 Mar 2016 15:02:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-fields-across-multiple-sourcetypes/m-p/242431#M72119</guid>
      <dc:creator>AndySplunks</dc:creator>
      <dc:date>2016-03-08T15:02:27Z</dc:date>
    </item>
  </channel>
</rss>

