<?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: Create report listing all clients in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Create-report-listing-all-clients/m-p/153995#M31300</link>
    <description>&lt;P&gt;Made minor updates of the answer to show forwarder types for all clients and make a table:&lt;/P&gt;

&lt;P&gt;index=_internal source=metrics.log group=tcpin_connections fwdType= | eval sourceHost=if(isnull(hostname), sourceHost,hostname) | eval connectionType=case(fwdType=="univ*","univ fwder", fwdType=="lwf", "lightwt fwder",fwdType=="full", "heavy fwder", connectionType=="cooked" or connectionType=="cookedSSL","Splunk fwder", connectionType=="raw" or connectionType=="rawSSL","legacy fwder") | eval version=if(isnull(version),"pre 4.2",version) | rename arch as MachineType | dedup sourceIp | table connectionType,sourceIp,sourceHost,version,MachineType&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 10:41:05 GMT</pubDate>
    <dc:creator>yunkwang</dc:creator>
    <dc:date>2020-09-29T10:41:05Z</dc:date>
    <item>
      <title>Create report listing all clients</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Create-report-listing-all-clients/m-p/153990#M31295</link>
      <description>&lt;P&gt;Hello splunkr's,&lt;/P&gt;

&lt;P&gt;I am trying to create a simple report that will show me all the clients that have the splunk forwarder installed on them.  The current way I deduce this is via the Deployment Server by: Settings &amp;gt; fwdr mgmt &amp;gt; Clients tab &amp;gt; Shows a sum total of 268 clients.  I then copy &amp;amp; paste the results into excel. Silly I know but I've been reading, trying, hacking, scheduling jobs but cannot get the equivalent info.  Just keeping it simple.&lt;/P&gt;

&lt;P&gt;All I want is the Search cmd I can run that reports the total # of clients and has the same type of info with columns of:  Hostname | IP Address | Machine type | Deployed Apps&lt;/P&gt;

&lt;P&gt;I would then like it stored in a CSV file so I can have import into excel.&lt;/P&gt;

&lt;P&gt;Here are a few search cmds I been trying but they either run on forever, giving huge total counts of clients that is radically different from the Deployment svr UI report (we should been in the ball park of a few hundred clients).&lt;/P&gt;

&lt;P&gt;Attempts:&lt;BR /&gt;
1)  * | top limit=0 host | sort host                   (Reports false hostnames, runs forever even with time range set, total count not true)&lt;/P&gt;

&lt;P&gt;2) host=*|stats distinct_count(host) by host           (Reports false hostnames, very slow to run)&lt;/P&gt;

&lt;P&gt;3) * | dedup host | stats count by host | sort host    (Reports false hostnames, runs forever even with time range set, total count not true)&lt;/P&gt;

&lt;P&gt;All dead-on examples would be much appreciated.&lt;/P&gt;

&lt;P&gt;cheers,&lt;BR /&gt;
Damon&lt;/P&gt;</description>
      <pubDate>Tue, 06 May 2014 17:24:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Create-report-listing-all-clients/m-p/153990#M31295</guid>
      <dc:creator>damonmanni</dc:creator>
      <dc:date>2014-05-06T17:24:52Z</dc:date>
    </item>
    <item>
      <title>Re: Create report listing all clients</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Create-report-listing-all-clients/m-p/153991#M31296</link>
      <description>&lt;P&gt;Try this to get a list of the hosts&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal source=*metrics.log group=tcpin_connections 
