<?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: Search sourcetypes by forwarders in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Search-sourcetypes-by-forwarders/m-p/179678#M36062</link>
    <description>&lt;P&gt;That gives a count of the events - and it is very fast - but it still has the problem that it doesn't map back to the actual forwarder name.&lt;/P&gt;</description>
    <pubDate>Mon, 16 Dec 2013 23:31:10 GMT</pubDate>
    <dc:creator>lguinn2</dc:creator>
    <dc:date>2013-12-16T23:31:10Z</dc:date>
    <item>
      <title>Search sourcetypes by forwarders</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Search-sourcetypes-by-forwarders/m-p/179673#M36057</link>
      <description>&lt;P&gt;I need to collect list of sourcetypes for each forwarder using search query. i can get forwarders list from metics.log and sourcetype list from licence_usage log seperately from _internal index.&lt;BR /&gt;
Is there any way to get all the sourcetypes configured from each forwarder using single search query?&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2013 08:13:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Search-sourcetypes-by-forwarders/m-p/179673#M36057</guid>
      <dc:creator>johnchamp</dc:creator>
      <dc:date>2013-12-16T08:13:28Z</dc:date>
    </item>
    <item>
      <title>Re: Search sourcetypes by forwarders</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Search-sourcetypes-by-forwarders/m-p/179674#M36058</link>
      <description>&lt;P&gt;Sort of - if the host name matches the forwarder name:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="_internal" source="*license_usage.lo*" type!=*Summary 
| stats sum(b) as bytes by h st 
| rename h as host st as sourcetype 
| eval MB=round(bytes/(1024*2014),1) | fields - bytes
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hopefully, there will be some correlation between this and&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="_internal" source="*metrics*" group=tcpin_connections 
| stats sum(kb) as kb by hostname 
| eval MB =round(kb/1024,1) 
| rename hostname as host 
| fields - kb
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you wanted to combine these, you could do something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="_internal" source="*license_usage.lo*" type!=*Summary 
| stats sum(b) as bytes by h st 
| rename h as host st as sourcetype 
| eval MB=round(bytes/(1024*2014),1) | fields - bytes
| join host type=outer [ search index="_internal" source="*metrics*" group=tcpin_connections 
    | stats sum(kb) as kb by hostname 
    | eval totalMBforwarded =round(kb/1024,1) 
    | rename hostname as host 
    | fields status host totalMBforwarded]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Any result that has a "totalMBforwarded" was a match. If the host name is being reset on the forwarder, you could also create a lookup table to define a mapping that could also be used in this search.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2013 12:16:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Search-sourcetypes-by-forwarders/m-p/179674#M36058</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2013-12-16T12:16:37Z</dc:date>
    </item>
    <item>
      <title>Re: Search sourcetypes by forwarders</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Search-sourcetypes-by-forwarders/m-p/179675#M36059</link>
      <description>&lt;P&gt;BTW - totalMVforwarded may always be larger than the sum of the sourcetypes from a host.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2013 12:30:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Search-sourcetypes-by-forwarders/m-p/179675#M36059</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2013-12-16T12:30:38Z</dc:date>
    </item>
    <item>
      <title>Re: Search sourcetypes by forwarders</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Search-sourcetypes-by-forwarders/m-p/179676#M36060</link>
      <description>&lt;P&gt;Thanks for you help. In my case host names are not matching with forwarders. I need to work on lookup table to do the mapping.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2013 19:15:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Search-sourcetypes-by-forwarders/m-p/179676#M36060</guid>
      <dc:creator>johnchamp</dc:creator>
      <dc:date>2013-12-16T19:15:50Z</dc:date>
    </item>
    <item>
      <title>Re: Search sourcetypes by forwarders</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Search-sourcetypes-by-forwarders/m-p/179677#M36061</link>
      <description>&lt;P&gt;Another option could have been using |metasearch command&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|metasearch host=* sourcetype=* | stats count by host, sourcetype
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Here host name is the name of forwarder using which data is been indexed into splunk.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2013 20:05:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Search-sourcetypes-by-forwarders/m-p/179677#M36061</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2013-12-16T20:05:45Z</dc:date>
    </item>
    <item>
      <title>Re: Search sourcetypes by forwarders</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Search-sourcetypes-by-forwarders/m-p/179678#M36062</link>
      <description>&lt;P&gt;That gives a count of the events - and it is very fast - but it still has the problem that it doesn't map back to the actual forwarder name.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2013 23:31:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Search-sourcetypes-by-forwarders/m-p/179678#M36062</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2013-12-16T23:31:10Z</dc:date>
    </item>
  </channel>
</rss>

