<?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: This saved search cannot perform summary indexing because it has a malformed search. in Reporting</title>
    <link>https://community.splunk.com/t5/Reporting/This-saved-search-cannot-perform-summary-indexing-because-it-has/m-p/298274#M5488</link>
    <description>&lt;P&gt;Well, I solved my issues by just keeping at it.&lt;BR /&gt;
So, I'm migrating searches from one splunk to another, and this one ain't mine, so it took me a while to wrap my head around what it's doing.&lt;BR /&gt;
I'm not sure why splunk has changed it's mind about this, but now that I've found the issue, I'm inclined to agree.&lt;BR /&gt;
The middle section with eval QUERY = [subsearch] exists to take a bunch of entries in a table and build a regex of pipes to OR the text.  A simple &lt;BR /&gt;
| search NOT [ subsearch outputting fields using the matching fieldname] works to do exactly that, without regex.  IFF the entries included regex I gues I would have needed to do a new field and make sure the entries don't match the table's entries, which would make it slightly more complex, but the issue appears to have been simply a weird way of doing things.&lt;/P&gt;

&lt;P&gt;Hoorah for migrating other people's stuff.&lt;/P&gt;</description>
    <pubDate>Wed, 24 Jul 2019 06:59:49 GMT</pubDate>
    <dc:creator>alisterwhipp</dc:creator>
    <dc:date>2019-07-24T06:59:49Z</dc:date>
    <item>
      <title>This saved search cannot perform summary indexing because it has a malformed search.</title>
      <link>https://community.splunk.com/t5/Reporting/This-saved-search-cannot-perform-summary-indexing-because-it-has/m-p/298270#M5484</link>
      <description>&lt;P&gt;I am trying to edit Summary Index for the scheduled search.  I am getting the following error message:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;This saved search cannot perform summary indexing because it has a malformed search.&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;There are no problems with the search as I can run it manually without issues. &lt;/P&gt;

&lt;P&gt;Has anyone else experienced the same error message?&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2017 16:53:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/This-saved-search-cannot-perform-summary-indexing-because-it-has/m-p/298270#M5484</guid>
      <dc:creator>kiril123</dc:creator>
      <dc:date>2017-10-05T16:53:31Z</dc:date>
    </item>
    <item>
      <title>Re: This saved search cannot perform summary indexing because it has a malformed search.</title>
      <link>https://community.splunk.com/t5/Reporting/This-saved-search-cannot-perform-summary-indexing-because-it-has/m-p/298271#M5485</link>
      <description>&lt;P&gt;Would you mind copy paste the search (with the code formatting of answers post).&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2017 20:33:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/This-saved-search-cannot-perform-summary-indexing-because-it-has/m-p/298271#M5485</guid>
      <dc:creator>yannK</dc:creator>
      <dc:date>2017-10-05T20:33:01Z</dc:date>
    </item>
    <item>
      <title>Re: This saved search cannot perform summary indexing because it has a malformed search.</title>
      <link>https://community.splunk.com/t5/Reporting/This-saved-search-cannot-perform-summary-indexing-because-it-has/m-p/298272#M5486</link>
      <description>&lt;P&gt;Mostly you are trying to use macros or other knowledge objects which are not shared in search app , please expand the macros or give them share permission and try to save it again. I had exactly same issue.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Oct 2017 10:45:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/This-saved-search-cannot-perform-summary-indexing-because-it-has/m-p/298272#M5486</guid>
      <dc:creator>kunalmao</dc:creator>
      <dc:date>2017-10-18T10:45:30Z</dc:date>
    </item>
    <item>
      <title>Re: This saved search cannot perform summary indexing because it has a malformed search.</title>
      <link>https://community.splunk.com/t5/Reporting/This-saved-search-cannot-perform-summary-indexing-because-it-has/m-p/298273#M5487</link>
      <description>&lt;P&gt;I've tested every lookup used in my search, still getting the error.  Not using any macros.  &lt;/P&gt;

