<?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 combine results from several data models to accelerate multiple objects within a single data model? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-results-from-several-data-models-to-accelerate/m-p/193627#M55776</link>
    <description>&lt;P&gt;Try the multisearch command.&lt;/P&gt;</description>
    <pubDate>Mon, 06 Jul 2015 21:40:15 GMT</pubDate>
    <dc:creator>bmacias84</dc:creator>
    <dc:date>2015-07-06T21:40:15Z</dc:date>
    <item>
      <title>How to combine results from several data models to accelerate multiple objects within a single data model?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-results-from-several-data-models-to-accelerate/m-p/193624#M55773</link>
      <description>&lt;P&gt;I'm using Splunk 6.1.4, which is unable to accelerate multiple objects within a single data model.  Because of this, I've created 4 data models and accelerated each.&lt;/P&gt;

&lt;P&gt;I try to combine the results like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| tstats prestats=TRUE append=TRUE summariesonly=TRUE count FROM datamodel=Thing1 by sourcetype Object1.src_ip Object1.src_port Object1.dest_ip Object1.dest_port Object1.sc_filter_result  
| tstats prestats=TRUE append=TRUE summariesonly=TRUE count FROM datamodel=Thing2 by sourcetype Object2.src_ip Object2.src_port Object2.dest_ip Object2.dest_port Object2.signature Object2.act  
| tstats prestats=TRUE append=TRUE summariesonly=TRUE count FROM datamodel=Thing3 by sourcetype Object3.src_ip Object3.src_port Object3.dest_ip Object3.dest_port Object3.action  
| tstats prestats=TRUE append=TRUE summariesonly=TRUE count FROM datamodel=Thing4 by sourcetype Object4.src_ip Object4.dest_ip Object4.signature Object4.src_port Object4.dest_port 

| eval src_ip=coalesce(Object1.src_ip, Object2.src_ip, Object3.src_ip, Object4.src_ip) 
| eval dest_ip=coalesce(Object1.dest_ip, Object2.dest_ip, Object3.dest_ip, Object4.dest_ip) 
| eval src_port=coalesce(Object1.src_port, Object2.src_port, Object3.src_port, Object4.src_port) 
| eval dest_port=coalesce(Object1.dest_port, Object2.dest_port, Object3.dest_port, Object4.dest_port) 
| eval signature=coalesce(Object2.signature, Object4.src_ip) 
| eval action=coalesce(Object1.sc_filter_result, Object2.act, Object3.action, Object4.src_ip)

| table sourcetype signature action src_ip src_port dest_ip dest_port
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;It doesn't work at all, and I think this is because the eval command only applies within the namespace of each datamodel object.  That is, src_ip doesn't get created by the eval statement, only Object(n).src_ip.  How can I combine data from multiple data models (while taking advantage of acceleration)?&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 06:36:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-results-from-several-data-models-to-accelerate/m-p/193624#M55773</guid>
      <dc:creator>PrinceOfEval</dc:creator>
      <dc:date>2020-09-29T06:36:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine results from several data models to accelerate multiple objects within a single data model?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-results-from-several-data-models-to-accelerate/m-p/193625#M55774</link>
      <description>&lt;P&gt;I don't quite understand what you mean by "unable to accelerate multiple objects"...&lt;/P&gt;

&lt;P&gt;What you are doing here looks upside-down from how you should use a DM.&lt;/P&gt;

&lt;P&gt;You need to start with a DM that has a root &lt;EM&gt;event&lt;/EM&gt; that brings in all the data you are looking for. You might have to OR several base searches together:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(index=foo sourcetype=bar) OR (index=baz sourcetype=qux)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Accelerate the DM that includes all your criteria. &lt;/P&gt;</description>
      <pubDate>Mon, 06 Jul 2015 14:34:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-results-from-several-data-models-to-accelerate/m-p/193625#M55774</guid>
      <dc:creator>jacobwilkins</dc:creator>
      <dc:date>2015-07-06T14:34:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine results from several data models to accelerate multiple objects within a single data model?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-results-from-several-data-models-to-accelerate/m-p/193626#M55775</link>
      <description>&lt;P&gt;From &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.1.4/Knowledge/Acceleratedatamodels"&gt;http://docs.splunk.com/Documentation/Splunk/6.1.4/Knowledge/Acceleratedatamodels&lt;/A&gt; under the heading Data model acceleration caveats:  "Data model acceleration only affects the first event object hierarchy in a data model" -- that's the part about being unable to accelerate multiple objects.&lt;/P&gt;

&lt;P&gt;I was hoping to segment the data model by sourcetype for several reasons.  The most important is so I wouldn't have to rebuild the entire huge summary if there was an issue with one of the data sources.  I think I got this from the docs somewhere, which is why I initially tried creating a DM with 4 root events.&lt;/P&gt;

&lt;P&gt;I'll give it a shot with a single root event I suppose, but it seems like it should be pretty straitforward to combine data from multiple DMs in a search.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jul 2015 17:39:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-results-from-several-data-models-to-accelerate/m-p/193626#M55775</guid>
      <dc:creator>PrinceOfEval</dc:creator>
      <dc:date>2015-07-06T17:39:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine results from several data models to accelerate multiple objects within a single data model?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-results-from-several-data-models-to-accelerate/m-p/193627#M55776</link>
      <description>&lt;P&gt;Try the multisearch command.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jul 2015 21:40:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-results-from-several-data-models-to-accelerate/m-p/193627#M55776</guid>
      <dc:creator>bmacias84</dc:creator>
      <dc:date>2015-07-06T21:40:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine results from several data models to accelerate multiple objects within a single data model?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-results-from-several-data-models-to-accelerate/m-p/193628#M55777</link>
      <description>&lt;P&gt;tstats doesn't seem to be a streaming command, which means it won't work in a multisearch subsearch.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jul 2015 16:59:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-results-from-several-data-models-to-accelerate/m-p/193628#M55777</guid>
      <dc:creator>PrinceOfEval</dc:creator>
      <dc:date>2015-07-07T16:59:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine results from several data models to accelerate multiple objects within a single data model?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-results-from-several-data-models-to-accelerate/m-p/193629#M55778</link>
      <description>&lt;P&gt;I'm having the same problem, and I don't think there's an answer that will satisfy our needs (even in 6.3.1).  I think the solution is to build a new data model that combines the constraints of the other data models and then accelerate that.  That's the only thing I've found that works.  Also, remember that only the first tier of the data model is accelerated.  Child constraints aren't accelerated.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Dec 2015 21:08:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-results-from-several-data-models-to-accelerate/m-p/193629#M55778</guid>
      <dc:creator>proletariat99</dc:creator>
      <dc:date>2015-12-03T21:08:34Z</dc:date>
    </item>
  </channel>
</rss>

