<?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: &amp;quot;This search uses deprecated 'stats' command syntax.&amp;quot; in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/quot-This-search-uses-deprecated-stats-command-syntax-quot/m-p/513788#M144199</link>
    <description>&lt;P&gt;Typo on my part (grabbed the wrong SPL from the docs). Corrected. The solution you're proposing is the one with the problem and the one I have questions about.&lt;/P&gt;</description>
    <pubDate>Wed, 12 Aug 2020 20:11:57 GMT</pubDate>
    <dc:creator>mitag</dc:creator>
    <dc:date>2020-08-12T20:11:57Z</dc:date>
    <item>
      <title>"This search uses deprecated 'stats' command syntax."</title>
      <link>https://community.splunk.com/t5/Splunk-Search/quot-This-search-uses-deprecated-stats-command-syntax-quot/m-p/513596#M144112</link>
      <description>&lt;P&gt;Getting this informational message when running "&lt;FONT face="andale mono,times"&gt;stats count&lt;/FONT&gt;" commands:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;This search uses deprecated 'stats' command syntax. This syntax implicitly translates '&amp;lt;function&amp;gt;' or '&amp;lt;function&amp;gt;()' to '&amp;lt;function&amp;gt;(*)', except for cases where the function is 'count'. Use '&amp;lt;function&amp;gt;(*)' instead.&lt;/LI-CODE&gt;&lt;P&gt;I don't understand it. What am I doing wrong and what should I be doing instead? A sample of the &lt;FONT face="andale mono,times"&gt;stats&lt;/FONT&gt; command generating the message above:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| stats sparkline count(Destination) AS sessions by Destination_URL, Destination_userID&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Splunk info msg - Screen Shot 2020-08-11 at 8.48.55 AM.png" style="width: 333px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/10200iC3457D61A9278ABB/image-size/large?v=v2&amp;amp;px=999" role="button" title="Splunk info msg - Screen Shot 2020-08-11 at 8.48.55 AM.png" alt="Splunk info msg - Screen Shot 2020-08-11 at 8.48.55 AM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 11 Aug 2020 15:55:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/quot-This-search-uses-deprecated-stats-command-syntax-quot/m-p/513596#M144112</guid>
      <dc:creator>mitag</dc:creator>
      <dc:date>2020-08-11T15:55:12Z</dc:date>
    </item>
    <item>
      <title>Re: "This search uses deprecated 'stats' command syntax."</title>
      <link>https://community.splunk.com/t5/Splunk-Search/quot-This-search-uses-deprecated-stats-command-syntax-quot/m-p/513604#M144118</link>
      <description>&lt;P&gt;The sparkline argument should be a function, perhaps&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| stats sparkline(count(Destination)) AS sessions by Destination_URL, Destination_userID&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 11 Aug 2020 16:34:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/quot-This-search-uses-deprecated-stats-command-syntax-quot/m-p/513604#M144118</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-08-11T16:34:59Z</dc:date>
    </item>
    <item>
      <title>Re: "This search uses deprecated 'stats' command syntax."</title>
      <link>https://community.splunk.com/t5/Splunk-Search/quot-This-search-uses-deprecated-stats-command-syntax-quot/m-p/513640#M144136</link>
      <description>&lt;P&gt;That removes the session count field though. This one:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="session count - Screen Shot 2020-08-11 at 3.53.43 PM.png" style="width: 516px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/10204i7AFE9B58F77D0483/image-size/large?v=v2&amp;amp;px=999" role="button" title="session count - Screen Shot 2020-08-11 at 3.53.43 PM.png" alt="session count - Screen Shot 2020-08-11 at 3.53.43 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Aug 2020 22:54:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/quot-This-search-uses-deprecated-stats-command-syntax-quot/m-p/513640#M144136</guid>
      <dc:creator>mitag</dc:creator>
      <dc:date>2020-08-11T22:54:54Z</dc:date>
    </item>
    <item>
      <title>Re: "This search uses deprecated 'stats' command syntax."</title>
      <link>https://community.splunk.com/t5/Splunk-Search/quot-This-search-uses-deprecated-stats-command-syntax-quot/m-p/513648#M144140</link>
      <description>&lt;P&gt;So add it back in.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| stats sparkline(count(Destination)), count(Destination)) AS sessions by Destination_URL, Destination_userID&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 12 Aug 2020 00:12:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/quot-This-search-uses-deprecated-stats-command-syntax-quot/m-p/513648#M144140</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-08-12T00:12:34Z</dc:date>
    </item>
    <item>
      <title>Re: "This search uses deprecated 'stats' command syntax."</title>
      <link>https://community.splunk.com/t5/Splunk-Search/quot-This-search-uses-deprecated-stats-command-syntax-quot/m-p/513650#M144141</link>
      <description>&lt;P&gt;I did. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; But doesn't that means "stats" is then run twice for the same dataset, thus unnecessarily increasing the "cost" of the search? (And somewhat clogging it, making it just a teeny bit less readable?)&lt;/P&gt;</description>
      <pubDate>Wed, 12 Aug 2020 00:15:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/quot-This-search-uses-deprecated-stats-command-syntax-quot/m-p/513650#M144141</guid>
      <dc:creator>mitag</dc:creator>
      <dc:date>2020-08-12T00:15:01Z</dc:date>
    </item>
    <item>
      <title>Re: "This search uses deprecated 'stats' command syntax."</title>
      <link>https://community.splunk.com/t5/Splunk-Search/quot-This-search-uses-deprecated-stats-command-syntax-quot/m-p/513702#M144159</link>
      <description>Yes, but that's the only way to get what you want.</description>
      <pubDate>Wed, 12 Aug 2020 11:54:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/quot-This-search-uses-deprecated-stats-command-syntax-quot/m-p/513702#M144159</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-08-12T11:54:20Z</dc:date>
    </item>
    <item>
      <title>Re: "This search uses deprecated 'stats' command syntax."</title>
      <link>https://community.splunk.com/t5/Splunk-Search/quot-This-search-uses-deprecated-stats-command-syntax-quot/m-p/513756#M144181</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;&amp;nbsp;just in case you have the bandwidth for a follow up question...&lt;/P&gt;&lt;P&gt;Here is the sample search in "&lt;A href="https://docs.splunk.com/Documentation/Splunk/8.0.5/Search/Addsparklinestosearchresults" target="_blank" rel="noopener"&gt;Add sparklines to search results&lt;/A&gt;" Splunk KB article for 8.0.5 (latest) release:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=_internal | chart sparkline count by sourcetype&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It produces the same dreaded "deprecated syntax" notification in my 8.04.1 instance.&lt;/P&gt;&lt;P&gt;Questions:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;How would you modify this search to remove the notification yet retain both the sparkline and the "count" field?&lt;/LI&gt;&lt;LI&gt;Would it make sense to try asking a new question, something like "what are Splunk recommendations on using non-deprecated 'stats' command syntax that is as performant as the deprecated one?"&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Wed, 12 Aug 2020 20:10:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/quot-This-search-uses-deprecated-stats-command-syntax-quot/m-p/513756#M144181</guid>
      <dc:creator>mitag</dc:creator>
      <dc:date>2020-08-12T20:10:56Z</dc:date>
    </item>
    <item>
      <title>Re: "This search uses deprecated 'stats' command syntax."</title>
      <link>https://community.splunk.com/t5/Splunk-Search/quot-This-search-uses-deprecated-stats-command-syntax-quot/m-p/513784#M144197</link>
      <description>&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;index=_internal | chart sparkline count by sourcetype&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/8.0.5/Search/Addsparklinestosearchresults" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/8.0.5/Search/Addsparklinestosearchresults&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Aug 2020 19:54:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/quot-This-search-uses-deprecated-stats-command-syntax-quot/m-p/513784#M144197</guid>
      <dc:creator>thambisetty</dc:creator>
      <dc:date>2020-08-12T19:54:29Z</dc:date>
    </item>
    <item>
      <title>Re: "This search uses deprecated 'stats' command syntax."</title>
      <link>https://community.splunk.com/t5/Splunk-Search/quot-This-search-uses-deprecated-stats-command-syntax-quot/m-p/513788#M144199</link>
      <description>&lt;P&gt;Typo on my part (grabbed the wrong SPL from the docs). Corrected. The solution you're proposing is the one with the problem and the one I have questions about.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Aug 2020 20:11:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/quot-This-search-uses-deprecated-stats-command-syntax-quot/m-p/513788#M144199</guid>
      <dc:creator>mitag</dc:creator>
      <dc:date>2020-08-12T20:11:57Z</dc:date>
    </item>
    <item>
      <title>Re: "This search uses deprecated 'stats' command syntax."</title>
      <link>https://community.splunk.com/t5/Splunk-Search/quot-This-search-uses-deprecated-stats-command-syntax-quot/m-p/513907#M144233</link>
      <description>That command works without error on my 8.0.4 instance.&lt;BR /&gt;How do you know which syntax is more performant? Does the Job Inspector show a noticeable difference?</description>
      <pubDate>Thu, 13 Aug 2020 13:13:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/quot-This-search-uses-deprecated-stats-command-syntax-quot/m-p/513907#M144233</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-08-13T13:13:49Z</dc:date>
    </item>
    <item>
      <title>Re: "This search uses deprecated 'stats' command syntax."</title>
      <link>https://community.splunk.com/t5/Splunk-Search/quot-This-search-uses-deprecated-stats-command-syntax-quot/m-p/513933#M144242</link>
      <description>&lt;P class="lia-indent-padding-left-30px"&gt;&amp;gt;&amp;nbsp;&lt;SPAN&gt;That command works without error on my 8.0.4 instance.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This gives me the green "deprecated syntax" informational message in 8.04.1, 8.05:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=_internal 
