<?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 returns no results: inconsistencies when searching datamodels via tstats compared to from and datamodel in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/tstats-returns-no-results-inconsistencies-when-searching/m-p/435061#M124080</link>
    <description>&lt;P&gt;The dot notation you're using doesn't seem quite right.&lt;/P&gt;

&lt;P&gt;Specify the DM without it, and verify acceleration is working by limiting your search to only the indexed data:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| tstats summariesonly=t count from datamodel=Web
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If your datamodel is tied to an app, be sure you are searching within that context, and your user has adequate permissions to both.&lt;/P&gt;</description>
    <pubDate>Tue, 30 Apr 2019 17:46:06 GMT</pubDate>
    <dc:creator>codebuilder</dc:creator>
    <dc:date>2019-04-30T17:46:06Z</dc:date>
    <item>
      <title>tstats returns no results: inconsistencies when searching datamodels via tstats compared to from and datamodel</title>
      <link>https://community.splunk.com/t5/Splunk-Search/tstats-returns-no-results-inconsistencies-when-searching/m-p/435060#M124079</link>
      <description>&lt;P&gt;While working on writing a new correlation search, I wasn't getting any results from &lt;CODE&gt;tstats&lt;/CODE&gt;; since I was pretty sure the data should be there, I switch to use the &lt;CODE&gt;from&lt;/CODE&gt; command and got results.  This was not the expected behavior, so I'd greatly appreciate help in figuring out why &lt;CODE&gt;tstats&lt;/CODE&gt; isn't working.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| tstats count from datamodel=Web.Web by user
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| tstats count from datamodel=Web.Web by action
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;both return "No results found" with no indicators by the job drop down to indicate any errors.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| tstats count from datamodel=Web.Web
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;returns a count in the hundreds of thousands&lt;/P&gt;

&lt;P&gt;For comparison:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| from datamodel: "Web"."Web" | stats count by action
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;returns three rows (action, blocked, and unknown) each with significant counts that sum to the hundreds of thousands (just eyeballing, it matches the number from &lt;CODE&gt;|tstats count from datamodel=Web.Web&lt;/CODE&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| from datamodel: "Web"."Web" | stats count by user
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;returns thousands of rows.  Summing the counts is in the hundreds of thousands and is approximately (eyeballed) equal to the &lt;CODE&gt;stats count by action&lt;/CODE&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| from datamodel: "Web"."Web" | stats count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;returns a count in the hundreds of thousands that is slightly higher than the previous sums but in the same ball park&lt;/P&gt;

&lt;P&gt;When considering nulls, the results appear consistent when they return results. &lt;/P&gt;

&lt;P&gt;Other notes:&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;I purposely selected the last 15 minutes as if I went back in time, the field extractions may not have existed at the time of the accelerations; adding them afterwards could lead to different results, so I want to minimize that possibility&lt;/LI&gt;
&lt;LI&gt;If I search from the previous day and/or previous week, I see similar situations where I get no results with the by clause&lt;/LI&gt;
&lt;LI&gt;If I go to Settings -&amp;gt; Data models the Web data model is accelerated and is listed at 100.00% completed -- I think this is confirmed by the tstats count without a by clause&lt;/LI&gt;
&lt;LI&gt;If I use the &lt;CODE&gt;datamodel&lt;/CODE&gt; command the results match the queries from the &lt;CODE&gt;from&lt;/CODE&gt; command as I would expect.&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Tue, 30 Apr 2019 14:05:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/tstats-returns-no-results-inconsistencies-when-searching/m-p/435060#M124079</guid>
      <dc:creator>triest</dc:creator>
      <dc:date>2019-04-30T14:05:41Z</dc:date>
    </item>
    <item>
      <title>Re: tstats returns no results: inconsistencies when searching datamodels via tstats compared to from and datamodel</title>
      <link>https://community.splunk.com/t5/Splunk-Search/tstats-returns-no-results-inconsistencies-when-searching/m-p/435061#M124080</link>
      <description>&lt;P&gt;The dot notation you're using doesn't seem quite right.&lt;/P&gt;

&lt;P&gt;Specify the DM without it, and verify acceleration is working by limiting your search to only the indexed data:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| tstats summariesonly=t count from datamodel=Web
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If your datamodel is tied to an app, be sure you are searching within that context, and your user has adequate permissions to both.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Apr 2019 17:46:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/tstats-returns-no-results-inconsistencies-when-searching/m-p/435061#M124080</guid>
      <dc:creator>codebuilder</dc:creator>
      <dc:date>2019-04-30T17:46:06Z</dc:date>
    </item>
    <item>
      <title>Re: tstats returns no results: inconsistencies when searching datamodels via tstats compared to from and datamodel</title>
      <link>https://community.splunk.com/t5/Splunk-Search/tstats-returns-no-results-inconsistencies-when-searching/m-p/435062#M124081</link>
      <description>&lt;P&gt;The problem was I didn't specify the data model in the by clause.&lt;/P&gt;

&lt;P&gt;What I mean is instead of:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| tstats count from datamodel=Web.Web by user
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;It should have been:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| tstats count from datamodel=Web.Web by Web.user
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Again the key is adding the Web. before the fields.&lt;/P&gt;

&lt;P&gt;I knew it had to be something obvious; I had ran it by a co-worker hoping to "rubber duck" it and things didn't click.  After coming back from lunch, I suddenly had my aha moment&lt;/P&gt;

&lt;P&gt;Sorry for asking such an obvious question -- I know better and just before starting this correlation search I wrote with using tstats and correctly included the model in the by clause so I can't even claim it was a little bit of dust.  Oh well, hopefully it helps some one in the future&lt;/P&gt;</description>
      <pubDate>Tue, 30 Apr 2019 17:59:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/tstats-returns-no-results-inconsistencies-when-searching/m-p/435062#M124081</guid>
      <dc:creator>triest</dc:creator>
      <dc:date>2019-04-30T17:59:38Z</dc:date>
    </item>
  </channel>
</rss>

