<?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: How Can I Save Three Count Searches Separated And Then Use Them Together Later? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-Can-I-Save-Three-Count-Searches-Separated-And-Then-Use-Them/m-p/158079#M44552</link>
    <description>&lt;P&gt;Got it, still don't know how to do it altough...&lt;BR /&gt;
I can't do it via LookUp cuz of data amount is too high...&lt;BR /&gt;
How would I create this new index mixing variables?&lt;BR /&gt;
For example, I have Channel in index=A and ch in index=B, both acctually represent the same field same values but different indexes...&lt;BR /&gt;
Sorry, I never used a subquery or saved search, how should I do that? Do I need to upload a new file or I use all searches in the same place?&lt;BR /&gt;
Thanks in advance @yannK&lt;/P&gt;</description>
    <pubDate>Fri, 10 Oct 2014 17:35:02 GMT</pubDate>
    <dc:creator>vtsguerrero</dc:creator>
    <dc:date>2014-10-10T17:35:02Z</dc:date>
    <item>
      <title>How Can I Save Three Count Searches Separated And Then Use Them Together Later?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-Can-I-Save-Three-Count-Searches-Separated-And-Then-Use-Them/m-p/158075#M44548</link>
      <description>&lt;P&gt;I have some conditions for each search as follows:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Search A&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=users Channel=40 
| eval Token = User."-".Channel
| stats count by Token
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;Search B&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=mobile Code=5 OR Code=3 AND Mobile=1 OR Mobile=2
| stats count by Connection
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;Search C&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=mobile Code=5 OR Code=3 AND Mobile=5 OR Mobile=3 channel=*
| eval Token = user."-".channel
| stats count by Token
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Should I save those counts separated? How can I do that...&lt;BR /&gt;
My main table should show:&lt;/P&gt;

&lt;P&gt;Search A count&lt;BR /&gt;
Search B count&lt;BR /&gt;
Search C count&lt;BR /&gt;
Search A + Search B count&lt;BR /&gt;
Search A + Search C count&lt;BR /&gt;
Search B + Search C count &lt;BR /&gt;
Search A + Search B + Search C count&lt;/P&gt;

&lt;P&gt;It's like 3 queries inside one main query, but counts are different...&lt;BR /&gt;
Note that in Search A Channel has an Upper case and in Search C it's lower case...&lt;/P&gt;</description>
      <pubDate>Thu, 09 Oct 2014 17:56:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-Can-I-Save-Three-Count-Searches-Separated-And-Then-Use-Them/m-p/158075#M44548</guid>
      <dc:creator>vtsguerrero</dc:creator>
      <dc:date>2014-10-09T17:56:20Z</dc:date>
    </item>
    <item>
      <title>Re: How Can I Save Three Count Searches Separated And Then Use Them Together Later?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-Can-I-Save-Three-Count-Searches-Separated-And-Then-Use-Them/m-p/158076#M44549</link>
      <description>&lt;P&gt;I have three searches and two indexes, is it possible, to make a dashboard that counts groupped stats over them?&lt;/P&gt;</description>
      <pubDate>Thu, 09 Oct 2014 19:30:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-Can-I-Save-Three-Count-Searches-Separated-And-Then-Use-Them/m-p/158076#M44549</guid>
      <dc:creator>vtsguerrero</dc:creator>
      <dc:date>2014-10-09T19:30:13Z</dc:date>
    </item>
    <item>
      <title>Re: How Can I Save Three Count Searches Separated And Then Use Them Together Later?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-Can-I-Save-Three-Count-Searches-Separated-And-Then-Use-Them/m-p/158077#M44550</link>
      <description>&lt;P&gt;Have you tried using subsearches and the append or appendcols searchcommand?&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Appendcols"&gt;Appendcols&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Oct 2014 08:03:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-Can-I-Save-Three-Count-Searches-Separated-And-Then-Use-Them/m-p/158077#M44550</guid>
      <dc:creator>tom_frotscher</dc:creator>
      <dc:date>2014-10-10T08:03:17Z</dc:date>
    </item>
    <item>
      <title>Re: How Can I Save Three Count Searches Separated And Then Use Them Together Later?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-Can-I-Save-Three-Count-Searches-Separated-And-Then-Use-Them/m-p/158078#M44551</link>
      <description>&lt;P&gt;another approach is to run 3 searches and to save the results with a summary indexing or an outputlookup command.&lt;BR /&gt;