&lt;P&gt;My lookups were tested by first double checking all the permissions, they're all set to global and read for anyone.  But to double check other non-obvious issues, I removed them one at a time.  My search is still malformed.&lt;/P&gt;

&lt;P&gt;I have some subsearches (both are used to pull in lookup tables) and I tried removing those as well.&lt;/P&gt;

&lt;P&gt;Search that's repeatedly reported as malformed is&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=idp-thing OR (sourcetype=other-idp AND application!=dns) OR host=yet-more-idp OR sourcetype=ddos-thing
| eval src_ip=coalesce(src,src_ip), dest_ip=coalesce(dst,dest_ip)
| search NOT [|inputlookup AUTHORISED-VULN-SCANNERS.csv | table SUBNET | rename SUBNET as src_ip] 
| eval ATTACK_TYPE=coalesce(msg,attack,attack_name,attackname,threat,EventName)
| eval QUERY =  [ | inputlookup IDP-IGNORE.csv 
                | eval ATTACKSRCH=ATTACK."|" 
                | stats values(ATTACK) as ATTACK 
                | mvcombine delim="|" ATTACK 
                | rex mode=sed field=ATTACK "s/\| /|/g" 
                | rex mode=sed field=ATTACK "s/\|$//g" 
                | eval QUERY="\"(".ATTACK.")\"" 
                | return $QUERY
              ]

| where !match(ATTACK_TYPE, QUERY)
| lookup agencyiplookup SUBNET as src_ip OUTPUT CLIENT as SRCORG
| search SRCORG="UNKNOWN" 
| lookup agencyiplookup SUBNET as dest_ip OUTPUT CLIENT as ORG
| sistats count(src_ip) as COUNT, values(ATTACK_TYPE) as ATTACKS by src_ip, ORG
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Sourcetypes etc mildly sanitized.&lt;/P&gt;

&lt;P&gt;And...&lt;/P&gt;

&lt;P&gt;This is a search I'm migrating from one splunk system (7.2.3) to a newer splunk system (7.3.0) and not having it work is a tad frustrating.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jul 2019 06:04:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/This-saved-search-cannot-perform-summary-indexing-because-it-has/m-p/298273#M5487</guid>
      <dc:creator>alisterwhipp</dc:creator>
      <dc:date>2019-07-23T06:04:24Z</dc:date>
    </item>
    <item>
      <title>Re: This saved search cannot perform summary indexing because it has a malformed search.</title>
      <link>https://community.splunk.com/t5/Reporting/This-saved-search-cannot-perform-summary-indexing-because-it-has/m-p/298274#M5488</link>
      <description>&lt;P&gt;Well, I solved my issues by just keeping at it.&lt;BR /&gt;
So, I'm migrating searches from one splunk to another, and this one ain't mine, so it took me a while to wrap my head around what it's doing.&lt;BR /&gt;
I'm not sure why splunk has changed it's mind about this, but now that I've found the issue, I'm inclined to agree.&lt;BR /&gt;
The middle section with eval QUERY = [subsearch] exists to take a bunch of entries in a table and build a regex of pipes to OR the text.  A simple &lt;BR /&gt;
| search NOT [ subsearch outputting fields using the matching fieldname] works to do exactly that, without regex.  IFF the entries included regex I gues I would have needed to do a new field and make sure the entries don't match the table's entries, which would make it slightly more complex, but the issue appears to have been simply a weird way of doing things.&lt;/P&gt;

&lt;P&gt;Hoorah for migrating other people's stuff.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jul 2019 06:59:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/This-saved-search-cannot-perform-summary-indexing-because-it-has/m-p/298274#M5488</guid>
      <dc:creator>alisterwhipp</dc:creator>
      <dc:date>2019-07-24T06:59:49Z</dc:date>
    </item>
  </channel>
</rss>

