<?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: Adding a column from a subsearch in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Adding-a-column-from-a-subsearch/m-p/322491#M96293</link>
    <description>&lt;P&gt;The instance field is common between them.  They're similar searches, just on different objects.&lt;/P&gt;</description>
    <pubDate>Wed, 07 Mar 2018 21:34:40 GMT</pubDate>
    <dc:creator>hatbeard</dc:creator>
    <dc:date>2018-03-07T21:34:40Z</dc:date>
    <item>
      <title>Adding a column from a subsearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Adding-a-column-from-a-subsearch/m-p/322489#M96291</link>
      <description>&lt;P&gt;I have this query that i've lightly changed from the winfra app, but i want to add a PID into it, that would be in the second query.  I'm having trouble figuring out how to get this done.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;eventtype="perfmon_windows" (Host="SERVER" ) Host="*" object="Process" counter="% Processor Time" instance="coldfusion*" AND NOT instance="coldfusions*"  | stats sparkline(avg(Value)) as Trend avg(Value) as Average, max(Value) as Peak, latest(Value) as Current, latest(_time) as "Last Updated" by instance | convert ctime("Last Updated") | sort - Current | eval Average=round(Average, 2) | eval Peak=round(Peak, 2) | eval Current=round(Current, 2)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;then there's this one, which has the value of the PID&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;eventtype="perfmon_windows" (Host="SERVER" ) object="Process" instance="coldfusion*" AND NOT instance="coldfusions*"  counter="ID Process" |table Value
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;When I use a JOIN i get far too many columns back.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Mar 2018 20:53:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Adding-a-column-from-a-subsearch/m-p/322489#M96291</guid>
      <dc:creator>hatbeard</dc:creator>
      <dc:date>2018-03-07T20:53:46Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a column from a subsearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Adding-a-column-from-a-subsearch/m-p/322490#M96292</link>
      <description>&lt;P&gt;There should be 1 field common in both the queries to combine the values.&lt;/P&gt;

&lt;P&gt;Your first query doesn't have "value" field being carried in the final results.&lt;/P&gt;

&lt;P&gt;Example:&lt;BR /&gt;
| inputlookup abc.csv&lt;BR /&gt;
| table common_field host&lt;BR /&gt;
| appendcols &lt;BR /&gt;
[| inputlookup xyz.csv&lt;BR /&gt;
| table common_field dest&lt;BR /&gt;
]&lt;BR /&gt;
| table common_field host dest&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 18:20:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Adding-a-column-from-a-subsearch/m-p/322490#M96292</guid>
      <dc:creator>kamal_jagga</dc:creator>
      <dc:date>2020-09-29T18:20:17Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a column from a subsearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Adding-a-column-from-a-subsearch/m-p/322491#M96293</link>
      <description>&lt;P&gt;The instance field is common between them.  They're similar searches, just on different objects.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Mar 2018 21:34:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Adding-a-column-from-a-subsearch/m-p/322491#M96293</guid>
      <dc:creator>hatbeard</dc:creator>
      <dc:date>2018-03-07T21:34:40Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a column from a subsearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Adding-a-column-from-a-subsearch/m-p/322492#M96294</link>
      <description>&lt;P&gt;Following should work.&lt;BR /&gt;
Example:&lt;BR /&gt;
Search 1&lt;BR /&gt;
| table instance *&lt;BR /&gt;
| appendcols &lt;BR /&gt;
[|Search 2&lt;BR /&gt;
| table instance PID &lt;BR /&gt;
]&lt;BR /&gt;
| table instance PID *&lt;/P&gt;</description>
      <pubDate>Mon, 19 Mar 2018 20:41:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Adding-a-column-from-a-subsearch/m-p/322492#M96294</guid>
      <dc:creator>kamal_jagga</dc:creator>
      <dc:date>2018-03-19T20:41:39Z</dc:date>
    </item>
  </channel>
</rss>

