<?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 join 2 datamodels searches with different timeranges in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-join-2-datamodels-searches-with-different-timeranges/m-p/484692#M193463</link>
    <description>&lt;P&gt;Fist of all, I wouldn't use &lt;CODE&gt;| datamodel&lt;/CODE&gt; because it was recently broken and no longer returns all fields (only the ones in the datamodel).  Instead use the &lt;CODE&gt;macro&lt;/CODE&gt; described here (it will need adjustment because it is hard-coded for CIM):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&lt;A href="https://answers.splunk.com/answers/716936/splunk-server-field-is-not-available-when-we-searc.html#answer-717058" target="test_blank"&gt;https://answers.splunk.com/answers/716936/splunk-server-field-is-not-available-when-we-searc.html#answer-717058&lt;/A&gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then you can use as many time specifier clauses as you can like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;`SIEMMacro_datamodel(dm-evaluation, dm-evaluation)` evaluation search ((earliest=e1 latest=l1) OR (earliest=e2 latest=l2) OR ... OR (earliest=eZ latest=lZ))
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sun, 19 Jan 2020 22:53:01 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2020-01-19T22:53:01Z</dc:date>
    <item>
      <title>How to join 2 datamodels searches with different timeranges</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-join-2-datamodels-searches-with-different-timeranges/m-p/484690#M193461</link>
      <description>&lt;P&gt;Hi everyone, &lt;/P&gt;

&lt;P&gt;I need to join two different searches using different time ranges in the alert search. &lt;BR /&gt;
Normally the earliest parameter would solve it but the following syntax doesn't work&lt;/P&gt;

&lt;P&gt;| datamodel dm-evaluation evaluation search earliest=@d&lt;/P&gt;

&lt;P&gt;Do you know how to solve it?&lt;/P&gt;

&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jan 2020 20:14:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-join-2-datamodels-searches-with-different-timeranges/m-p/484690#M193461</guid>
      <dc:creator>fernandopaixao</dc:creator>
      <dc:date>2020-01-17T20:14:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to join 2 datamodels searches with different timeranges</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-join-2-datamodels-searches-with-different-timeranges/m-p/484691#M193462</link>
      <description>&lt;P&gt;How long are the two search periods?&lt;BR /&gt;
There is the way that&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Time range can be covered two data models,
Search by `summariesonly = t` and `timechart` ,
Create flag (e.g. datamodelA or datamodelB)  ,
Combine the two search results by `append`, 
Select time and data model(flag) by `where`
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;How about this?&lt;/P&gt;</description>
      <pubDate>Sat, 18 Jan 2020 02:45:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-join-2-datamodels-searches-with-different-timeranges/m-p/484691#M193462</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-01-18T02:45:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to join 2 datamodels searches with different timeranges</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-join-2-datamodels-searches-with-different-timeranges/m-p/484692#M193463</link>
      <description>&lt;P&gt;Fist of all, I wouldn't use &lt;CODE&gt;| datamodel&lt;/CODE&gt; because it was recently broken and no longer returns all fields (only the ones in the datamodel).  Instead use the &lt;CODE&gt;macro&lt;/CODE&gt; described here (it will need adjustment because it is hard-coded for CIM):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&lt;A href="https://answers.splunk.com/answers/716936/splunk-server-field-is-not-available-when-we-searc.html#answer-717058" target="test_blank"&gt;https://answers.splunk.com/answers/716936/splunk-server-field-is-not-available-when-we-searc.html#answer-717058&lt;/A&gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then you can use as many time specifier clauses as you can like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;`SIEMMacro_datamodel(dm-evaluation, dm-evaluation)` evaluation search ((earliest=e1 latest=l1) OR (earliest=e2 latest=l2) OR ... OR (earliest=eZ latest=lZ))
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 19 Jan 2020 22:53:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-join-2-datamodels-searches-with-different-timeranges/m-p/484692#M193463</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2020-01-19T22:53:01Z</dc:date>
    </item>
  </channel>
</rss>

