<?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 Is returning sourcetypes that do not exist in Splunk Enterprise</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise/Why-is-tstats-returning-sourcetypes-that-do-not-exist/m-p/605000#M13239</link>
    <description>&lt;P&gt;&lt;STRONG&gt;Glad&lt;/STRONG&gt; you caught it!!!&lt;/P&gt;&lt;P&gt;Keep an eye out because many Add-ons use this, unfortunately (this makes it inconsistent between tstats and normal search).&lt;/P&gt;</description>
    <pubDate>Fri, 08 Jul 2022 19:14:43 GMT</pubDate>
    <dc:creator>VatsalJagani</dc:creator>
    <dc:date>2022-07-08T19:14:43Z</dc:date>
    <item>
      <title>Why is tstats returning sourcetypes that do not exist?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Why-is-tstats-returning-sourcetypes-that-do-not-exist/m-p/604614#M13176</link>
      <description>&lt;P&gt;I recently discovered that "tstats" is returning sourcetypes which do not exist.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Query:&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;| tstats values(sourcetype) where index=* by index&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;This returns a list of sourcetypes grouped by index. While it appears to be mostly accurate, some sourcetypes which are returned for a given index do not exist. For example, the sourcetype "&lt;SPAN&gt;WinEventLog:System" is returned for&amp;nbsp;&lt;EM&gt;myindex&lt;/EM&gt;, but the following query produces zero results:&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN&gt;index=myindex sourcetype="WinEventLog:System"&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;This is the case for multiple indexes.&lt;/P&gt;
&lt;P&gt;If my understanding of "tstats" is correct, it works by only analyzing indexed fields which are stored in the tsidx files. If no events exist with a given sourcetype for a specific index, how could that value have possibly been saved in the tsidx files?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jul 2022 14:30:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Why-is-tstats-returning-sourcetypes-that-do-not-exist/m-p/604614#M13176</guid>
      <dc:creator>HeavyHats</dc:creator>
      <dc:date>2022-07-07T14:30:34Z</dc:date>
    </item>
    <item>
      <title>Re: tstats Is returning sourcetypes that do not exist</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Why-is-tstats-returning-sourcetypes-that-do-not-exist/m-p/604675#M13181</link>
      <description>&lt;P&gt;Can you confirm if&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| tstats values(sourcetype) where index=myindex&lt;/LI-CODE&gt;&lt;P&gt;and&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=myindex 
