<?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: Host and OS type in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Host-and-OS-type/m-p/75906#M15501</link>
    <description>&lt;P&gt;I know this is an old thread but, here is how I do it :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal fwdType="*"|dedup sourceHost| table sourceHost, os
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 10 Jun 2013 14:21:44 GMT</pubDate>
    <dc:creator>JSapienza</dc:creator>
    <dc:date>2013-06-10T14:21:44Z</dc:date>
    <item>
      <title>Host and OS type</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Host-and-OS-type/m-p/75903#M15498</link>
      <description>&lt;P&gt;How do I phrase a search to give me all the machines sending data and their OS type?&lt;/P&gt;</description>
      <pubDate>Sat, 23 Oct 2010 00:56:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Host-and-OS-type/m-p/75903#M15498</guid>
      <dc:creator>jawehren</dc:creator>
      <dc:date>2010-10-23T00:56:41Z</dc:date>
    </item>
    <item>
      <title>Re: Host and OS type</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Host-and-OS-type/m-p/75904#M15499</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;host=*
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;i do not think there is a way to find out their OS, unless you have some script running &lt;CODE&gt;uname -a&lt;/CODE&gt; and splunk eating its output...&lt;/P&gt;</description>
      <pubDate>Sat, 23 Oct 2010 00:59:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Host-and-OS-type/m-p/75904#M15499</guid>
      <dc:creator>Genti</dc:creator>
      <dc:date>2010-10-23T00:59:57Z</dc:date>
    </item>
    <item>
      <title>Re: Host and OS type</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Host-and-OS-type/m-p/75905#M15500</link>
      <description>&lt;P&gt;The best approach is almost certainly going to be to use a &lt;A href="http://www.splunk.com/base/Documentation/latest/Knowledge/Addfieldsfromexternaldatasources" rel="nofollow"&gt;lookup&lt;/A&gt; table.&lt;/P&gt;

&lt;P&gt;See the &lt;A href="http://www.splunk.com/base/Documentation/latest/Knowledge/Addfieldsfromexternaldatasources" rel="nofollow"&gt;link&lt;/A&gt; for information on setting up a CSV-based lookup. Once you have such a lookup, you'll be able to do a search such as:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| metadata hosts | lookup mylookup host OUTPUT operating_system
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you have a scripted input running &lt;CODE&gt;uname -a&lt;/CODE&gt; as Genti suggests, that can be used to populate your table, e.g.:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=uname | fields host, operating_system | outputlookup mylookup
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Another approach, if you're lucky enough to have all systems in some form of directory would be to use a &lt;A href="http://www.splunk.com/base/Documentation/latest/Knowledge/Addfieldsfromexternaldatasources#Set_up_a_fields_lookup_based_on_an_external_command_or_script" rel="nofollow"&gt;scripted lookup&lt;/A&gt; that leverages LDAP to query (for example) Active Directory.&lt;/P&gt;

&lt;P&gt;In a real pinch, you &lt;I&gt;may&lt;/I&gt; be able to partially fill your CSV file from data within Splunk. For example, if you see WMI events, you can safely assume that it's a Windows system, and if you see 'ASA' or 'PIX' in syslog data, it's clearly a Cisco firewall.&lt;/P&gt;

&lt;P&gt;Ultimately though, the chances are you'll need to manually populate the CSV file.&lt;/P&gt;</description>
      <pubDate>Sat, 01 Jan 2011 13:47:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Host-and-OS-type/m-p/75905#M15500</guid>
      <dc:creator>southeringtonp</dc:creator>
      <dc:date>2011-01-01T13:47:49Z</dc:date>
    </item>
    <item>
      <title>Re: Host and OS type</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Host-and-OS-type/m-p/75906#M15501</link>
      <description>&lt;P&gt;I know this is an old thread but, here is how I do it :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal fwdType="*"|dedup sourceHost| table sourceHost, os
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 10 Jun 2013 14:21:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Host-and-OS-type/m-p/75906#M15501</guid>
      <dc:creator>JSapienza</dc:creator>
      <dc:date>2013-06-10T14:21:44Z</dc:date>
    </item>
  </channel>
</rss>

