<?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 Search - joining results in table in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Search-joining-results-in-table/m-p/527137#M148792</link>
    <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;How would I join bellow results by common field -&amp;gt; host? Same index is used.&lt;/P&gt;&lt;P&gt;I was able to create advanced and big dashboards / searches, but cannot use join or other stuff lately, because I'm not working with Splunk daily, and forgot almost everything..&lt;/P&gt;&lt;P&gt;My original intention was to add BuildNumber into this search:&lt;/P&gt;&lt;P&gt;sourcetype="WinHostMon" Type="Disk" Name="C:" host="*" NOT host="*dc.dhl.com*" NOT host="*czchows*" NOT host="*MYKULWS*" NOT host="*czstlws*" NOT host="*usqasws*" | dedup host | eval FreeSpaceKB = round((FreeSpaceKB/1024/1024),2) | eval TotalSpaceKB = round ((TotalSpaceKB/1024/1024),2)&amp;nbsp; | eval percentage=(FreeSpaceKB/TotalSpaceKB*100) | join host&amp;nbsp; [ search sourcetype="xendesktop:7:machine" | eval host=MachineName ] | table MachineName DesktopGroupName FreeSpaceKB TotalSpaceKB percentage | rename FreeSpaceKB AS "Free Space GB" MachineName AS Machine TotalSpaceKB AS "Total Space GB" percentage AS "% Free Space" | sort&amp;nbsp; Machine&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SplunkQ.PNG" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/11584i1062AE08E0D9FF55/image-size/large?v=v2&amp;amp;px=999" role="button" title="SplunkQ.PNG" alt="SplunkQ.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 29 Oct 2020 16:36:00 GMT</pubDate>
    <dc:creator>janitka</dc:creator>
    <dc:date>2020-10-29T16:36:00Z</dc:date>
    <item>
      <title>Search - joining results in table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-joining-results-in-table/m-p/527137#M148792</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;How would I join bellow results by common field -&amp;gt; host? Same index is used.&lt;/P&gt;&lt;P&gt;I was able to create advanced and big dashboards / searches, but cannot use join or other stuff lately, because I'm not working with Splunk daily, and forgot almost everything..&lt;/P&gt;&lt;P&gt;My original intention was to add BuildNumber into this search:&lt;/P&gt;&lt;P&gt;sourcetype="WinHostMon" Type="Disk" Name="C:" host="*" NOT host="*dc.dhl.com*" NOT host="*czchows*" NOT host="*MYKULWS*" NOT host="*czstlws*" NOT host="*usqasws*" | dedup host | eval FreeSpaceKB = round((FreeSpaceKB/1024/1024),2) | eval TotalSpaceKB = round ((TotalSpaceKB/1024/1024),2)&amp;nbsp; | eval percentage=(FreeSpaceKB/TotalSpaceKB*100) | join host&amp;nbsp; [ search sourcetype="xendesktop:7:machine" | eval host=MachineName ] | table MachineName DesktopGroupName FreeSpaceKB TotalSpaceKB percentage | rename FreeSpaceKB AS "Free Space GB" MachineName AS Machine TotalSpaceKB AS "Total Space GB" percentage AS "% Free Space" | sort&amp;nbsp; Machine&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SplunkQ.PNG" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/11584i1062AE08E0D9FF55/image-size/large?v=v2&amp;amp;px=999" role="button" title="SplunkQ.PNG" alt="SplunkQ.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Oct 2020 16:36:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-joining-results-in-table/m-p/527137#M148792</guid>
      <dc:creator>janitka</dc:creator>
      <dc:date>2020-10-29T16:36:00Z</dc:date>
    </item>
    <item>
      <title>Re: Search - joining results in table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-joining-results-in-table/m-p/527390#M148874</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;1.&amp;nbsp; First setup an OR search:&lt;BR /&gt;2.&amp;nbsp; make sure your value for join (host) exists in each sourcetype&amp;nbsp; &amp;nbsp;eval host= a, b, or c&lt;BR /&gt;3.&amp;nbsp; use stats to pass through and select data points; via&amp;nbsp; values, first, last, earliest, latest depending on if every record has the data point; when not fall back to values;&amp;nbsp; can be a problem if searching intervals where host shows up more than once; might need event status to get the latest events by host too.&lt;/P&gt;&lt;P&gt;4.&amp;nbsp; piece it together;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(sourcetype="WinHostMon" Type="Disk" Name="C:" host="*" NOT host="*dc.dhl.com*" NOT host="*czchows*" NOT host="*MYKULWS*" NOT host="*czstlws*" NOT host="*usqasws*" ) OR ( sourcetype="xendesktop:7:machine" )&lt;BR /&gt;| eval MachineName=if(isnotnull(host), host, isnotnull(MachineName), MachineName, null()))&lt;BR /&gt;| stats values(DesktopGroupName) as DesktopGroupName, values(FreeSpaceKB) as FreeSpaceKB, values(TotalSpaceKB) as TotalSpaceKB, values(BuildNumber) as BuildNumber by&amp;nbsp;MachineName&lt;BR /&gt;| eval percentage=(FreeSpaceKB/TotalSpaceKB*100)&lt;BR /&gt;| eval FreeSpaceGB = round((FreeSpaceKB/1024/1024),2)&lt;BR /&gt;| eval TotalSpaceGB = round ((TotalSpaceKB/1024/1024),2)&lt;BR /&gt;| table MachineName DesktopGroupName FreeSpaceGB TotalSpaceGB percentage&lt;BR /&gt;| rename FreeSpaceGB AS "Free Space GB" MachineName AS Machine TotalSpaceGB AS "Total Space GB" percentage AS "% Free Space"&lt;/P&gt;</description>
      <pubDate>Fri, 30 Oct 2020 23:51:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-joining-results-in-table/m-p/527390#M148874</guid>
      <dc:creator>kennetkline</dc:creator>
      <dc:date>2020-10-30T23:51:12Z</dc:date>
    </item>
    <item>
      <title>Re: Search - joining results in table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-joining-results-in-table/m-p/527490#M148901</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;that query is failing on IF&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"Error in 'eval' command: The arguments to the 'if' function are invalid."&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Also, I don't need to use "&lt;SPAN&gt;sourcetype="xendesktop:7:machine"&amp;nbsp;" that much, main target is to get data for both Type=Disk Name=C: and Type=Operatingsystem, in same table, as I can get the result on separate lines, when I remove | dedup host.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks for your time&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Nov 2020 08:55:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-joining-results-in-table/m-p/527490#M148901</guid>
      <dc:creator>janitka</dc:creator>
      <dc:date>2020-11-02T08:55:19Z</dc:date>
    </item>
    <item>
      <title>Re: Search - joining results in table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-joining-results-in-table/m-p/527494#M148902</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/216988"&gt;@janitka&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;"Error in 'eval' command: The arguments to the 'if' function are invalid."&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Not sure why.. the eval and if looks fine... ok, Please check this if it works -&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;| eval MachineName=if(isnotnull(host), "host", "MachineName")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Nov 2020 10:04:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-joining-results-in-table/m-p/527494#M148902</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2020-11-02T10:04:24Z</dc:date>
    </item>
    <item>
      <title>Re: Search - joining results in table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-joining-results-in-table/m-p/527510#M148907</link>
      <description>&lt;P&gt;This one works, but the result is that it creates one line, with host as Machine, and then all DesktopGroupNames next to it.&lt;/P&gt;&lt;P&gt;I'm totally dumb and not able to think, because I sorted it once already&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="aaassss.PNG" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/11611iFF538F68F1C356F8/image-size/large?v=v2&amp;amp;px=999" role="button" title="aaassss.PNG" alt="aaassss.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want something like bellow, but to have both space and build number on one line for each respective machine. (xendesktop source is not needed necessary, it only provides additional data for Desktop Group Name)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="asdasd.PNG" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/11609iBC8F496324E83020/image-size/large?v=v2&amp;amp;px=999" role="button" title="asdasd.PNG" alt="asdasd.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Nov 2020 11:52:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-joining-results-in-table/m-p/527510#M148907</guid>
      <dc:creator>janitka</dc:creator>
      <dc:date>2020-11-02T11:52:58Z</dc:date>
    </item>
  </channel>
</rss>

