<?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 how to use UNION for 4 counter types in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/how-to-use-UNION-for-4-counter-types/m-p/170118#M186305</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have 4 counters with the following name for the performance monitor of the system-&lt;/P&gt;

&lt;P&gt;1.) Avg. Disk sec/Read&lt;BR /&gt;
2.) Avg. Disk sec/Write&lt;BR /&gt;
3.) Disk Reads/sec&lt;BR /&gt;
4.) Disk Writes/sec&lt;/P&gt;

&lt;P&gt;I want to see all above counters in one query in either bars or graphs so for that I am making my query like given below but it is not working. Kindly suggest where I am doing wrong?&lt;/P&gt;

&lt;P&gt;|set union [search index=sc-perfmon counter="Avg. Disk sec/Read"| timechart avg(Value) by host] [ search index=sc-perfmon counter="Avg. Disk sec/Write" | timechart avg(Value) by host] [search index=sc-perfmon counter="Disk Reads/sec" | timechart avg(Value) by host] [search index=sc-perfmon counter="Disk Writes/sec" | timechart avg(Value) by host]&lt;/P&gt;

&lt;P&gt;Thanks&lt;BR /&gt;
Ankit&lt;/P&gt;</description>
    <pubDate>Tue, 23 Jun 2015 07:18:02 GMT</pubDate>
    <dc:creator>sunnyparmar</dc:creator>
    <dc:date>2015-06-23T07:18:02Z</dc:date>
    <item>
      <title>how to use UNION for 4 counter types</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-use-UNION-for-4-counter-types/m-p/170118#M186305</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have 4 counters with the following name for the performance monitor of the system-&lt;/P&gt;

&lt;P&gt;1.) Avg. Disk sec/Read&lt;BR /&gt;
2.) Avg. Disk sec/Write&lt;BR /&gt;
3.) Disk Reads/sec&lt;BR /&gt;
4.) Disk Writes/sec&lt;/P&gt;

&lt;P&gt;I want to see all above counters in one query in either bars or graphs so for that I am making my query like given below but it is not working. Kindly suggest where I am doing wrong?&lt;/P&gt;

&lt;P&gt;|set union [search index=sc-perfmon counter="Avg. Disk sec/Read"| timechart avg(Value) by host] [ search index=sc-perfmon counter="Avg. Disk sec/Write" | timechart avg(Value) by host] [search index=sc-perfmon counter="Disk Reads/sec" | timechart avg(Value) by host] [search index=sc-perfmon counter="Disk Writes/sec" | timechart avg(Value) by host]&lt;/P&gt;

&lt;P&gt;Thanks&lt;BR /&gt;
Ankit&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jun 2015 07:18:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-use-UNION-for-4-counter-types/m-p/170118#M186305</guid>
      <dc:creator>sunnyparmar</dc:creator>
      <dc:date>2015-06-23T07:18:02Z</dc:date>
    </item>
    <item>
      <title>Re: how to use UNION for 4 counter types</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-use-UNION-for-4-counter-types/m-p/170119#M186306</link>
      <description>&lt;P&gt;Can you try 'append' and check if it works.&lt;BR /&gt;
|set union [search index=sc-perfmon counter="Avg. Disk sec/Read"| timechart avg(Value) by host] [ &lt;STRONG&gt;append&lt;/STRONG&gt; search index=sc-perfmon counter="Avg. Disk sec/Write" | timechart avg(Value) by host] [ &lt;STRONG&gt;append&lt;/STRONG&gt; search index=sc-perfmon counter="Disk Reads/sec" | timechart avg(Value) by host] [ &lt;STRONG&gt;append&lt;/STRONG&gt; search index=sc-perfmon counter="Disk Writes/sec" | timechart avg(Value) by host]&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jun 2015 08:17:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-use-UNION-for-4-counter-types/m-p/170119#M186306</guid>
      <dc:creator>vinitatsky</dc:creator>
      <dc:date>2015-06-23T08:17:23Z</dc:date>
    </item>
    <item>
      <title>Re: how to use UNION for 4 counter types</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-use-UNION-for-4-counter-types/m-p/170120#M186307</link>
      <description>&lt;P&gt;Just append and not &lt;STRONG&gt;append&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jun 2015 08:17:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-use-UNION-for-4-counter-types/m-p/170120#M186307</guid>
      <dc:creator>vinitatsky</dc:creator>
      <dc:date>2015-06-23T08:17:52Z</dc:date>
    </item>
    <item>
      <title>Re: how to use UNION for 4 counter types</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-use-UNION-for-4-counter-types/m-p/170121#M186308</link>
      <description>&lt;P&gt;Thanks for the reply..I have tried but it is giving below error ..&lt;/P&gt;

&lt;P&gt;Error in 'append' command: The last argument must be a subsearch. &lt;/P&gt;</description>
      <pubDate>Tue, 23 Jun 2015 08:22:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-use-UNION-for-4-counter-types/m-p/170121#M186308</guid>
      <dc:creator>sunnyparmar</dc:creator>
      <dc:date>2015-06-23T08:22:57Z</dc:date>
    </item>
    <item>
      <title>Re: how to use UNION for 4 counter types</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-use-UNION-for-4-counter-types/m-p/170122#M186309</link>
      <description>&lt;P&gt;Can you try -  remove 'union' and use 'append'.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jun 2015 08:28:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-use-UNION-for-4-counter-types/m-p/170122#M186309</guid>
      <dc:creator>vinitatsky</dc:creator>
      <dc:date>2015-06-23T08:28:19Z</dc:date>
    </item>
    <item>
      <title>Re: how to use UNION for 4 counter types</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-use-UNION-for-4-counter-types/m-p/170123#M186310</link>
      <description>&lt;P&gt;After removing of union is it the right format for the command given below?&lt;/P&gt;

