<?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: chart by source and hostname in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/chart-by-source-and-hostname/m-p/153556#M43112</link>
    <description>&lt;P&gt;I am getting the following error when running this query:&lt;BR /&gt;
Error in 'multisearch' command: Multisearch subsearches may only contain purely streaming operations (subsearch 1 contains a non-streaming command.)&lt;/P&gt;</description>
    <pubDate>Wed, 23 Jul 2014 20:57:42 GMT</pubDate>
    <dc:creator>lbogle</dc:creator>
    <dc:date>2014-07-23T20:57:42Z</dc:date>
    <item>
      <title>chart by source and hostname</title>
      <link>https://community.splunk.com/t5/Splunk-Search/chart-by-source-and-hostname/m-p/153549#M43105</link>
      <description>&lt;P&gt;Hello Splunkers,&lt;BR /&gt;
I am trying to correlate hostnames to multiple sources (4 .csv host files) to see if I can find where the same hostnames show up in those sources. I have the data into Splunk and have individually done initial searches through each of the host files to give myself a clean list of hostnames but I don't quite know how to sort through the resulting data to chart which hostnames appear in what sources.&lt;/P&gt;

&lt;P&gt;index=assets source="/scratch/assets/DG-Windows.csv" | dedup MACHINE_NAME&lt;BR /&gt;
index=assets source="/scratch/assets/DG-Mac.csv" | dedup MACHINE_NAME&lt;BR /&gt;
index=assets source="/scratch/assets/Altiris.csv | dedup System Name&lt;BR /&gt;
index=assets source="/scratch/assets/Asset-Mgmt.csv" | dedup HostName&lt;/P&gt;

&lt;P&gt;Does anyone know how this could be done?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 17:08:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/chart-by-source-and-hostname/m-p/153549#M43105</guid>
      <dc:creator>lbogle</dc:creator>
      <dc:date>2020-09-28T17:08:41Z</dc:date>
    </item>
    <item>
      <title>Re: chart by source and hostname</title>
      <link>https://community.splunk.com/t5/Splunk-Search/chart-by-source-and-hostname/m-p/153550#M43106</link>
      <description>&lt;P&gt;Do you want to chart hostname count VS source?&lt;BR /&gt;
Also, i assume in the search #3 it is SystemName&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jul 2014 01:29:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/chart-by-source-and-hostname/m-p/153550#M43106</guid>
      <dc:creator>strive</dc:creator>
      <dc:date>2014-07-23T01:29:47Z</dc:date>
    </item>
    <item>
      <title>Re: chart by source and hostname</title>
      <link>https://community.splunk.com/t5/Splunk-Search/chart-by-source-and-hostname/m-p/153551#M43107</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
Essentially, I'm trying to find a way to show which hostname is in which source. I'm imagining a chart where rows are hostnames and columns are the source.&lt;BR /&gt;
Does that make sense?&lt;BR /&gt;
Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jul 2014 03:07:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/chart-by-source-and-hostname/m-p/153551#M43107</guid>
      <dc:creator>lbogle</dc:creator>
      <dc:date>2014-07-23T03:07:48Z</dc:date>
    </item>
    <item>
      <title>Re: chart by source and hostname</title>
      <link>https://community.splunk.com/t5/Splunk-Search/chart-by-source-and-hostname/m-p/153552#M43108</link>
      <description>&lt;P&gt;And  the field it extracts is "System Name". &lt;BR /&gt;
Thanks,&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jul 2014 03:09:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/chart-by-source-and-hostname/m-p/153552#M43108</guid>
      <dc:creator>lbogle</dc:creator>
      <dc:date>2014-07-23T03:09:36Z</dc:date>
    </item>
    <item>
      <title>Re: chart by source and hostname</title>
      <link>https://community.splunk.com/t5/Splunk-Search/chart-by-source-and-hostname/m-p/153553#M43109</link>
      <description>&lt;P&gt;Are you sure that you are clear with your use case. Since you have done dedup the maximum possible count for any host after |dedup MACHINE_NAME | stats count by MACHINE_NAME will be 1. When you put it table format, the values will be either 0 or 1. Something like below table.&lt;BR /&gt;
