<?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 merging two search strings in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/merging-two-search-strings/m-p/86738#M22122</link>
    <description>&lt;P&gt;I have two search string:&lt;BR /&gt;
index=os source=Perfmon:LocalMainMemory &lt;BR /&gt;
| where like(counter,"% Committed Bytes In Use")&lt;BR /&gt;
| stats avg(Value) as "avgMemPct", max(Value) as "peakMemPct" by host&lt;/P&gt;

&lt;P&gt;index=os sourcetype=Perfmon:LocalProcessor &lt;BR /&gt;
    | where like(counter,"% Processor Time")&lt;BR /&gt;
    | stats avg(Value) as "avgCpuPct", max(Value) as "peakCpuPct" by host&lt;/P&gt;

&lt;P&gt;How to merge these two with out using JOIN. We can use OR.&lt;BR /&gt;
I have tried &lt;BR /&gt;
index=os source=Perfmon:LocalMainMemory OR sourcetype=Perfmon:LocalProcessor &lt;BR /&gt;
| where like(counter,"% Committed Bytes In Use")&lt;BR /&gt;
| where like(counter,"% Processor Time")&lt;BR /&gt;
| stats avg(Value) as "avgMemPct", max(Value) as "peakMemPct" avg(Value1) as "avgCpuPct", max(Value1) as "peakCpuPct" by host&lt;/P&gt;

&lt;P&gt;But is it not giving any value. Looks like I cannot use Value1. Can anyone help me!!&lt;/P&gt;</description>
    <pubDate>Mon, 14 Jan 2013 19:37:52 GMT</pubDate>
    <dc:creator>Splunk_U</dc:creator>
    <dc:date>2013-01-14T19:37:52Z</dc:date>
    <item>
      <title>merging two search strings</title>
      <link>https://community.splunk.com/t5/Splunk-Search/merging-two-search-strings/m-p/86738#M22122</link>
      <description>&lt;P&gt;I have two search string:&lt;BR /&gt;
index=os source=Perfmon:LocalMainMemory &lt;BR /&gt;
| where like(counter,"% Committed Bytes In Use")&lt;BR /&gt;
| stats avg(Value) as "avgMemPct", max(Value) as "peakMemPct" by host&lt;/P&gt;

&lt;P&gt;index=os sourcetype=Perfmon:LocalProcessor &lt;BR /&gt;
    | where like(counter,"% Processor Time")&lt;BR /&gt;
    | stats avg(Value) as "avgCpuPct", max(Value) as "peakCpuPct" by host&lt;/P&gt;

&lt;P&gt;How to merge these two with out using JOIN. We can use OR.&lt;BR /&gt;
I have tried &lt;BR /&gt;
index=os source=Perfmon:LocalMainMemory OR sourcetype=Perfmon:LocalProcessor &lt;BR /&gt;
| where like(counter,"% Committed Bytes In Use")&lt;BR /&gt;
| where like(counter,"% Processor Time")&lt;BR /&gt;
| stats avg(Value) as "avgMemPct", max(Value) as "peakMemPct" avg(Value1) as "avgCpuPct", max(Value1) as "peakCpuPct" by host&lt;/P&gt;

&lt;P&gt;But is it not giving any value. Looks like I cannot use Value1. Can anyone help me!!&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jan 2013 19:37:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/merging-two-search-strings/m-p/86738#M22122</guid>
      <dc:creator>Splunk_U</dc:creator>
      <dc:date>2013-01-14T19:37:52Z</dc:date>
    </item>
    <item>
      <title>Re: merging two search strings</title>
      <link>https://community.splunk.com/t5/Splunk-Search/merging-two-search-strings/m-p/86739#M22123</link>
      <description>&lt;P&gt;That will not work. The first 'where' will filter out all but events with 'committed bytes', and the second will filter out all events but those that have 'processor time'. which will be none. &lt;/P&gt;

&lt;P&gt;Try doing something like this instead;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=x sourcetype=y OR sourcetype=z counter="*Processor Time" OR counter = "*Committed bytes*" | stats avg(Value) max(Value) by counter, host
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hope this helps,&lt;/P&gt;

&lt;P&gt;Kristian&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jan 2013 22:06:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/merging-two-search-strings/m-p/86739#M22123</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2013-01-14T22:06:12Z</dc:date>
    </item>
    <item>
      <title>Re: merging two search strings</title>
      <link>https://community.splunk.com/t5/Splunk-Search/merging-two-search-strings/m-p/86740#M22124</link>
      <description>&lt;P&gt;So is there no way of merging these two strings with OR..rght??&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jan 2013 22:19:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/merging-two-search-strings/m-p/86740#M22124</guid>
      <dc:creator>Splunk_U</dc:creator>
      <dc:date>2013-01-14T22:19:00Z</dc:date>
    </item>
    <item>
      <title>Re: merging two search strings</title>
      <link>https://community.splunk.com/t5/Splunk-Search/merging-two-search-strings/m-p/86741#M22125</link>
      <description>&lt;P&gt;Did you even try the suggestion? How do you 'read' the search? What does it do? OR?&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jan 2013 07:44:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/merging-two-search-strings/m-p/86741#M22125</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2013-01-15T07:44:25Z</dc:date>
    </item>
    <item>
      <title>Re: merging two search strings</title>
      <link>https://community.splunk.com/t5/Splunk-Search/merging-two-search-strings/m-p/86742#M22126</link>
      <description>&lt;P&gt;I have also tried:&lt;BR /&gt;
index=os source=Perfmon:LocalMainMemory OR sourcetype=Perfmon:LocalProcessor &lt;BR /&gt;
| where like(counter,"% Committed Bytes In Use")&lt;BR /&gt;
| eval CommittedBytes=Value&lt;BR /&gt;
| where like(counter,"% Processor Time")&lt;BR /&gt;
| eval ProcessorTime=Value&lt;BR /&gt;
| stats avg(CommittedBytes) as "avgMemPct", max(CommittedBytes) as "peakMemPct" avg(ProcessorTime) as "avgCpuPct", max(ProcessorTime) as "peakCpuPct" by host but not working&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jan 2013 13:35:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/merging-two-search-strings/m-p/86742#M22126</guid>
      <dc:creator>Splunk_U</dc:creator>
      <dc:date>2013-01-15T13:35:16Z</dc:date>
    </item>
    <item>
      <title>Re: merging two search strings</title>
      <link>https://community.splunk.com/t5/Splunk-Search/merging-two-search-strings/m-p/86743#M22127</link>
      <description>&lt;P&gt;Kristian.. I have tried with your suggestion but it is giving the data in the format I want it to be. I need the data should come one row per host.It is not providing that&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jan 2013 21:02:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/merging-two-search-strings/m-p/86743#M22127</guid>
      <dc:creator>Splunk_U</dc:creator>
      <dc:date>2013-01-15T21:02:04Z</dc:date>
    </item>
    <item>
      <title>Re: merging two search strings</title>
      <link>https://community.splunk.com/t5/Splunk-Search/merging-two-search-strings/m-p/86744#M22128</link>
      <description>&lt;P&gt;Then have a look at the &lt;CODE&gt;chart&lt;/CODE&gt; command.&lt;/P&gt;

&lt;P&gt;With 'chart blah blah over X by Y', you get the results on different axes.. axis? axises??&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jan 2013 22:44:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/merging-two-search-strings/m-p/86744#M22128</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2013-01-15T22:44:19Z</dc:date>
    </item>
  </channel>
</rss>

