<?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 Do I Change Append to Multisearch in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-Do-I-Change-Append-to-Multisearch/m-p/234766#M69737</link>
    <description>&lt;P&gt;Hi @woodcock, sincere thanks for this.&lt;/P&gt;

&lt;P&gt;Kind Regards&lt;/P&gt;

&lt;P&gt;Chris&lt;/P&gt;</description>
    <pubDate>Tue, 10 May 2016 08:47:02 GMT</pubDate>
    <dc:creator>IRHM73</dc:creator>
    <dc:date>2016-05-10T08:47:02Z</dc:date>
    <item>
      <title>How Do I Change Append to Multisearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-Do-I-Change-Append-to-Multisearch/m-p/234764#M69735</link>
      <description>&lt;P&gt;Hi, I wonder whether someone may be able to help me please.&lt;/P&gt;

&lt;P&gt;I'm using the following query to create a table in my dashboard:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=main auditSource=frontend auditType=ExitSurvey detail.manageList!="None"
| append [ search index=main "\"auditSource\":\"agent-frontend\"" "\auditType\":\"ExitSurvey\"" manageList NOT auditSource=* 
    | spath 
    | search auditType=ExitSurvey detail.manageList!="None"] 
| replace /agent/survey With "Manage List" 
| contingency tags.path detail.manageList  
| append [search index=main auditSource=agent-frontend auditType=ExitSurvey detail.viewPayments!="None" 
    | append [ search index=main "\"auditSource\":\"agent-frontend\"" "\auditType\":\"ExitSurvey\"" viewPayments NOT auditSource=* 
        | spath 
        | search auditType=ExitSurvey detail.viewPayments!="None"] 
| replace /agent/survey With "View Payments" 
| contingency tags.path detail.viewPayments ] 
| search tags.path!="TOTAL" 
| rename tags.path TO "Question"  
| fields Question, 1, 2, 3, 4, 5 
| addtotals label=Total 
| rename 1 TO "Very Dissatisfied", 2 TO "Dissatisifed", 3 TO "Neither", 4 TO "Satisfied", 5 TO "Very Satisfied"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The query works, but I'm now coming up against the problem of the 50,000 row limit because of the 'append' command.&lt;/P&gt;

&lt;P&gt;I'm now looking to change this and incorporate the 'multisearch' command instead of the 'append'.&lt;/P&gt;

&lt;P&gt;I can get so far a show below, &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| multisearch
[ search index=main auditSource=agent-frontend auditType=ExitSurvey detail.manageList!="None" | replace /agent/survey With "Manage List"]
[ search index=main "\"auditSource\":\"agent-frontend\"" "\auditType\":\"ExitSurvey\"" manageList NOT auditSource=* 
    | spath 
    | search auditType=ExitSurvey detail.manageList!="None"]
[ search index=main auditSource=agent-frontend auditType=ExitSurvey detail.viewPayments!="None" | replace /agent/survey With "View Payments"]
[ search index=main "\"auditSource\":\"agent-frontend\"" "\auditType\":\"ExitSurvey\"" viewPayments NOT auditSource=* 
        | spath 
        | search auditType=ExitSurvey detail.viewPayments!="None"]
| contingency tags.path detail.manageList
| contingency tags.path detail.viewPayments
| search tags.path!="TOTAL" 
| rename tags.path TO "Question"  
| fields Question, 1, 2, 3, 4, 5 
| addtotals label=Total 
| rename 1 TO "Very Dissatisfied", 2 TO "Dissatisifed", 3 TO "Neither", 4 TO "Satisfied", 5 TO "Very Satisfied"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;but the problem I have is with these rows:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| replace.....
| contingency....
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I just wondered whether someone could possible look at this please and offer some guidance on how I may be able to accomplish this.&lt;/P&gt;

&lt;P&gt;Many thanks and kind regards&lt;/P&gt;

&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Mon, 09 May 2016 06:31:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-Do-I-Change-Append-to-Multisearch/m-p/234764#M69735</guid>
      <dc:creator>IRHM73</dc:creator>
      <dc:date>2016-05-09T06:31:26Z</dc:date>
    </item>
    <item>
      <title>Re: How Do I Change Append to Multisearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-Do-I-Change-Append-to-Multisearch/m-p/234765#M69736</link>
      <description>&lt;P&gt;I am not proposing this as something that you should always do but here is a trick that will allow you to switch to  &lt;CODE&gt;multisearch&lt;/CODE&gt; (which is not limited), &lt;CODE&gt;appendpipe&lt;/CODE&gt; (which is not limited) + &lt;CODE&gt;inputlookup&lt;/CODE&gt; (limited to 1000000000) to get out of this problem:&lt;/P&gt;

&lt;P&gt;The first step is to use &lt;CODE&gt;multisearch&lt;/CODE&gt; to save off each dataset to it's own file:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;multisearch
   [ search index=main auditSource=frontend auditType=ExitSurvey detail.manageList!="None"
         | outputcsv MySearchTemp1.csv ]
   [ search index=main "\"auditSource\":\"agent-frontend\"" "\auditType\":\"ExitSurvey\"" manageList NOT auditSource=* 
         | spath 
         | search auditType=ExitSurvey detail.manageList!="None"
         | outputcsv MySearchTemp2.csv ] 
   [ search index=main auditSource=agent-frontend auditType=ExitSurvey detail.viewPayments!="None"
        | outputcsv MySearchTemp3.csv ]
   [ search index=main "\"auditSource\":\"agent-frontend\"" "\auditType\":\"ExitSurvey\"" viewPayments NOT auditSource=* 
        | spath 
        | search auditType=ExitSurvey detail.viewPayments!="None"
        | outputcsv MySearchTemp4.csv ]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Next, we drop all the events:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| where isnotnull(ThisFieldCannotExistSoThisDropsAllEventsSoFar)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Lastly, we pull the data back in with &lt;CODE&gt;inputcsv&lt;/CODE&gt; and switch &lt;CODE&gt;append&lt;/CODE&gt; to &lt;CODE&gt;appendpipe&lt;/CODE&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| appendpipe [ |inputcsv MySearchTemp1.csv ]
