<?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: Datamodel search with Datamodel Subsearch Circular Dependancy Error in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Datamodel-search-with-Datamodel-Subsearch-Circular-Dependancy/m-p/329025#M97925</link>
    <description>&lt;P&gt;This doesn't answer original question and doesn't help any future Splunk users (like me) who have this same problem.&lt;/P&gt;</description>
    <pubDate>Sun, 30 Sep 2018 17:57:43 GMT</pubDate>
    <dc:creator>frechette</dc:creator>
    <dc:date>2018-09-30T17:57:43Z</dc:date>
    <item>
      <title>Datamodel search with Datamodel Subsearch Circular Dependancy Error</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Datamodel-search-with-Datamodel-Subsearch-Circular-Dependancy/m-p/329018#M97918</link>
      <description>&lt;P&gt;How do I fix this search to avoid- 'Error in 'SearchParser': Found circular dependency when expanding datamodel=Intrusion_Detection.Network_IDS_Attacks'&lt;/P&gt;

&lt;P&gt;|datamodel Intrusion_Detection Network_IDS_Attacks search | search index=alienvault earliest=-0d@d latest=now |eval ReportKey="today" |append [|datamodel Intrusion_Detection Network_IDS_Attacks search |search index=alienvault earliest=-1d@d latest=-0d@d |eval ReportKey="yesterday" |eval _time=_time+86400] |timechart count by ReportKey&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 13:03:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Datamodel-search-with-Datamodel-Subsearch-Circular-Dependancy/m-p/329018#M97918</guid>
      <dc:creator>jgbricker</dc:creator>
      <dc:date>2020-09-29T13:03:08Z</dc:date>
    </item>
    <item>
      <title>Re: Datamodel search with Datamodel Subsearch Circular Dependancy Error</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Datamodel-search-with-Datamodel-Subsearch-Circular-Dependancy/m-p/329019#M97919</link>
      <description>&lt;P&gt;looks like i just need to convert to using tstats as per the subsearch documentation -&lt;/P&gt;

&lt;P&gt;'The first command in a subsearch must be a generating command such as search, eventcount, or tstats. For a list of generating commands, see Command types in the Search Reference'&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.5.2/Search/Aboutsubsearches"&gt;http://docs.splunk.com/Documentation/Splunk/6.5.2/Search/Aboutsubsearches&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2017 19:48:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Datamodel-search-with-Datamodel-Subsearch-Circular-Dependancy/m-p/329019#M97919</guid>
      <dc:creator>jgbricker</dc:creator>
      <dc:date>2017-03-01T19:48:22Z</dc:date>
    </item>
    <item>
      <title>Re: Datamodel search with Datamodel Subsearch Circular Dependancy Error</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Datamodel-search-with-Datamodel-Subsearch-Circular-Dependancy/m-p/329020#M97920</link>
      <description>&lt;P&gt;Seems to be kinda difficult to use tstats in this scenario, i think it has to do with aggregating counts before i'm ready to count by timeframe at the end of the search. &lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2017 20:34:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Datamodel-search-with-Datamodel-Subsearch-Circular-Dependancy/m-p/329020#M97920</guid>
      <dc:creator>jgbricker</dc:creator>
      <dc:date>2017-03-01T20:34:10Z</dc:date>
    </item>
    <item>
      <title>Re: Datamodel search with Datamodel Subsearch Circular Dependancy Error</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Datamodel-search-with-Datamodel-Subsearch-Circular-Dependancy/m-p/329021#M97921</link>
      <description>&lt;P&gt;This seems to work - will need to further validate ..&lt;/P&gt;

