<?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 Join SPL result to a single line? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Join-SPL-result-to-a-single-line/m-p/513557#M144088</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;The following SPL returns records to me as shown below.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="uf_basickpi" host!=DS-* (sourcetype="CPU" counter="% Processor Time") OR (sourcetype="Memory" counter="Available MBytes") OR (sourcetype="DiskStuff" counter="% Free Space" instance=C:) 
| stats latest(Value) as Value by host, counter 
| eval "CPU Time" = if(counter="% Processor Time",Value,0) 
| eval "RAM Available" = if(counter="Available MBytes",Value,0) 
| eval "C Free Space" = if(counter="% Free Space",Value,0) 
| table host, "CPU Time", "RAM Available", "C Free Space"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2020-08-11 at 13.43.17.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/10196i6B26C73F8F06166B/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2020-08-11 at 13.43.17.png" alt="Screenshot 2020-08-11 at 13.43.17.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Rows 1,2 and 3 are from the same server. Rows 4,5 and 6 from the second server.&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I would like to have is a single row per server with the three values. What would be the best way to do this.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 11 Aug 2020 12:20:49 GMT</pubDate>
    <dc:creator>wbolten</dc:creator>
    <dc:date>2020-08-11T12:20:49Z</dc:date>
    <item>
      <title>Join SPL result to a single line?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Join-SPL-result-to-a-single-line/m-p/513557#M144088</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;The following SPL returns records to me as shown below.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="uf_basickpi" host!=DS-* (sourcetype="CPU" counter="% Processor Time") OR (sourcetype="Memory" counter="Available MBytes") OR (sourcetype="DiskStuff" counter="% Free Space" instance=C:) 
| stats latest(Value) as Value by host, counter 
| eval "CPU Time" = if(counter="% Processor Time",Value,0) 
| eval "RAM Available" = if(counter="Available MBytes",Value,0) 
| eval "C Free Space" = if(counter="% Free Space",Value,0) 
| table host, "CPU Time", "RAM Available", "C Free Space"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2020-08-11 at 13.43.17.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/10196i6B26C73F8F06166B/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2020-08-11 at 13.43.17.png" alt="Screenshot 2020-08-11 at 13.43.17.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Rows 1,2 and 3 are from the same server. Rows 4,5 and 6 from the second server.&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I would like to have is a single row per server with the three values. What would be the best way to do this.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Aug 2020 12:20:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Join-SPL-result-to-a-single-line/m-p/513557#M144088</guid>
      <dc:creator>wbolten</dc:creator>
      <dc:date>2020-08-11T12:20:49Z</dc:date>
    </item>
    <item>
      <title>Re: Join SPL result to a single line?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Join-SPL-result-to-a-single-line/m-p/513562#M144090</link>
      <description>&lt;P&gt;The stats command can merge the rows.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="uf_basickpi" host!=DS-* (sourcetype="CPU" counter="% Processor Time") OR (sourcetype="Memory" counter="Available MBytes") OR (sourcetype="DiskStuff" counter="% Free Space" instance=C:) 
| stats latest(Value) as Value by host, counter 
| eval "CPU Time" = if(counter="% Processor Time",Value,0) 
| eval "RAM Available" = if(counter="Available MBytes",Value,0) 
| eval "C Free Space" = if(counter="% Free Space",Value,0) 
| stats values(*) as * by host
| table host, "CPU Time", "RAM Available", "C Free Space"&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 11 Aug 2020 12:41:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Join-SPL-result-to-a-single-line/m-p/513562#M144090</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-08-11T12:41:56Z</dc:date>
    </item>
    <item>
      <title>Re: Join SPL result to a single line?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Join-SPL-result-to-a-single-line/m-p/513563#M144091</link>
      <description>&lt;P&gt;I did not know that &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;With your suggestion I did get a single row but the 0 values where in there as well. Replaced them with isnull and now I only have values and a single two per server.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| stats latest(Value) as Value by host, counter 
| eval "CPU Time" = if(counter="% Processor Time",Value,isnull) 
| eval "RAM Available" = if(counter="Available MBytes",Value,isnull) 
| eval "C Free Space" = if(counter="% Free Space",Value,isnull) 
| stats Values(*) as * by host
| table host, "CPU Time", "RAM Available", "C Free Space"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 11 Aug 2020 12:47:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Join-SPL-result-to-a-single-line/m-p/513563#M144091</guid>
      <dc:creator>wbolten</dc:creator>
      <dc:date>2020-08-11T12:47:06Z</dc:date>
    </item>
  </channel>
</rss>

