<?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: tstats and child dataset in Splunk Enterprise</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise/tstats-and-child-dataset/m-p/369339#M7843</link>
    <description>&lt;P&gt;Hi DalJeanis and thanks for your help&lt;/P&gt;

&lt;P&gt;(Time range for the tests = 24h / Summary range=3 months / Status in datamodel settings = 100% completed)&lt;/P&gt;

&lt;P&gt;No problem with datamodel (DM1) or root object (DS1)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  | tstats count from datamodel=DM1 
        count
        1245876

  | tstats count from datamodel=DM1 by _time span=1h
        _time           count
        2PM             123
        3PM             345

  | tstats count from datamodel=DM1.DS1 
        count
        6789900

  | tstats count from datamodel=DM1.DS1  by _time span=1h
        _time           count
        2PM             345
        3PM             567
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But impossible for child event (DS11 or DS12)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  | tstats count from datamodel=DM1.DS1.DS11 
        Error in TsidxStats: Invalid or unaccelerate root object for datamodel 

   | tstats count from datamodel=DM1.DS1.DS11  by _time span=1h
        Error in TsidxStats: Invalid or unaccelerate root object for datamodel 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But i can check child content (via datamodel) and  tstats something via nodename (i don't know what represents the stats):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  | datamodel DM1 DS11 search
        125998 events with fields herited (DS1.action, DS1.dest....)

 | tsats count from datamodel=DM1.DS1 where nodename=DS1.DS11
        count
        1345
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;When i try for a time range (2PM - 6PM)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  | tsats count from datamodel=DM1.DS1 where nodename=DS1.DS11 by _time span=1h
        _time           count
        4PM             887
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;=&amp;gt; &lt;STRONG&gt;Nothing for other hour (2PM, 3PM)&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;
=&amp;gt; In the last example: if i change time range for 7days, same result!  (same number of events for 24h than 7days!!!) &lt;BR /&gt;
Strange!&lt;/P&gt;</description>
    <pubDate>Sat, 28 Apr 2018 07:42:54 GMT</pubDate>
    <dc:creator>secuc2r83</dc:creator>
    <dc:date>2018-04-28T07:42:54Z</dc:date>
    <item>
      <title>tstats and child dataset</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/tstats-and-child-dataset/m-p/369337#M7841</link>
      <description>&lt;P&gt;Hello splunk comunity,&lt;/P&gt;

&lt;P&gt;I think i'm missing something between datamodel and child dataset&lt;BR /&gt;
My goal: In my proxy logs, i add 2 tags (risky/clean) for some destination. I need to print percent of risky/clean trafic for each hour&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;My accelerated datamodel DM1 hierarchy (Summary for 3 month):&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;DM1:
     - DS1      (root event:    sourcetype=proxy)
        - DS11  (child:         tag=risky )
        - DS12  (child:     tag=clean eventtype="out_*)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;If i check EVENTS for child "DS12" for 2hours (2PM - 4PM)&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| datamodel DM1 DS12 search
        125000 events 
        field "action"= 8 values
        herited field "DS1.application" = 7 values
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;If i check STATS for child "DS12" for 2hours (2PM - 4PM)&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;
    Events for each hour:       &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| tstats count from datamodel=DM1 where (nodename = DS1.DS12) groupby _time span=1h
            *No results*
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Count by application for each hour:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| tstats count(DS1.application) from datamodel=DM1 where (nodename = DS1.DS12) groupby _time span=1h
            *No results*
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;If i check STATS from .TSIDX (accelerated datamodel) for 2hours (2PM - 4PM):&lt;/STRONG&gt;&lt;BR /&gt;
    Ok for root object DS1:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | tstats summariesonly=true count, values(DS1.application) AS "Appli" from datamodel=DM1 where (nodename=DS1) groupby _time span=1h
                    _time           count       Appli
                    2PM             57000       xxx
                    3PM             4309        yyy
                    4PM             44537       zzz
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But nothing for child object DS12:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| tstats summariesonly=t count, values(DS1.application) AS "Appli" from datamodel=DM1 where (nodename = DS1.DS12) groupby _time span=1h
                            *No results*
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then: I have events on my child DS12&lt;BR /&gt;
I could do stats on root event in my 2 .tsidx (datamodel and Accelerated datamodel) but impossible for child events on same .tsidx&lt;/P&gt;

&lt;P&gt;Thanks in advance.&lt;BR /&gt;
(For info: tag and eventtype are multivalue fields containing more than 1 entry: tag    = test1, risky /  eventtype = out_if1, Compliance)&lt;/P&gt;</description>
      <pubDate>Fri, 27 Apr 2018 17:28:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/tstats-and-child-dataset/m-p/369337#M7841</guid>
      <dc:creator>secuc2r83</dc:creator>
      <dc:date>2018-04-27T17:28:28Z</dc:date>
    </item>
    <item>
      <title>Re: tstats and child dataset</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/tstats-and-child-dataset/m-p/369338#M7842</link>
      <description>&lt;P&gt;Okay, I'd be trying to figure out where you are losing it.  Does each of these return any results?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | tstats count from datamodel=DM1 

 | tstats count from datamodel=DM1 by _time span=1h

 | tstats count from datamodel=DM1.DS1 

 | tstats count from datamodel=DM1.DS1  by _time span=1h

 | tstats count from datamodel=DM1.DS1.DS11 

 | tstats count from datamodel=DM1.DS1.DS11  by _time span=1h
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 27 Apr 2018 22:46:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/tstats-and-child-dataset/m-p/369338#M7842</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2018-04-27T22:46:07Z</dc:date>
    </item>
    <item>
      <title>Re: tstats and child dataset</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/tstats-and-child-dataset/m-p/369339#M7843</link>
      <description>&lt;P&gt;Hi DalJeanis and thanks for your help&lt;/P&gt;

&lt;P&gt;(Time range for the tests = 24h / Summary range=3 months / Status in datamodel settings = 100% completed)&lt;/P&gt;

&lt;P&gt;No problem with datamodel (DM1) or root object (DS1)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  | tstats count from datamodel=DM1 
        count
        1245876

  | tstats count from datamodel=DM1 by _time span=1h
        _time           count
        2PM             123
        3PM             345

  | tstats count from datamodel=DM1.DS1 
        count
        6789900

  | tstats count from datamodel=DM1.DS1  by _time span=1h
        _time           count
        2PM             345
        3PM             567
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But impossible for child event (DS11 or DS12)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  | tstats count from datamodel=DM1.DS1.DS11 
        Error in TsidxStats: Invalid or unaccelerate root object for datamodel 

   | tstats count from datamodel=DM1.DS1.DS11  by _time span=1h
        Error in TsidxStats: Invalid or unaccelerate root object for datamodel 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But i can check child content (via datamodel) and  tstats something via nodename (i don't know what represents the stats):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  | datamodel DM1 DS11 search
        125998 events with fields herited (DS1.action, DS1.dest....)

 | tsats count from datamodel=DM1.DS1 where nodename=DS1.DS11
        count
        1345
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;When i try for a time range (2PM - 6PM)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  | tsats count from datamodel=DM1.DS1 where nodename=DS1.DS11 by _time span=1h
        _time           count
        4PM             887
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;=&amp;gt; &lt;STRONG&gt;Nothing for other hour (2PM, 3PM)&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;
=&amp;gt; In the last example: if i change time range for 7days, same result!  (same number of events for 24h than 7days!!!) &lt;BR /&gt;
Strange!&lt;/P&gt;</description>
      <pubDate>Sat, 28 Apr 2018 07:42:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/tstats-and-child-dataset/m-p/369339#M7843</guid>
      <dc:creator>secuc2r83</dc:creator>
      <dc:date>2018-04-28T07:42:54Z</dc:date>
    </item>
  </channel>
</rss>

