<?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 How to export a list containing Host Name, Host IP, Apps, Server Class, and Machine Type for a Splunk server? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-export-a-list-containing-Host-Name-Host-IP-Apps-Server/m-p/219797#M43166</link>
    <description>&lt;P&gt;My group is taking over operations for a Splunk server brought over from an acquisition.  We are trying to get a handle on what the previous Splunk admins had set up.&lt;/P&gt;

&lt;P&gt;We would like to export a list that has the following information:&lt;BR /&gt;
Host Name&lt;BR /&gt;
Host IP&lt;BR /&gt;
Apps&lt;BR /&gt;
Server Class&lt;BR /&gt;
Machine Type&lt;/P&gt;

&lt;P&gt;I haven't been able to find a config file or search pattern to produce those results.  Any help is appreciated.&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
Rick&lt;/P&gt;</description>
    <pubDate>Fri, 26 Feb 2016 14:42:00 GMT</pubDate>
    <dc:creator>rbullard</dc:creator>
    <dc:date>2016-02-26T14:42:00Z</dc:date>
    <item>
      <title>How to export a list containing Host Name, Host IP, Apps, Server Class, and Machine Type for a Splunk server?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-export-a-list-containing-Host-Name-Host-IP-Apps-Server/m-p/219797#M43166</link>
      <description>&lt;P&gt;My group is taking over operations for a Splunk server brought over from an acquisition.  We are trying to get a handle on what the previous Splunk admins had set up.&lt;/P&gt;

&lt;P&gt;We would like to export a list that has the following information:&lt;BR /&gt;
Host Name&lt;BR /&gt;
Host IP&lt;BR /&gt;
Apps&lt;BR /&gt;
Server Class&lt;BR /&gt;
Machine Type&lt;/P&gt;

&lt;P&gt;I haven't been able to find a config file or search pattern to produce those results.  Any help is appreciated.&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
Rick&lt;/P&gt;</description>
      <pubDate>Fri, 26 Feb 2016 14:42:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-export-a-list-containing-Host-Name-Host-IP-Apps-Server/m-p/219797#M43166</guid>
      <dc:creator>rbullard</dc:creator>
      <dc:date>2016-02-26T14:42:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to export a list containing Host Name, Host IP, Apps, Server Class, and Machine Type for a Splunk server?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-export-a-list-containing-Host-Name-Host-IP-Apps-Server/m-p/219798#M43167</link>
      <description>&lt;P&gt;Splunk &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.6/RESTREF/RESTprolog"&gt;REST API endpoints&lt;/A&gt; are here to help. Try something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rest /services/deployment/server/clients | table dns ip utsname *.restartSplunkd | eval temp=dns."#".ip."#".utsname | table temp *.restartSplunkd | untable temp apps count | eval Apps=if(like(apps,"app%"),mvindex(split(apps,"."),1),null()) | eval ServerClass=if(like(apps,"server%"),mvindex(split(apps,"."),1),null() )| rex field=temp "(?&amp;lt;Host&amp;gt;.*)#(?&amp;lt;Host_IP&amp;gt;.*)#(?&amp;lt;Machine_Type&amp;gt;.*)" | table Host Host_IP Machine_Type Apps ServerClass | stats Values(*) as * by Host Host_IP Machine_Type
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 26 Feb 2016 23:37:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-export-a-list-containing-Host-Name-Host-IP-Apps-Server/m-p/219798#M43167</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-02-26T23:37:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to export a list containing Host Name, Host IP, Apps, Server Class, and Machine Type for a Splunk server?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-export-a-list-containing-Host-Name-Host-IP-Apps-Server/m-p/219799#M43168</link>
      <description>&lt;P&gt;Unfortunately that provides "No results".  Maybe the previous admins did more extensive changes than I would have thought.&lt;/P&gt;

