<?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: How to edit my search to find the sources from soucetype? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-find-the-sources-from-soucetype/m-p/346982#M102737</link>
    <description>&lt;P&gt;Hi kteng2024, You might find &lt;CODE&gt;tstats&lt;/CODE&gt; would work better here. i.e.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| tstats count where sourcetype=YOUR_SOURCETYPE by source
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This will give you a list sources for that sourcetype. It should be fairly quick to run over large timeframes.&lt;/P&gt;

&lt;P&gt;Please let me know if this answers your question! &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 13 Mar 2017 18:57:52 GMT</pubDate>
    <dc:creator>muebel</dc:creator>
    <dc:date>2017-03-13T18:57:52Z</dc:date>
    <item>
      <title>How to edit my search to find the sources from soucetype?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-find-the-sources-from-soucetype/m-p/346981#M102736</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I am using the following search   &lt;CODE&gt;| metadata type=sourcetype| where match(sources)&lt;/CODE&gt;  to find all the sources that a particular sourcetype has. Can someone please help in the correcting the search?&lt;/P&gt;</description>
      <pubDate>Mon, 13 Mar 2017 18:44:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-find-the-sources-from-soucetype/m-p/346981#M102736</guid>
      <dc:creator>kteng2024</dc:creator>
      <dc:date>2017-03-13T18:44:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to find the sources from soucetype?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-find-the-sources-from-soucetype/m-p/346982#M102737</link>
      <description>&lt;P&gt;Hi kteng2024, You might find &lt;CODE&gt;tstats&lt;/CODE&gt; would work better here. i.e.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| tstats count where sourcetype=YOUR_SOURCETYPE by source
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This will give you a list sources for that sourcetype. It should be fairly quick to run over large timeframes.&lt;/P&gt;

&lt;P&gt;Please let me know if this answers your question! &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Mar 2017 18:57:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-find-the-sources-from-soucetype/m-p/346982#M102737</guid>
      <dc:creator>muebel</dc:creator>
      <dc:date>2017-03-13T18:57:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to find the sources from soucetype?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-find-the-sources-from-soucetype/m-p/346983#M102738</link>
      <description>&lt;P&gt;You need another &lt;CODE&gt;s&lt;/CODE&gt; for starters but you cannot do what you are trying to do with the command that you are trying to use.  See what I mean with these:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| metadata type=sources index=* OR index=_*
| metadata type=sourcetypes index=* OR index=_*
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But you can do it with &lt;CODE&gt;tstats&lt;/CODE&gt; like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  | tstats values(source) WHERE index=* OR index=_* BY sourcetype
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 13 Mar 2017 19:05:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-find-the-sources-from-soucetype/m-p/346983#M102738</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-03-13T19:05:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to find the sources from soucetype?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-find-the-sources-from-soucetype/m-p/346984#M102739</link>
      <description>&lt;P&gt;If you're collecting data for all sourcetypes then use this variation.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| tstats max(_time) as recentTime where index=* by sourcetype source
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 13 Mar 2017 19:05:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-find-the-sources-from-soucetype/m-p/346984#M102739</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-03-13T19:05:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to find the sources from soucetype?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-find-the-sources-from-soucetype/m-p/346985#M102740</link>
      <description>&lt;P&gt;Try&lt;BR /&gt;
    | metadata type=sources sourcetype=*&lt;/P&gt;</description>
      <pubDate>Tue, 14 Mar 2017 13:19:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-find-the-sources-from-soucetype/m-p/346985#M102740</guid>
      <dc:creator>mgrosholz</dc:creator>
      <dc:date>2017-03-14T13:19:53Z</dc:date>
    </item>
  </channel>
</rss>