&lt;P&gt;|tstats count FROM datamodel=Intrusion_Detection WHERE index=alienvault earliest=-1d@d latest=-0d@d by _time |eval Report="yesterday" |append [|tstats count FROM datamodel=Intrusion_Detection WHERE index=alienvault earliest=-0d@d latest=now by _time |eval Report="today"] |addinfo |eval _time=if(_time &amp;lt; info_min_time + 24*3600, _time + 24*3600, _time) |xyseries _time Report count&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 13:03:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Datamodel-search-with-Datamodel-Subsearch-Circular-Dependancy/m-p/329021#M97921</guid>
      <dc:creator>jgbricker</dc:creator>
      <dc:date>2020-09-29T13:03:18Z</dc:date>
    </item>
    <item>
      <title>Re: Datamodel search with Datamodel Subsearch Circular Dependancy Error</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Datamodel-search-with-Datamodel-Subsearch-Circular-Dependancy/m-p/329022#M97922</link>
      <description>&lt;P&gt;The numbers don't match the raw search even with the exact same time aggregation buckets. &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2017 21:10:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Datamodel-search-with-Datamodel-Subsearch-Circular-Dependancy/m-p/329022#M97922</guid>
      <dc:creator>jgbricker</dc:creator>
      <dc:date>2017-03-01T21:10:09Z</dc:date>
    </item>
    <item>
      <title>Re: Datamodel search with Datamodel Subsearch Circular Dependancy Error</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Datamodel-search-with-Datamodel-Subsearch-Circular-Dependancy/m-p/329023#M97923</link>
      <description>&lt;P&gt;How about this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|tstats count FROM datamodel=Intrusion_Detection WHERE index=alienvault earliest=-1d@d latest=-0d@d by _time span=10m |eval Report="yesterday" | eval _time=_time + 86400 |append [|tstats count FROM datamodel=Intrusion_Detection WHERE index=alienvault earliest=-0d@d latest=now by _time span=10m |eval Report="today"] | timechart sum(count) by Report
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Equivalent regular search&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your base search earliest=-1d@d latest=now | eval Report=if(_time&amp;gt;=relative_time(now(),"@d"),"today","yesterday")  | eval _time=if(_time&amp;lt;relative_time(now(),"@d"),_time+86400,_time) 
| timechart count by Report
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 01 Mar 2017 22:37:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Datamodel-search-with-Datamodel-Subsearch-Circular-Dependancy/m-p/329023#M97923</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-03-01T22:37:52Z</dc:date>
    </item>
    <item>
      <title>Re: Datamodel search with Datamodel Subsearch Circular Dependancy Error</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Datamodel-search-with-Datamodel-Subsearch-Circular-Dependancy/m-p/329024#M97924</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;the timewrap  ( &lt;A href="http://docs.splunk.com/Documentation/Splunk/7.0.1/SearchReference/Timewrap"&gt;http://docs.splunk.com/Documentation/Splunk/7.0.1/SearchReference/Timewrap&lt;/A&gt; ) command is now part of Splunk Enterprise, it looks like this is what you are trying to achieve, maybe that command would help and make things easier?&lt;/P&gt;

&lt;P&gt;Thanks&lt;BR /&gt;
Darren&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2018 13:00:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Datamodel-search-with-Datamodel-Subsearch-Circular-Dependancy/m-p/329024#M97924</guid>
      <dc:creator>ddance_splunk</dc:creator>
      <dc:date>2018-01-03T13:00:57Z</dc:date>
    </item>
    <item>
      <title>Re: Datamodel search with Datamodel Subsearch Circular Dependancy Error</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Datamodel-search-with-Datamodel-Subsearch-Circular-Dependancy/m-p/329025#M97925</link>
      <description>&lt;P&gt;This doesn't answer original question and doesn't help any future Splunk users (like me) who have this same problem.&lt;/P&gt;</description>
      <pubDate>Sun, 30 Sep 2018 17:57:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Datamodel-search-with-Datamodel-Subsearch-Circular-Dependancy/m-p/329025#M97925</guid>
      <dc:creator>frechette</dc:creator>
      <dc:date>2018-09-30T17:57:43Z</dc:date>
    </item>
  </channel>
</rss>