&lt;P&gt;[append search index=sc-perfmon counter="Avg. Disk sec/Read"| timechart avg(Value) by host] [ append search index=sc-perfmon counter="Avg. Disk sec/Write" | timechart avg(Value) by host]&lt;BR /&gt;
[append search index=sc-perfmon counter="Disk Reads/sec" | timechart avg(Value) by host] [append search index=sc-perfmon counter="Disk Writes/sec" | timechart avg(Value) by host]&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jun 2015 08:33:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-use-UNION-for-4-counter-types/m-p/170123#M186310</guid>
      <dc:creator>sunnyparmar</dc:creator>
      <dc:date>2015-06-23T08:33:12Z</dc:date>
    </item>
    <item>
      <title>Re: how to use UNION for 4 counter types</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-use-UNION-for-4-counter-types/m-p/170124#M186311</link>
      <description>&lt;P&gt;[search index=sc-perfmon counter="Avg. Disk sec/Read"| timechart avg(Value) by host] append [search index=sc-perfmon counter="Avg. Disk sec/Write" | timechart avg(Value) by host]&lt;BR /&gt;
append [search index=sc-perfmon counter="Disk Reads/sec" | timechart avg(Value) by host] append [search index=sc-perfmon counter="Disk Writes/sec" | timechart avg(Value) by host]&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jun 2015 08:44:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-use-UNION-for-4-counter-types/m-p/170124#M186311</guid>
      <dc:creator>vinitatsky</dc:creator>
      <dc:date>2015-06-23T08:44:41Z</dc:date>
    </item>
    <item>
      <title>Re: how to use UNION for 4 counter types</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-use-UNION-for-4-counter-types/m-p/170125#M186312</link>
      <description>&lt;P&gt;Thanks for replying but it is showing no result found &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jun 2015 09:05:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-use-UNION-for-4-counter-types/m-p/170125#M186312</guid>
      <dc:creator>sunnyparmar</dc:creator>
      <dc:date>2015-06-23T09:05:26Z</dc:date>
    </item>
    <item>
      <title>Re: how to use UNION for 4 counter types</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-use-UNION-for-4-counter-types/m-p/170126#M186313</link>
      <description>&lt;P&gt;When I am running these counters in separate queries then it is showing result. Queries are -&lt;/P&gt;

&lt;P&gt;1.) index=sc-perfmon (counter="Avg. Disk sec/Read" OR counter="Avg. Disk sec/Write" ) host=BWIN7136 | timechart avg(Value) by counter&lt;/P&gt;

&lt;P&gt;2.) index=sc-perfmon (counter="Disk Reads/sec" OR counter="Disk Writes/sec" ) host=BWIN7136  | timechart avg(Value) by counter&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jun 2015 09:07:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-use-UNION-for-4-counter-types/m-p/170126#M186313</guid>
      <dc:creator>sunnyparmar</dc:creator>
      <dc:date>2015-06-23T09:07:52Z</dc:date>
    </item>
    <item>
      <title>Re: how to use UNION for 4 counter types</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-use-UNION-for-4-counter-types/m-p/170127#M186314</link>
      <description>&lt;P&gt;Sorry. My mistake. Can you please try using appendcols, instead of append and I hope it works.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jun 2015 09:16:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-use-UNION-for-4-counter-types/m-p/170127#M186314</guid>
      <dc:creator>vinitatsky</dc:creator>
      <dc:date>2015-06-23T09:16:18Z</dc:date>
    </item>
    <item>
      <title>Re: how to use UNION for 4 counter types</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-use-UNION-for-4-counter-types/m-p/170128#M186315</link>
      <description>&lt;P&gt;still showing the same result (no result found)..&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jun 2015 09:54:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-use-UNION-for-4-counter-types/m-p/170128#M186315</guid>
      <dc:creator>sunnyparmar</dc:creator>
      <dc:date>2015-06-23T09:54:18Z</dc:date>
    </item>
    <item>
      <title>Re: how to use UNION for 4 counter types</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-use-UNION-for-4-counter-types/m-p/170129#M186316</link>
      <description>&lt;P&gt;index=sc-perfmon counter="Avg. Disk sec/Read" OR counter="Avg. Disk sec/Write" OR counter="Disk Reads/sec" OR counter="Disk Writes/sec" | chart avg(Value) over _time by counter&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jun 2015 11:06:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-use-UNION-for-4-counter-types/m-p/170129#M186316</guid>
      <dc:creator>vinitatsky</dc:creator>
      <dc:date>2015-06-23T11:06:39Z</dc:date>
    </item>
    <item>
      <title>Re: how to use UNION for 4 counter types</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-use-UNION-for-4-counter-types/m-p/170130#M186317</link>
      <description>&lt;P&gt;it works.. thanks a lot...&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jun 2015 11:15:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-use-UNION-for-4-counter-types/m-p/170130#M186317</guid>
      <dc:creator>sunnyparmar</dc:creator>
      <dc:date>2015-06-23T11:15:49Z</dc:date>
    </item>
  </channel>
</rss>