| appendpipe [ |inputcsv MySearchTemp2.csv ] 
| replace /agent/survey With "Manage List" 
| contingency tags.path detail.manageList  
| appendpipe [ |inputcsv MySearchTemp3.csv
    | appendpipe [ |inputcsv MySearchTemp4.csv ] 
    | replace /agent/survey With "View Payments" 
    | contingency tags.path detail.viewPayments ] 
| search tags.path!="TOTAL" 
| rename tags.path TO "Question"  
| fields Question, 1, 2, 3, 4, 5 
| addtotals label=Total 
| rename 1 TO "Very Dissatisfied", 2 TO "Dissatisifed", 3 TO "Neither", 4 TO "Satisfied", 5 TO "Very Satisfied"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So long as you are not using a &lt;CODE&gt;multivalued&lt;/CODE&gt; fields, this should work fine for you ( &lt;CODE&gt;outputcsv&lt;/CODE&gt; has the mostly unknown and, until recently undocumented, impact of calling &lt;CODE&gt;nomv&lt;/CODE&gt; on all &lt;CODE&gt;multivalued&lt;/CODE&gt; fields).  If you switch from using files to using a &lt;CODE&gt;KV Store&lt;/CODE&gt;, then this negative side-effect does not happen.&lt;/P&gt;</description>
      <pubDate>Mon, 09 May 2016 15:01:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-Do-I-Change-Append-to-Multisearch/m-p/234765#M69736</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-05-09T15:01:50Z</dc:date>
    </item>
    <item>
      <title>Re: How Do I Change Append to Multisearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-Do-I-Change-Append-to-Multisearch/m-p/234766#M69737</link>
      <description>&lt;P&gt;Hi @woodcock, sincere thanks for this.&lt;/P&gt;

&lt;P&gt;Kind Regards&lt;/P&gt;

&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Tue, 10 May 2016 08:47:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-Do-I-Change-Append-to-Multisearch/m-p/234766#M69737</guid>
      <dc:creator>IRHM73</dc:creator>
      <dc:date>2016-05-10T08:47:02Z</dc:date>
    </item>
    <item>
      <title>Re: How Do I Change Append to Multisearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-Do-I-Change-Append-to-Multisearch/m-p/234767#M69738</link>
      <description>&lt;P&gt;Hi for those of you who may be interested, my colleague came up with an alternative solution.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| multisearch
[ search index=main auditSource=agent-frontend auditType=ExitSurvey detail.manageList!="None"
  | eval Question="Managed List"
  | rename detail.manageList as rating
  | fields Question rating]
[ search index=main "\"auditSource\":\"agent-frontend\"" "\auditType\":\"ExitSurvey\"" manageList NOT auditSource=* 
  | spath 
  | search auditType=ExitSurvey detail.manageList!="None"
  | eval Question="Managed List"
  | rename detail.manageList as rating
  | fields Question rating]
[ search index=main auditSource=agent-frontend auditType=ExitSurvey detail.viewPayments!="None"
  | eval Question="View Payments"
  | rename detail.viewPayments as rating
  | fields Question rating]
[ search index=main "\"auditSource\":\"agent-frontend\"" "\auditType\":\"ExitSurvey\"" viewPayments NOT auditSource=* 
   | spath 
   | search detail.viewPayments!="None"
   | eval Question="View Payments"
   | rename detail.viewPayments as rating
   | fields Question rating]
| stats count by Question rating
| xyseries Question rating count
| rename 1 TO "Very Dissatisfied", 2 TO "Dissatisifed", 3 TO "Neither", 4 TO "Satisfied", 5 TO "Very Satisfied"
| addtotals
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Regards&lt;/P&gt;

&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Tue, 10 May 2016 15:18:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-Do-I-Change-Append-to-Multisearch/m-p/234767#M69738</guid>
      <dc:creator>IRHM73</dc:creator>
      <dc:date>2016-05-10T15:18:59Z</dc:date>
    </item>
    <item>
      <title>Re: How Do I Change Append to Multisearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-Do-I-Change-Append-to-Multisearch/m-p/234768#M69739</link>
      <description>&lt;P&gt;Keep in mind, that I am by no means saying that this is the best approach to do whatever it is that you are trying to do.  I answered your question very literally, without considering your end goal and whether there is a smarter/better approach to use.  The truth is that I have been looking for an opportunity to disclose this approach and your question was the perfect occasion.&lt;/P&gt;</description>
      <pubDate>Tue, 10 May 2016 15:22:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-Do-I-Change-Append-to-Multisearch/m-p/234768#M69739</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-05-10T15:22:10Z</dc:date>
    </item>
    <item>
      <title>Re: How Do I Change Append to Multisearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-Do-I-Change-Append-to-Multisearch/m-p/234769#M69740</link>
      <description>&lt;P&gt;No @woodcock, forgive me, your solution was great because it helps build my capability, so I wasn't knocking it any way.&lt;/P&gt;

&lt;P&gt;Kind Regards&lt;/P&gt;

&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Tue, 10 May 2016 15:24:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-Do-I-Change-Append-to-Multisearch/m-p/234769#M69740</guid>
      <dc:creator>IRHM73</dc:creator>
      <dc:date>2016-05-10T15:24:38Z</dc:date>
    </item>
  </channel>
</rss>