Host_Name Source1 Source2 Source3 Source4&lt;BR /&gt;
A                     1              1               0               0&lt;BR /&gt;
B                     0              0               1               0&lt;BR /&gt;
If your need is like above table then we can help you with the searches.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 17:08:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/chart-by-source-and-hostname/m-p/153553#M43109</guid>
      <dc:creator>strive</dc:creator>
      <dc:date>2020-09-28T17:08:46Z</dc:date>
    </item>
    <item>
      <title>Re: chart by source and hostname</title>
      <link>https://community.splunk.com/t5/Splunk-Search/chart-by-source-and-hostname/m-p/153554#M43110</link>
      <description>&lt;P&gt;Give this a try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=assets source="/scratch/assets/DG-Windows.csv" OR source="/scratch/assets/DG-Mac.csv" OR  source="/scratch/assets/Altiris.csv" OR source="/scratch/assets/Asset-Mgmt.csv" 
| eval MACHINE_NAME=coalesce(coalesce(MACHINE_NAME,HostName),'System Name') | dedup source MACHINE_NAME | chart count over MACHINE_NAME by source
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This will give you chart for which host appears in which source. Select the type of chart as stacked column chart to see the host on x-axis with name of source at columns.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Updated&lt;/STRONG&gt;&lt;BR /&gt;
Give this a try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|multisearch [search index=assets source="/scratch/assets/DG-Windows.csv" | dedup MACHINE_NAME][search index=assets source="/scratch/assets/DG-Mac.csv" | dedup MACHINE_NAME ][search index=assets source="/scratch/assets/Altiris.csv | dedup "System Name" |rename "SystemName" as MACHINE_NAME] [searchindex=assets source="/scratch/assets/Asset-Mgmt.csv" | dedup HostName | rename HostName as MACHINE_NAME] | chart count over MACHINE_NAME by source
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 23 Jul 2014 14:50:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/chart-by-source-and-hostname/m-p/153554#M43110</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-07-23T14:50:52Z</dc:date>
    </item>
    <item>
      <title>Re: chart by source and hostname</title>
      <link>https://community.splunk.com/t5/Splunk-Search/chart-by-source-and-hostname/m-p/153555#M43111</link>
      <description>&lt;P&gt;Thats exactly the information and format I am looking for! The search by somesoni2 is pretty close but it only seems to identify hosts that are in DG-Windows.csv OR DG-Mac.csv. It doesn't seem to identify any other .csv files in which the assets reside (which is the case). Thank you both for your valuable assistance.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jul 2014 15:30:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/chart-by-source-and-hostname/m-p/153555#M43111</guid>
      <dc:creator>lbogle</dc:creator>
      <dc:date>2014-07-23T15:30:25Z</dc:date>
    </item>
    <item>
      <title>Re: chart by source and hostname</title>
      <link>https://community.splunk.com/t5/Splunk-Search/chart-by-source-and-hostname/m-p/153556#M43112</link>
      <description>&lt;P&gt;I am getting the following error when running this query:&lt;BR /&gt;
Error in 'multisearch' command: Multisearch subsearches may only contain purely streaming operations (subsearch 1 contains a non-streaming command.)&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jul 2014 20:57:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/chart-by-source-and-hostname/m-p/153556#M43112</guid>
      <dc:creator>lbogle</dc:creator>
      <dc:date>2014-07-23T20:57:42Z</dc:date>
    </item>
    <item>
      <title>Re: chart by source and hostname</title>
      <link>https://community.splunk.com/t5/Splunk-Search/chart-by-source-and-hostname/m-p/153557#M43113</link>
      <description>&lt;P&gt;This worked for me. It's kind of cludgey looking but it gave me what I needed. Check it out:&lt;/P&gt;

&lt;P&gt;index=assets source="/scratch/cadence_assets/*.csv" (NOT "System Type"="Virtual" NOT "System Type"="Server" NOT "System Type"="Thin Client") | rename "System Name" as MACHINE_NAME | rename "HostName" as MACHINE_NAME | dedup source MACHINE_NAME | chart count over MACHINE_NAME by source&lt;/P&gt;

&lt;P&gt;Thank you all very much for your excellent suggestions and helpful queries!&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 17:09:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/chart-by-source-and-hostname/m-p/153557#M43113</guid>
      <dc:creator>lbogle</dc:creator>
      <dc:date>2020-09-28T17:09:35Z</dc:date>
    </item>
  </channel>
</rss>

