<?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 edit my coalesce search to obtain a list of hostnames occurring in specific sources in my data? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-coalesce-search-to-obtain-a-list-of-hostnames/m-p/242966#M72286</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;

&lt;P&gt;I have several CSV's from management tools. All containing hostinfo, all of course in their own, beautiful way.&lt;/P&gt;

&lt;P&gt;Some snippets:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sccm:
"ADAH0053";"";"10.34.6.53";"VMware, Inc.";"VMware Virtual Platform";"16777663";"8388152";"43002";"None";"GUID:8249E39E-52C4-4962-B023-F2F52DD87B36"
"ADAH0104";"";"10.34.6.204";"VMware, Inc.";"VMware Virtual Platform";"16777675";"4193848";"40954";"None";"GUID:3BB0D76A-DE24-40CB-8424-C8B76B4C6CA1"

Rain:
"ADHOST011";"C2710AF21NG0003";"Yes";"Supermicro";"XXXXX";"SYS-2082TP-HC1R";"No";"VMware ESXi";"Active";"192.168.1.126,192.168.4.126";"2017-01-04T01:00:15+01:00"
"adhost013";"C2710AF22NG0200";"Yes";"Supermicro";"XXXXX";"SYS-2082TP-HC1R";"No";"VMware ESXi";"Active";"192.168.1.018,192.168.4.018";"2017-01-04T01:00:15+01:00"

TopDesk:
ADDS0110,ADDS0110,Enabled,10.34.48.10,00:0C:29:0A:30:25,"Microsoft Windows Server 2012 R2 Datacenter",VMware-56 4d 77 e2 72 e4 43 47-85 e7 55 ad bb 0a 30 25,
ADDS0111,ADDS0111,Enabled,10.34.48.11,00:50:56:9D:05:60,"Microsoft Windows Server 2012 R2 Datacenter",VMware-42 1d 68 18 93 2e 32 44-d1 c6 f6 8b 16 9d 9c 3f,
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Each file contains hostnames. I tied the hostnames together by using coalesce: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval host_new=coalesce(HostName,COMP_Name,'Object ID')
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Now, my question: I want to have a list of hostnames that are occurring in sources "SCCM" and "RAIN", but not in source "TopDesk". Who can help me out? Bonus question: is using &lt;CODE&gt;coalesce&lt;/CODE&gt; the best possible way to correlate over the different (hostname-) fields?&lt;/P&gt;

&lt;P&gt;Thanx in advance!&lt;/P&gt;</description>
    <pubDate>Thu, 19 Jan 2017 10:18:31 GMT</pubDate>
    <dc:creator>renems</dc:creator>
    <dc:date>2017-01-19T10:18:31Z</dc:date>
    <item>
      <title>How to edit my coalesce search to obtain a list of hostnames occurring in specific sources in my data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-coalesce-search-to-obtain-a-list-of-hostnames/m-p/242966#M72286</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;

&lt;P&gt;I have several CSV's from management tools. All containing hostinfo, all of course in their own, beautiful way.&lt;/P&gt;

&lt;P&gt;Some snippets:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sccm:
"ADAH0053";"";"10.34.6.53";"VMware, Inc.";"VMware Virtual Platform";"16777663";"8388152";"43002";"None";"GUID:8249E39E-52C4-4962-B023-F2F52DD87B36"
"ADAH0104";"";"10.34.6.204";"VMware, Inc.";"VMware Virtual Platform";"16777675";"4193848";"40954";"None";"GUID:3BB0D76A-DE24-40CB-8424-C8B76B4C6CA1"

Rain:
"ADHOST011";"C2710AF21NG0003";"Yes";"Supermicro";"XXXXX";"SYS-2082TP-HC1R";"No";"VMware ESXi";"Active";"192.168.1.126,192.168.4.126";"2017-01-04T01:00:15+01:00"
"adhost013";"C2710AF22NG0200";"Yes";"Supermicro";"XXXXX";"SYS-2082TP-HC1R";"No";"VMware ESXi";"Active";"192.168.1.018,192.168.4.018";"2017-01-04T01:00:15+01:00"

TopDesk:
ADDS0110,ADDS0110,Enabled,10.34.48.10,00:0C:29:0A:30:25,"Microsoft Windows Server 2012 R2 Datacenter",VMware-56 4d 77 e2 72 e4 43 47-85 e7 55 ad bb 0a 30 25,
ADDS0111,ADDS0111,Enabled,10.34.48.11,00:50:56:9D:05:60,"Microsoft Windows Server 2012 R2 Datacenter",VMware-42 1d 68 18 93 2e 32 44-d1 c6 f6 8b 16 9d 9c 3f,
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Each file contains hostnames. I tied the hostnames together by using coalesce: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval host_new=coalesce(HostName,COMP_Name,'Object ID')
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Now, my question: I want to have a list of hostnames that are occurring in sources "SCCM" and "RAIN", but not in source "TopDesk". Who can help me out? Bonus question: is using &lt;CODE&gt;coalesce&lt;/CODE&gt; the best possible way to correlate over the different (hostname-) fields?&lt;/P&gt;

&lt;P&gt;Thanx in advance!&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jan 2017 10:18:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-coalesce-search-to-obtain-a-list-of-hostnames/m-p/242966#M72286</guid>
      <dc:creator>renems</dc:creator>
      <dc:date>2017-01-19T10:18:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my coalesce search to obtain a list of hostnames occurring in specific sources in my data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-coalesce-search-to-obtain-a-list-of-hostnames/m-p/242967#M72287</link>
      <description>&lt;P&gt;I think you are OK to use &lt;CODE&gt;coalesce&lt;/CODE&gt;. The only thing I can think of that is more explicit would be using a &lt;CODE&gt;case&lt;/CODE&gt; statement.&lt;/P&gt;

&lt;P&gt;Regardless of how you determine the &lt;CODE&gt;host_new&lt;/CODE&gt; field, here is a query that will show you the count by host and sourcetype (assuming "SCCM", "Rain", "TopDesk", etc. are differentitated by sourcetype). If sourcetype is not correct, then change that field to the correct field that identifies the sources.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; &amp;lt;YOUR QUERY&amp;gt; ....
| eval host_new=coalesce(HostName,COMP_Name,'Object ID', ...)
| chart count by host_new sourcetype
| where (SCCM &amp;gt; 0 AND Rain &amp;gt; 0 AND TopDesk = 0)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 19 Jan 2017 11:37:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-coalesce-search-to-obtain-a-list-of-hostnames/m-p/242967#M72287</guid>
      <dc:creator>rjthibod</dc:creator>
      <dc:date>2017-01-19T11:37:52Z</dc:date>
    </item>
  </channel>
</rss>