then run a 4rd search retrieving the results from each of them (summary search, or inputlookup with appendcols/append)&lt;BR /&gt;
Do not forget to add an extra column to your results for the value A/B/C to distinguish them&lt;/P&gt;</description>
      <pubDate>Fri, 10 Oct 2014 15:10:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-Can-I-Save-Three-Count-Searches-Separated-And-Then-Use-Them/m-p/158078#M44551</guid>
      <dc:creator>yannK</dc:creator>
      <dc:date>2014-10-10T15:10:27Z</dc:date>
    </item>
    <item>
      <title>Re: How Can I Save Three Count Searches Separated And Then Use Them Together Later?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-Can-I-Save-Three-Count-Searches-Separated-And-Then-Use-Them/m-p/158079#M44552</link>
      <description>&lt;P&gt;Got it, still don't know how to do it altough...&lt;BR /&gt;
I can't do it via LookUp cuz of data amount is too high...&lt;BR /&gt;
How would I create this new index mixing variables?&lt;BR /&gt;
For example, I have Channel in index=A and ch in index=B, both acctually represent the same field same values but different indexes...&lt;BR /&gt;
Sorry, I never used a subquery or saved search, how should I do that? Do I need to upload a new file or I use all searches in the same place?&lt;BR /&gt;
Thanks in advance @yannK&lt;/P&gt;</description>
      <pubDate>Fri, 10 Oct 2014 17:35:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-Can-I-Save-Three-Count-Searches-Separated-And-Then-Use-Them/m-p/158079#M44552</guid>
      <dc:creator>vtsguerrero</dc:creator>
      <dc:date>2014-10-10T17:35:02Z</dc:date>
    </item>
    <item>
      <title>Re: How Can I Save Three Count Searches Separated And Then Use Them Together Later?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-Can-I-Save-Three-Count-Searches-Separated-And-Then-Use-Them/m-p/158080#M44553</link>
      <description>&lt;P&gt;Here are the docs for subsearches&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.1.4/Search/Usesubsearchtocorrelateevents"&gt;http://docs.splunk.com/Documentation/Splunk/6.1.4/Search/Usesubsearchtocorrelateevents&lt;/A&gt;&lt;BR /&gt;
Remember that they are limited to 10000 lines of result.&lt;/P&gt;

&lt;P&gt;and for the lookups as a temporary storage&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.1.4/SearchReference/Outputlookup"&gt;http://docs.splunk.com/Documentation/Splunk/6.1.4/SearchReference/Outputlookup&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.1.4/SearchReference/Inputlookup"&gt;http://docs.splunk.com/Documentation/Splunk/6.1.4/SearchReference/Inputlookup&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Oct 2014 17:49:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-Can-I-Save-Three-Count-Searches-Separated-And-Then-Use-Them/m-p/158080#M44553</guid>
      <dc:creator>yannK</dc:creator>
      <dc:date>2014-10-10T17:49:45Z</dc:date>
    </item>
    <item>
      <title>Re: How Can I Save Three Count Searches Separated And Then Use Them Together Later?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-Can-I-Save-Three-Count-Searches-Separated-And-Then-Use-Them/m-p/158081#M44554</link>
      <description>&lt;P&gt;How can I make this subsearch test work?&lt;BR /&gt;