| stats count by sourcetype&lt;/LI-CODE&gt;&lt;P&gt;produce identical looking sourcetypes for the same time range.&lt;/P&gt;&lt;P&gt;If they are giving different sourcetypes for that one 'myindex' example you gave that's odd. Could it be that the sourcetype&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;sourcetype="WinEventLog:System"&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;has some leading trailing characters, e.g. space?&lt;/P&gt;&lt;P&gt;If you do the search with wildcards&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=myindex sourcetype="*WinEventLog:System*"&lt;/LI-CODE&gt;&lt;P&gt;does that also give no results?&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jul 2022 23:13:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Why-is-tstats-returning-sourcetypes-that-do-not-exist/m-p/604675#M13181</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2022-07-06T23:13:57Z</dc:date>
    </item>
    <item>
      <title>Re: tstats Is returning sourcetypes that do not exist</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Why-is-tstats-returning-sourcetypes-that-do-not-exist/m-p/604676#M13182</link>
      <description>&lt;P&gt;I can confirm that the first two queries do&amp;nbsp;&lt;EM&gt;not&lt;/EM&gt; produce identical lists. There is about 90% overlap, but each list contains entries which are absent from the other list.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can also confirm that there is no leading/trailing whitespace. The last query produces no results.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jul 2022 23:32:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Why-is-tstats-returning-sourcetypes-that-do-not-exist/m-p/604676#M13182</guid>
      <dc:creator>HeavyHats</dc:creator>
      <dc:date>2022-07-06T23:32:16Z</dc:date>
    </item>
    <item>
      <title>Re: tstats Is returning sourcetypes that do not exist</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Why-is-tstats-returning-sourcetypes-that-do-not-exist/m-p/604678#M13183</link>
      <description>&lt;P&gt;Other than a permissions/security issue that is constraining what you can see in one variant as opposed to the other, I don't have any other suggestions &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jul 2022 23:35:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Why-is-tstats-returning-sourcetypes-that-do-not-exist/m-p/604678#M13183</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2022-07-06T23:35:44Z</dc:date>
    </item>
    <item>
      <title>Re: tstats Is returning sourcetypes that do not exist</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Why-is-tstats-returning-sourcetypes-that-do-not-exist/m-p/604700#M13185</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/245188"&gt;@HeavyHats&lt;/a&gt;&amp;nbsp;- The very possible reason is the "&lt;STRONG&gt;rename&lt;/STRONG&gt;" of props.conf&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;index=myindex | stats count by sourcetype&lt;UL&gt;&lt;LI&gt;is looking at the sourcetype name after the &lt;STRONG&gt;rename&lt;/STRONG&gt; attribute.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;UL&gt;&lt;LI&gt;| tstats values(sourcetype) where index=myindex&lt;UL&gt;&lt;LI&gt;is looking at the sourcetype name that does not include the &lt;STRONG&gt;rename&lt;/STRONG&gt; attribute.&lt;/LI&gt;&lt;LI&gt;Why? -&amp;gt; Because rename is a search-time attribute. And tstats just look at the summaries.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I know many Windows-related data has the &lt;STRONG&gt;rename&lt;/STRONG&gt; attribute, for example, Sysmon data, Windows firewall logs from EventLogs. But this will be the issue anywhere where rename attribute it being used.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(Previously someone asked similar question -&amp;nbsp;&lt;A href="https://community.splunk.com/t5/Splunk-Search/Why-does-tstats-returns-events-by-sourcetype-but-search-doesn-t/m-p/593045" target="_blank"&gt;https://community.splunk.com/t5/Splunk-Search/Why-does-tstats-returns-events-by-sourcetype-but-search-doesn-t/m-p/593045&lt;/A&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this helps!!!&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jul 2022 05:46:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Why-is-tstats-returning-sourcetypes-that-do-not-exist/m-p/604700#M13185</guid>
      <dc:creator>VatsalJagani</dc:creator>
      <dc:date>2022-07-07T05:46:26Z</dc:date>
    </item>
    <item>
      <title>Re: tstats Is returning sourcetypes that do not exist</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Why-is-tstats-returning-sourcetypes-that-do-not-exist/m-p/604717#M13189</link>
      <description>&lt;P&gt;Are you sure noone fiddled with the TA_windows? Typically you'd see "XmlWinEventLog:System" as source, not sourcetype.&lt;/P&gt;&lt;P&gt;See my home Splunk instance:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PickleRick_0-1657183391506.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/20430iD41C7AC10F858ACF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PickleRick_0-1657183391506.png" alt="PickleRick_0-1657183391506.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jul 2022 08:43:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Why-is-tstats-returning-sourcetypes-that-do-not-exist/m-p/604717#M13189</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2022-07-07T08:43:25Z</dc:date>
    </item>
    <item>
      <title>Re: tstats Is returning sourcetypes that do not exist</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Why-is-tstats-returning-sourcetypes-that-do-not-exist/m-p/604733#M13192</link>
      <description>&lt;P&gt;Yeah if sourcetype is "WinEventLog:System" then you are using a very old version of the Add-on &amp;lt; 5.0.0&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jul 2022 11:11:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Why-is-tstats-returning-sourcetypes-that-do-not-exist/m-p/604733#M13192</guid>
      <dc:creator>VatsalJagani</dc:creator>
      <dc:date>2022-07-07T11:11:12Z</dc:date>
    </item>
    <item>
      <title>Re: tstats Is returning sourcetypes that do not exist</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Why-is-tstats-returning-sourcetypes-that-do-not-exist/m-p/604796#M13207</link>
      <description>&lt;P&gt;Yes, that is part of the confusion here. "tstats" shows that "(Xml)WinEventLog:System" exists as a &lt;EM&gt;sourcetype&lt;/EM&gt;, when it actually only exists as a &lt;EM&gt;source&lt;/EM&gt;.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jul 2022 15:54:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Why-is-tstats-returning-sourcetypes-that-do-not-exist/m-p/604796#M13207</guid>
      <dc:creator>HeavyHats</dc:creator>
      <dc:date>2022-07-07T15:54:55Z</dc:date>
    </item>
    <item>
      <title>Re: tstats Is returning sourcetypes that do not exist</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Why-is-tstats-returning-sourcetypes-that-do-not-exist/m-p/604827#M13211</link>
      <description>&lt;P&gt;The only reason I could see of tstats and search showing different results is the &lt;STRONG&gt;rename&lt;/STRONG&gt; attribute I mentioned in my answer.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jul 2022 17:38:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Why-is-tstats-returning-sourcetypes-that-do-not-exist/m-p/604827#M13211</guid>
      <dc:creator>VatsalJagani</dc:creator>
      <dc:date>2022-07-07T17:38:08Z</dc:date>
    </item>
    <item>
      <title>Re: tstats Is returning sourcetypes that do not exist</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Why-is-tstats-returning-sourcetypes-that-do-not-exist/m-p/604841#M13215</link>
      <description>&lt;P&gt;I believe this is because&amp;nbsp;the tstats command performs statistical queries on indexed fields in tsidx files.&lt;/P&gt;&lt;P&gt;Some time ago the Windows TA was changed in version 5.0.1 of the Windows TA.&lt;BR /&gt;&lt;BR /&gt;See:&amp;nbsp;&lt;A title="Sourcetype changes for WinEventLog data" href="https://docs.splunk.com/Documentation/WindowsAddOn/5.0.1/User/Upgrade?_gl=1*e1wraw*_ga*MTcwMDU4NDgzNC4xNjQ4MTI3NDc1*_gid*NTc0NzkwMjgyLjE2NTcxODAyMjE.&amp;amp;_ga=2.148097779.574790282.1657180221-1700584834.1648127475#Sourcetype_changes_for_WinEventLog_data" target="_self"&gt;Sourcetype changes for WinEventLog data&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;This means all old sourcetypes that used to exist (and where indexed!) where named for example&amp;nbsp;&lt;SPAN&gt;WinEventLog:System or&amp;nbsp;WinEventLog:Application or&amp;nbsp;WinEventLog:Security. They all have been renamed to&amp;nbsp;WinEventLog by the newer version of Windows TA.&lt;BR /&gt;&lt;BR /&gt;But since they where indexed in the past they still exists in the metadata. And since tstats only looks at the indexed metadata you see these old sourcetypes appear.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jul 2022 18:51:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Why-is-tstats-returning-sourcetypes-that-do-not-exist/m-p/604841#M13215</guid>
      <dc:creator>Azeemering</dc:creator>
      <dc:date>2022-07-07T18:51:29Z</dc:date>
    </item>
    <item>
      <title>Re: tstats Is returning sourcetypes that do not exist</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Why-is-tstats-returning-sourcetypes-that-do-not-exist/m-p/604843#M13216</link>
      <description>&lt;P&gt;It doesn't work that way. A value of an indexed field is just a value. If you extract different value of _time for each event you don't expect the old ones to get "renamed" do you?&lt;/P&gt;&lt;P&gt;So that's not the cause.&lt;/P&gt;&lt;P&gt;Either there is some dynamic renaming in search-time happening as &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/93915"&gt;@VatsalJagani&lt;/a&gt; suggested or the index file is simply corrupted and for some reason "overlaps" source with sourcetype (or vice versa).&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jul 2022 19:01:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Why-is-tstats-returning-sourcetypes-that-do-not-exist/m-p/604843#M13216</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2022-07-07T19:01:06Z</dc:date>
    </item>
    <item>
      <title>Re: tstats Is returning sourcetypes that do not exist</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Why-is-tstats-returning-sourcetypes-that-do-not-exist/m-p/604960#M13226</link>
      <description>&lt;P&gt;Where is a rename most likely to happen? (Universal Forwarder, Heavy Forwarder, Indexer, etc.). Our Universal Forwarders are not using a rename function in any props.conf files, and I've checked the heavy forwarder that these logs are passing through and it does not contain a rename function in any of its props.conf files either. I'm guessing this happens on the indexers?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jul 2022 15:20:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Why-is-tstats-returning-sourcetypes-that-do-not-exist/m-p/604960#M13226</guid>
      <dc:creator>HeavyHats</dc:creator>
      <dc:date>2022-07-08T15:20:44Z</dc:date>
    </item>
    <item>
      <title>Re: tstats Is returning sourcetypes that do not exist</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Why-is-tstats-returning-sourcetypes-that-do-not-exist/m-p/604961#M13227</link>
      <description>&lt;P&gt;If I'm limiting my search to the past 24 hours though, shouldn't tstats respect the time limit and not evaluate older data?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jul 2022 15:24:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Why-is-tstats-returning-sourcetypes-that-do-not-exist/m-p/604961#M13227</guid>
      <dc:creator>HeavyHats</dc:creator>
      <dc:date>2022-07-08T15:24:07Z</dc:date>
    </item>
    <item>
      <title>Re: tstats Is returning sourcetypes that do not exist</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Why-is-tstats-returning-sourcetypes-that-do-not-exist/m-p/604969#M13230</link>
      <description>&lt;P&gt;&lt;STRONG&gt;rename&lt;/STRONG&gt; is search time hence happens on the &lt;STRONG&gt;search head&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jul 2022 15:54:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Why-is-tstats-returning-sourcetypes-that-do-not-exist/m-p/604969#M13230</guid>
      <dc:creator>VatsalJagani</dc:creator>
      <dc:date>2022-07-08T15:54:58Z</dc:date>
    </item>
    <item>
      <title>Re: tstats Is returning sourcetypes that do not exist</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Why-is-tstats-returning-sourcetypes-that-do-not-exist/m-p/604984#M13234</link>
      <description>&lt;P&gt;Thank you for the insight. I discovered that version 8.5.0 of the Splunk Add-on for Microsoft Windows (Splunk_TA_windows) contains rename statements in &lt;EM&gt;Splunk_TA_windows/default/props.conf:&lt;/EM&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;## To provide backward compatibility for WinEventLog and XmlWinEventLog data&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;## These will be deprecated in future&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[WinEventLog:Security]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;rename&lt;/SPAN&gt;&lt;SPAN&gt; = wineventlog&lt;BR /&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[WinEventLog:Application]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;rename&lt;/SPAN&gt;&lt;SPAN&gt; = wineventlog&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;BR /&gt;[WinEventLog:System]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;rename&lt;/SPAN&gt;&lt;SPAN&gt; = wineventlog&lt;BR /&gt;...&lt;BR /&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;This appears to be the source of this behavior. Marking your solution as accepted.&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 08 Jul 2022 17:25:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Why-is-tstats-returning-sourcetypes-that-do-not-exist/m-p/604984#M13234</guid>
      <dc:creator>HeavyHats</dc:creator>
      <dc:date>2022-07-08T17:25:13Z</dc:date>
    </item>
    <item>
      <title>Re: tstats Is returning sourcetypes that do not exist</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Why-is-tstats-returning-sourcetypes-that-do-not-exist/m-p/604998#M13238</link>
      <description>&lt;P&gt;I'm not buying this explanation. Rename works only one way - it only lets you search for a given sourcetype using a different name. It doesn't modify the returned results.&lt;/P&gt;&lt;P&gt;In order for you to have one value stored in the index (returned by tstats) and another calculated search-time you'd have to have some EVAL defined that would "cast" the value from source to sourcetype. Maybe someone did something like that while the windows TA changed it behaviour in order not to rework searches done for old values.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jul 2022 19:03:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Why-is-tstats-returning-sourcetypes-that-do-not-exist/m-p/604998#M13238</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2022-07-08T19:03:09Z</dc:date>
    </item>
    <item>
      <title>Re: tstats Is returning sourcetypes that do not exist</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Why-is-tstats-returning-sourcetypes-that-do-not-exist/m-p/605000#M13239</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Glad&lt;/STRONG&gt; you caught it!!!&lt;/P&gt;&lt;P&gt;Keep an eye out because many Add-ons use this, unfortunately (this makes it inconsistent between tstats and normal search).&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jul 2022 19:14:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Why-is-tstats-returning-sourcetypes-that-do-not-exist/m-p/605000#M13239</guid>
      <dc:creator>VatsalJagani</dc:creator>
      <dc:date>2022-07-08T19:14:43Z</dc:date>
    </item>
  </channel>
</rss>

