<?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: Why did my &amp;quot;| where not&amp;quot; saved search start to error? in Reporting</title>
    <link>https://community.splunk.com/t5/Reporting/Why-did-my-quot-where-not-quot-saved-search-start-to-error/m-p/252960#M4965</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Can you post the query?&lt;/P&gt;</description>
    <pubDate>Mon, 29 Aug 2016 15:57:16 GMT</pubDate>
    <dc:creator>jmallorquin</dc:creator>
    <dc:date>2016-08-29T15:57:16Z</dc:date>
    <item>
      <title>Why did my "| where not" saved search start to error?</title>
      <link>https://community.splunk.com/t5/Reporting/Why-did-my-quot-where-not-quot-saved-search-start-to-error/m-p/252959#M4964</link>
      <description>&lt;P&gt;I have a saved search that started to fail like so....&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;ERROR SavedSplunker - savedsearch_id="nobody;search;Powered On VMs Without UF", message="Error in 'where' command: The 'not' function is unsupported or undefined.". No actions executed
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I can open the saved search and run it without any errors and it was working fine every Monday morning for months, but has recently started to fail when scheduled. &lt;/P&gt;

&lt;P&gt;Any thoughts?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup VMs.csv | rename "Summary|Guest Operating System|Guest OS Full Name" as OS | search OS="Microsoft Windows*" | eval Name=lower(Name) | fields Name
| where NOT [| metadata index=perfmon type=hosts earliest=-1d@d latest=now
              | where lastTime &amp;gt; relative_time(now(), "-1d@d") 
              |  rex field=host "(?&amp;lt;Name&amp;gt;[^\.]+)" 
              | eval Name=lower(Name) | fields Name]
| sort Name
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 29 Aug 2016 15:54:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Why-did-my-quot-where-not-quot-saved-search-start-to-error/m-p/252959#M4964</guid>
      <dc:creator>lycollicott</dc:creator>
      <dc:date>2016-08-29T15:54:03Z</dc:date>
    </item>
    <item>
      <title>Re: Why did my "| where not" saved search start to error?</title>
      <link>https://community.splunk.com/t5/Reporting/Why-did-my-quot-where-not-quot-saved-search-start-to-error/m-p/252960#M4965</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Can you post the query?&lt;/P&gt;</description>
      <pubDate>Mon, 29 Aug 2016 15:57:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Why-did-my-quot-where-not-quot-saved-search-start-to-error/m-p/252960#M4965</guid>
      <dc:creator>jmallorquin</dc:creator>
      <dc:date>2016-08-29T15:57:16Z</dc:date>
    </item>
    <item>
      <title>Re: Why did my "| where not" saved search start to error?</title>
      <link>https://community.splunk.com/t5/Reporting/Why-did-my-quot-where-not-quot-saved-search-start-to-error/m-p/252961#M4966</link>
      <description>&lt;P&gt;Based on the error, it seems the subsearch in where is returning null. Could you try this variation?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup VMs.csv | rename "Summary|Guest Operating System|Guest OS Full Name" as OS | search OS="Microsoft Windows*" | eval Name=lower(Name) | eval hasUF=1
| append [| metadata index=perfmon type=hosts earliest=-1d@d latest=now
               | where lastTime &amp;gt; relative_time(now(), "-1d@d") 
               |  rex field=host "(?&amp;lt;Name&amp;gt;[^\.]+)" 
               | eval Name=lower(Name) | fields Name | eval hasUF=2]
| stats sum(hasUF) as hasUF by Name | where hasUF=1 | table Name
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;Version 2&lt;/STRONG&gt;&lt;/P&gt;

&lt;H1&gt;Update: fixed query&lt;/H1&gt;

&lt;P&gt;Can you try this as well. Just want to eliminate that metadata command is the issue.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup VMs.csv | rename "Summary|Guest Operating System|Guest OS Full Name" as OS | search OS="Microsoft Windows*" | eval Name=lower(Name) | eval hasUF=1
| append [| tstats max(_time) as lastTime WHERE index=perfmon earliest=-1d@d latest=now by host
               | where lastTime &amp;gt; relative_time(now(), "-1d@d") 
               |  rex field=host "(?&amp;lt;Name&amp;gt;[^\.]+)" 
               | eval Name=lower(Name) | fields Name | eval hasUF=2]