| chart sparkline count by sourcetype&lt;/LI-CODE&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&amp;gt;&amp;nbsp;&lt;SPAN&gt;How do you know which syntax is more performant? Does the Job Inspector show a noticeable difference?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;About 10-20% faster for the "deprecated" one vs. the one you came up with, with two "count" functions.&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| stats sparkline(count(Destination)), count(Destination))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Aug 2020 15:12:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/quot-This-search-uses-deprecated-stats-command-syntax-quot/m-p/513933#M144242</guid>
      <dc:creator>mitag</dc:creator>
      <dc:date>2020-08-13T15:12:18Z</dc:date>
    </item>
    <item>
      <title>Re: "This search uses deprecated 'stats' command syntax."</title>
      <link>https://community.splunk.com/t5/Splunk-Search/quot-This-search-uses-deprecated-stats-command-syntax-quot/m-p/513961#M144250</link>
      <description>As they say, you can't have your cake and eat it, too. Either use the deprecated syntax (which could be supported indefinitely for all we know) or use the new syntax and suffer the (minimal) performance implications.&lt;BR /&gt;Oh, and submit feedback on the docs page that uses that syntax so they can correct it.</description>
      <pubDate>Thu, 13 Aug 2020 18:04:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/quot-This-search-uses-deprecated-stats-command-syntax-quot/m-p/513961#M144250</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-08-13T18:04:21Z</dc:date>
    </item>
    <item>
      <title>Re: "This search uses deprecated 'stats' command syntax."</title>
      <link>https://community.splunk.com/t5/Splunk-Search/quot-This-search-uses-deprecated-stats-command-syntax-quot/m-p/514808#M144512</link>
      <description>&lt;P&gt;Turns out it's a bug - the "deprecated syntax" notification is not supposed to happen - thanks&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/95"&gt;@mattness&lt;/a&gt;&amp;nbsp;for the &lt;A href="https://community.splunk.com/t5/Splunk-Search/deprecated-stats-command-syntax-notification-on-a-sample-Splunk/m-p/514793/highlight/true#M144502" target="_self"&gt;post&lt;/A&gt;!&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;"Turns out this particular example is a bug. Splunk 8.0.0 through 8.0.6 generates this "info message" when you use sparkline without an argument (such as sparkline(count) or sparkline(count(cpu)). This isn't supposed to happen. The bug is fixed in upcoming versions of Splunk."&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Aug 2020 00:12:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/quot-This-search-uses-deprecated-stats-command-syntax-quot/m-p/514808#M144512</guid>
      <dc:creator>mitag</dc:creator>
      <dc:date>2020-08-19T00:12:02Z</dc:date>
    </item>
  </channel>
</rss>