I wanna make these fields the same or table'em together to start...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="mobile" channel=* account=* 
[search index="main" Channel=* Account=*]
| table channel account Channel Account
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 10 Oct 2014 18:58:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-Can-I-Save-Three-Count-Searches-Separated-And-Then-Use-Them/m-p/158081#M44554</guid>
      <dc:creator>vtsguerrero</dc:creator>
      <dc:date>2014-10-10T18:58:53Z</dc:date>
    </item>
    <item>
      <title>Re: How Can I Save Three Count Searches Separated And Then Use Them Together Later?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-Can-I-Save-Three-Count-Searches-Separated-And-Then-Use-Them/m-p/158082#M44555</link>
      <description>&lt;P&gt;Should I use a kind of JOIN for this operation? Or do you think it's possible to make the whole search for all indexes just using subsearches?&lt;BR /&gt;
I think a lookup for this search won't be possible cuz of the amount of data...&lt;BR /&gt;
But, after I create a new index, summarized based on two indexes, how do I fill what data I want inside this new index coming from other previous two indexes...&lt;/P&gt;</description>
      <pubDate>Fri, 10 Oct 2014 19:46:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-Can-I-Save-Three-Count-Searches-Separated-And-Then-Use-Them/m-p/158082#M44555</guid>
      <dc:creator>vtsguerrero</dc:creator>
      <dc:date>2014-10-10T19:46:45Z</dc:date>
    </item>
    <item>
      <title>Re: How Can I Save Three Count Searches Separated And Then Use Them Together Later?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-Can-I-Save-Three-Count-Searches-Separated-And-Then-Use-Them/m-p/158083#M44556</link>
      <description>&lt;P&gt;Not really, to append a sub search use&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index="mobile" channel=* account=* 
| append [search index="main" Channel=* Account=*]
| table channel account Channel Account
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you want to group with a join on the channel and account&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index="mobile" channel=* account=* 
| join Channel Account [search index="main" Channel=* Account=* ]
| table channel account Channel Account
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Remember the 10000 limit, a better solution is to do the stats in the subsearch before&lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;But If all that you want is to get all the results in a single search, try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;( index="mobile" channel=* account=* ) OR ( index="main" Channel=* Account=*) | stats count by Token index
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 10 Oct 2014 20:19:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-Can-I-Save-Three-Count-Searches-Separated-And-Then-Use-Them/m-p/158083#M44556</guid>
      <dc:creator>yannK</dc:creator>
      <dc:date>2014-10-10T20:19:34Z</dc:date>
    </item>
    <item>
      <title>Re: How Can I Save Three Count Searches Separated And Then Use Them Together Later?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-Can-I-Save-Three-Count-Searches-Separated-And-Then-Use-Them/m-p/158084#M44557</link>
      <description>&lt;P&gt;But In this case, will channel and account fields work as the same fields for both indexes? Considering that one is Uppercase and the other one is Lowercase, I should convert'em into a new field for a new index for example?&lt;BR /&gt;
Thanks for the explanation @yannK&lt;/P&gt;</description>
      <pubDate>Mon, 13 Oct 2014 12:28:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-Can-I-Save-Three-Count-Searches-Separated-And-Then-Use-Them/m-p/158084#M44557</guid>
      <dc:creator>vtsguerrero</dc:creator>
      <dc:date>2014-10-13T12:28:57Z</dc:date>
    </item>
    <item>
      <title>Re: How Can I Save Three Count Searches Separated And Then Use Them Together Later?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-Can-I-Save-Three-Count-Searches-Separated-And-Then-Use-Them/m-p/158085#M44558</link>
      <description>&lt;P&gt;Yes, the field names are case sensitive.&lt;BR /&gt;
So you could rename them and maybe add a detail on the origin, or normalize them and made the sum&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index="mobile" channel=* account=* | eval Channel_Mobile=channel | eval Account_Mobile=account 
 | append [search index="main" Channel=* Account=* | eval Channel_Main=Channel | eval Account_Main=Account ]
 | table Channel* Account*
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 13 Oct 2014 16:24:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-Can-I-Save-Three-Count-Searches-Separated-And-Then-Use-Them/m-p/158085#M44558</guid>
      <dc:creator>yannK</dc:creator>
      <dc:date>2014-10-13T16:24:17Z</dc:date>
    </item>
  </channel>
</rss>