| stats sum(hasUF) as hasUF by Name | where hasUF=1 | table Name
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 29 Aug 2016 16:13:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Why-did-my-quot-where-not-quot-saved-search-start-to-error/m-p/252961#M4966</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-08-29T16:13:52Z</dc:date>
    </item>
    <item>
      <title>Re: Why did my "| where not" saved search start to error?</title>
      <link>https://community.splunk.com/t5/Reporting/Why-did-my-quot-where-not-quot-saved-search-start-to-error/m-p/252962#M4967</link>
      <description>&lt;P&gt;Ok, so your revision and my original both work when I run them manually in search and they return identical results.  However, when I scheduled yours it doesn't error, but it returns the wrong results.  &lt;/P&gt;

&lt;P&gt;Since both our queries work manually I think it is more of a scheduler issue than syntax.....too much weird for a Monday.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Aug 2016 17:01:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Why-did-my-quot-where-not-quot-saved-search-start-to-error/m-p/252962#M4967</guid>
      <dc:creator>lycollicott</dc:creator>
      <dc:date>2016-08-29T17:01:09Z</dc:date>
    </item>
    <item>
      <title>Re: Why did my "| where not" saved search start to error?</title>
      <link>https://community.splunk.com/t5/Reporting/Why-did-my-quot-where-not-quot-saved-search-start-to-error/m-p/252963#M4968</link>
      <description>&lt;P&gt;Mind trying the version 2 query?&lt;/P&gt;</description>
      <pubDate>Mon, 29 Aug 2016 17:04:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Why-did-my-quot-where-not-quot-saved-search-start-to-error/m-p/252963#M4968</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-08-29T17:04:40Z</dc:date>
    </item>
    <item>
      <title>Re: Why did my "| where not" saved search start to error?</title>
      <link>https://community.splunk.com/t5/Reporting/Why-did-my-quot-where-not-quot-saved-search-start-to-error/m-p/252964#M4969</link>
      <description>&lt;P&gt;Version 2 returns the wrong results.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Aug 2016 17:30:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Why-did-my-quot-where-not-quot-saved-search-start-to-error/m-p/252964#M4969</guid>
      <dc:creator>lycollicott</dc:creator>
      <dc:date>2016-08-29T17:30:42Z</dc:date>
    </item>
    <item>
      <title>Re: Why did my "| where not" saved search start to error?</title>
      <link>https://community.splunk.com/t5/Reporting/Why-did-my-quot-where-not-quot-saved-search-start-to-error/m-p/252965#M4970</link>
      <description>&lt;P&gt;Hmm.  This report is scheduled every Monday and it has failed the last 4 weeks.  The last time it ran successfully was the Monday before we converted authentication  from LDAP to SAML.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Aug 2016 19:25:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Why-did-my-quot-where-not-quot-saved-search-start-to-error/m-p/252965#M4970</guid>
      <dc:creator>lycollicott</dc:creator>
      <dc:date>2016-08-29T19:25:06Z</dc:date>
    </item>
    <item>
      <title>Re: Why did my "| where not" saved search start to error?</title>
      <link>https://community.splunk.com/t5/Reporting/Why-did-my-quot-where-not-quot-saved-search-start-to-error/m-p/252966#M4971</link>
      <description>&lt;P&gt;Did you check the scheduler log if the query was run successfully OR what the error was (&lt;CODE&gt;index=_internal sourcetype=scheduler&lt;/CODE&gt;)?&lt;/P&gt;

&lt;P&gt;BTW, there was a type on the version 2, just fixed it.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Aug 2016 21:06:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Why-did-my-quot-where-not-quot-saved-search-start-to-error/m-p/252966#M4971</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-08-29T21:06:31Z</dc:date>
    </item>
    <item>
      <title>Re: Why did my "| where not" saved search start to error?</title>
      <link>https://community.splunk.com/t5/Reporting/Why-did-my-quot-where-not-quot-saved-search-start-to-error/m-p/252967#M4972</link>
      <description>&lt;P&gt;I did check the scheduler logs, but found no clues.  They just indicated that your search worked.&lt;/P&gt;

&lt;P&gt;Now, that last revision you made has worked both manually and by schedule.  Thanks, dude.&lt;/P&gt;

&lt;P&gt;(I wish I understood why the exact same &lt;CODE&gt;NOT&lt;/CODE&gt; search suddenly stopped working in one domain, but still works in another domain with same Splunk version, same SAML setup, yada-yada.  Weird.)&lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2016 14:02:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Why-did-my-quot-where-not-quot-saved-search-start-to-error/m-p/252967#M4972</guid>
      <dc:creator>lycollicott</dc:creator>
      <dc:date>2016-08-30T14:02:30Z</dc:date>
    </item>
  </channel>
</rss>