&lt;P&gt;Taking your answer and attempting to find those "changes".&lt;/P&gt;</description>
      <pubDate>Mon, 29 Feb 2016 14:49:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-export-a-list-containing-Host-Name-Host-IP-Apps-Server/m-p/219799#M43168</guid>
      <dc:creator>rbullard</dc:creator>
      <dc:date>2016-02-29T14:49:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to export a list containing Host Name, Host IP, Apps, Server Class, and Machine Type for a Splunk server?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-export-a-list-containing-Host-Name-Host-IP-Apps-Server/m-p/219800#M43169</link>
      <description>&lt;P&gt;Try to run this query from the deployment server's Splunk Web.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Feb 2016 16:17:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-export-a-list-containing-Host-Name-Host-IP-Apps-Server/m-p/219800#M43169</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-02-29T16:17:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to export a list containing Host Name, Host IP, Apps, Server Class, and Machine Type for a Splunk server?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-export-a-list-containing-Host-Name-Host-IP-Apps-Server/m-p/219801#M43170</link>
      <description>&lt;P&gt;Thank you somesoni2. I had a similar request and this helped me out immensely. I updated your search slightly as follows and ran it on our DMC and the results are exactly what we are looking for.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rest splunk_server_group=dmc_group_deployment_server /services/deployment/server/clients | eval hostname=lower(hostname) | eval lastphonehome=strftime(lastPhoneHomeTime,"%m/%d/%Y %H:%M:%S%z") | table splunk_server hostname dns ip utsname build name lastphonehome *.restartSplunkd | eval temp=splunk_server."#".hostname."#".dns."#".ip."#".utsname."#".build."#".name."#".lastphonehome | table temp *.restartSplunkd | untable temp apps count | eval Apps=if(like(apps,"app%"),mvindex(split(apps,"."),1),null()) | eval ServerClass=if(like(apps,"server%"),mvindex(split(apps,"."),1),null() )| rex field=temp "(?&amp;lt;SplunkDS&amp;gt;.*)#(?&amp;lt;Host&amp;gt;.*)#(?&amp;lt;FQDN&amp;gt;.*)#(?&amp;lt;Host_IP&amp;gt;.*)#(?&amp;lt;Machine_Type&amp;gt;.*)#(?&amp;lt;Build&amp;gt;.*)#(?&amp;lt;clientName&amp;gt;.*)#(?&amp;lt;Last_PhoneHome&amp;gt;.*)" | table SplunkDS Host FQDN Host_IP Machine_Type Build clientName Last_PhoneHome Apps ServerClass | stats Values(*) as * by SplunkDS Host FQDN Host_IP Machine_Type Build clientName Last_PhoneHome | sort +Host,+SplunkDS
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;It would be nice to see the DMC extended to include Deployment Server information instead of having to do this ourselves.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2016 17:01:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-export-a-list-containing-Host-Name-Host-IP-Apps-Server/m-p/219801#M43170</guid>
      <dc:creator>jwiedow</dc:creator>
      <dc:date>2016-03-30T17:01:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to export a list containing Host Name, Host IP, Apps, Server Class, and Machine Type for a Splunk server?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-export-a-list-containing-Host-Name-Host-IP-Apps-Server/m-p/219802#M43171</link>
      <description>&lt;P&gt;Like  somesoni2 already suggested you can use &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Rest"&gt;rest command&lt;/A&gt; on the DeploymentServer or any server which has the DeploymentServer as search-peer to access the &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/RESTREF/RESTdeploy#deployment.2Fclient"&gt;REST endpoint /services/deployment/client&lt;/A&gt;. It provides all information about the connected clients.&lt;/P&gt;

&lt;P&gt;I found this appoach a litlle more readable:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rest /services/deployment/server/clients
| foreach applications.*.restartSplunkd [eval Apps=if(isnotnull('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;'), mvappend(Apps, "&amp;lt;&amp;lt;MATCHSTR&amp;gt;&amp;gt;"), Apps)]
| foreach serverClasses.*.restartSplunkd [eval ServerClasses=if(isnotnull('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;'), mvappend(ServerClasses, "&amp;lt;&amp;lt;MATCHSTR&amp;gt;&amp;gt;"), ServerClasses)]
| table hostname ip dns utsname clientName Apps ServerClasses averagePhoneHomeInterval lastPhoneHomeTime
| fieldformat lastPhoneHomeTime=strftime(lastPhoneHomeTime, "%F %T")
| eval missing=now()-lastPhoneHomeTime-averagePhoneHomeInterval | eval missing=if(missing&amp;lt;0, 0, missing)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 09 Feb 2017 16:51:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-export-a-list-containing-Host-Name-Host-IP-Apps-Server/m-p/219802#M43171</guid>
      <dc:creator>goelli</dc:creator>
      <dc:date>2017-02-09T16:51:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to export a list containing Host Name, Host IP, Apps, Server Class, and Machine Type for a Splunk server?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-export-a-list-containing-Host-Name-Host-IP-Apps-Server/m-p/219803#M43172</link>
      <description>&lt;P&gt;Hybrid of the above searches:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rest /services/deployment/server/clients  splunk_server=local
| foreach applications.*.restartSplunkd [eval Apps=if(isnotnull('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;'), mvappend(Apps, "&amp;lt;&amp;lt;MATCHSTR&amp;gt;&amp;gt;"), Apps)]
| foreach serverClasses.*.restartSplunkd [eval ServerClasses=if(isnotnull('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;'), mvappend(ServerClasses, "&amp;lt;&amp;lt;MATCHSTR&amp;gt;&amp;gt;"), ServerClasses)]
| eval Forwarder = lower(dns)
| rex field=utsname "(?&amp;lt;os&amp;gt;[^\-]+)\-(?&amp;lt;arch&amp;gt;.+)"
| eval os = case(os == "linux", "Linux", os == "windows", "Windows", arch == "sun4u", "Solaris", arch == "sun4v", "Solaris")
| fields - utsname
| lookup version2build.csv build
| rename dns AS Forwarder, averagePhoneHomeInterval AS PHI
| stats values(Apps) AS Apps, values(ServerClasses) AS ServerClasses count by Forwarder ip os arch version build clientName splunk_server PHI lastPhoneHomeTime
| fieldformat lastPhoneHomeTime=strftime(lastPhoneHomeTime, "%F %T")
| eval missing=now()-lastPhoneHomeTime-PHI| eval missing=if(missing&amp;lt;0, 0, missing)
| eval Missing=case (missing==0, "No", missing==1, "Yes")
| fields - missing
| addtotals count col=t row=f
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 13 Jun 2017 17:16:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-export-a-list-containing-Host-Name-Host-IP-Apps-Server/m-p/219803#M43172</guid>
      <dc:creator>wrangler2x</dc:creator>
      <dc:date>2017-06-13T17:16:57Z</dc:date>
    </item>
  </channel>
</rss>