| eval sourceHost=if(isnull(hostname), sourceHost,hostname) 
| eval connectionType=case(fwdType=="uf","univ fwder", fwdType=="lwf", "lightwt fwder",fwdType=="full", "heavy fwder", connectionType=="cooked" or connectionType=="cookedSSL","Splunk fwder", connectionType=="raw" or connectionType=="rawSSL","legacy fwder")
| eval version=if(isnull(version),"pre 4.2",version)
| rename  arch as MachineType
| fields connectionType sourceIp sourceHost  version MachineType
| dedup sourceIP
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Getting a list of the deployed apps is not tricky, but it depends on the version of Splunk. &lt;BR /&gt;
For Splunk 6, try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal component=DeployedApplication OR component= PackageDownloadRestHandler  sourcetype=splunkd | dedup host app | table host app
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Put them together:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal source=*metrics.log group=tcpin_connections 
| eval sourceHost=if(isnull(hostname), sourceHost,hostname) 
| eval connectionType=case(fwdType=="uf","univ fwder", fwdType=="lwf", "lightwt fwder",fwdType=="full", "heavy fwder", connectionType=="cooked" or connectionType=="cookedSSL","Splunk fwder", connectionType=="raw" or connectionType=="rawSSL","legacy fwder")
| eval version=if(isnull(version),"pre 4.2",version)
| rename  arch as MachineType
| fields connectionType sourceIp sourceHost  version MachineType
| dedup sourceIP
| rename sourceHost as host
| join type=outer host [ search index=_internal component=DeployedApplication OR component= PackageDownloadRestHandler  sourcetype=splunkd | dedup host app | table host app ]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 06 May 2014 17:53:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Create-report-listing-all-clients/m-p/153991#M31296</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2014-05-06T17:53:14Z</dc:date>
    </item>
    <item>
      <title>Re: Create report listing all clients</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Create-report-listing-all-clients/m-p/153992#M31297</link>
      <description>&lt;P&gt;Thanks for the quick response and multiple options and exactness. &lt;/P&gt;

&lt;P&gt;I am running splunk V6 Enterprise.&lt;/P&gt;

&lt;P&gt;The 1st option did not work for me at all: just kept churning but no results.&lt;/P&gt;

&lt;P&gt;The 2nd option produced results but I    got over 10,000 entries. Actual should be around 270 hosts.&lt;/P&gt;

&lt;P&gt;The 3rd option (combined) did not run    at all like #1. churns &amp;amp; no results&lt;/P&gt;

&lt;P&gt;Still stuck.&lt;/P&gt;</description>
      <pubDate>Tue, 06 May 2014 20:02:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Create-report-listing-all-clients/m-p/153992#M31297</guid>
      <dc:creator>damonmanni</dc:creator>
      <dc:date>2014-05-06T20:02:35Z</dc:date>
    </item>
    <item>
      <title>Re: Create report listing all clients</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Create-report-listing-all-clients/m-p/153993#M31298</link>
      <description>&lt;P&gt;Sorry about that - I managed to cut and paste more than I intended for the second search.&lt;/P&gt;

&lt;P&gt;What time range are you running for the first search?&lt;/P&gt;</description>
      <pubDate>Tue, 06 May 2014 20:29:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Create-report-listing-all-clients/m-p/153993#M31298</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2014-05-06T20:29:27Z</dc:date>
    </item>
    <item>
      <title>Re: Create report listing all clients</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Create-report-listing-all-clients/m-p/153994#M31299</link>
      <description>&lt;P&gt;I find that allot ... people with good intentions providing query's (that I'm gratefull saves allot of time) but many don't work.. &lt;/P&gt;</description>
      <pubDate>Thu, 28 Jan 2016 18:01:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Create-report-listing-all-clients/m-p/153994#M31299</guid>
      <dc:creator>mendesjo</dc:creator>
      <dc:date>2016-01-28T18:01:32Z</dc:date>
    </item>
    <item>
      <title>Re: Create report listing all clients</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Create-report-listing-all-clients/m-p/153995#M31300</link>
      <description>&lt;P&gt;Made minor updates of the answer to show forwarder types for all clients and make a table:&lt;/P&gt;

&lt;P&gt;index=_internal source=metrics.log group=tcpin_connections fwdType= | eval sourceHost=if(isnull(hostname), sourceHost,hostname) | eval connectionType=case(fwdType=="univ*","univ fwder", fwdType=="lwf", "lightwt fwder",fwdType=="full", "heavy fwder", connectionType=="cooked" or connectionType=="cookedSSL","Splunk fwder", connectionType=="raw" or connectionType=="rawSSL","legacy fwder") | eval version=if(isnull(version),"pre 4.2",version) | rename arch as MachineType | dedup sourceIp | table connectionType,sourceIp,sourceHost,version,MachineType&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 10:41:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Create-report-listing-all-clients/m-p/153995#M31300</guid>
      <dc:creator>yunkwang</dc:creator>
      <dc:date>2020-09-29T10:41:05Z</dc:date>
    </item>
  </channel>
</rss>

