<?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: Help me understand: &amp;quot;Error in 'EvalCommand': The expression is malformed. Expected ).&amp;quot; in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Help-me-understand-quot-Error-in-EvalCommand-The-expression-is/m-p/638888#M221370</link>
    <description>&lt;P&gt;If that's your literal search, it is indeed malformed. You copy-pasted it from somewhere and instead of "&amp;gt;"&amp;nbsp; you have html entities "&amp;amp;gt;".&lt;/P&gt;</description>
    <pubDate>Wed, 05 Apr 2023 20:01:01 GMT</pubDate>
    <dc:creator>PickleRick</dc:creator>
    <dc:date>2023-04-05T20:01:01Z</dc:date>
    <item>
      <title>Help me understand: "Error in 'EvalCommand': The expression is malformed. Expected )."</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-me-understand-quot-Error-in-EvalCommand-The-expression-is/m-p/638886#M221369</link>
      <description>&lt;P&gt;So I've recently got into a new job, where I'm learning Splunk and learning how to support splunk searches and dashboards left behind by someone else.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I'm currently trying to go through a lot of the previous worker's searches, and I'm trying to understand how they all work. Right now I'm looking at a search that is part of a larger dashboard, and whenever I want to run this bit as an individual search, it's giving me the error&amp;nbsp;"Error in 'EvalCommand': The expression is malformed. Expected )." The search itself is:&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;index=vuln_vulnscan sourcetype=tenable:sc:vuln severity.id&amp;amp;gt;=2 OR pluginID="19506" earliest=-12d latest=now() &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;[ search index=inventory_snow ((sourcetype=snow:cmdb_ci_network_adapter AND ("ip_address\"\: \"56." OR "ip_address\"\: \"170.214")) OR (sourcetype=snow:cmdb_ci_computer) OR (sourcetype="snow:cmdb_ci_server")) dv_u_eir="*$eir$*" dv_u_environment="$eir_env$" earliest=-2d latest=now()&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;| fields dv_name&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;| stats latest(*) as * by dv_name&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;| lookup dnslookup clienthost as dv_name OUTPUT clientip as ip&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;| table ip]&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;| fields pluginID dnsName ip port severity.name pluginName synopsis solution firstSeen lastSeen severity.id patchPubDate pluginText&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;| stats latest(*) as * by ip, pluginID, port&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;| eval patchAvailable="No Patch Available/Requires Manual Fix"&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;| eval patchAvailable=if(((patchPubDate&amp;amp;gt;relative_time(now(),"-30d"))),"0d-30d",patchAvailable) &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;| eval patchAvailable=if(((patchPubDate&amp;amp;lt;relative_time(now(),"-30d")) AND (patchPubDate&amp;amp;gt;relative_time(now(),"-60d"))),"30d-60d",patchAvailable)&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;| eval patchAvailable=if(((patchPubDate&amp;amp;lt;relative_time(now(),"-60d")) AND (patchPubDate&amp;amp;gt;relative_time(now(),"-90d"))),"60d-90d",patchAvailable)&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;| eval patchAvailable=if((patchPubDate&amp;amp;lt;relative_time(now(),"-90d") AND (patchPubDate&amp;amp;gt;relative_time(now(),"-180d"))), "90d-180d",patchAvailable)&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;| eval patchAvailable=if((patchPubDate&amp;amp;lt;relative_time(now(),"-180d") AND (patchPubDate&amp;amp;gt;relative_time(now(),"-365d"))), "180d-365d", patchAvailable)&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;| eval patchAvailable=if((patchPubDate&amp;amp;lt;relative_time(now(),"-365d") AND (patchPubDate&amp;amp;gt;0)), "365d+", patchAvailable)&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;I understand most of this search, but I don't understand why Splunk would be giving this error. I've went over it with a finetoothed comb and I couldn't find any missing ")" symbols anywhere. There's no eval in the subsearch, and all the eval commands I see have the proper grammar for the program.&lt;BR /&gt;&lt;BR /&gt;Is it something to do with the fact that I copied this out of a larger dashboard?&lt;/P&gt;</description>
      <pubDate>Wed, 05 Apr 2023 19:55:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-me-understand-quot-Error-in-EvalCommand-The-expression-is/m-p/638886#M221369</guid>
      <dc:creator>TorbinIT</dc:creator>
      <dc:date>2023-04-05T19:55:00Z</dc:date>
    </item>
    <item>
      <title>Re: Help me understand: "Error in 'EvalCommand': The expression is malformed. Expected )."</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-me-understand-quot-Error-in-EvalCommand-The-expression-is/m-p/638888#M221370</link>
      <description>&lt;P&gt;If that's your literal search, it is indeed malformed. You copy-pasted it from somewhere and instead of "&amp;gt;"&amp;nbsp; you have html entities "&amp;amp;gt;".&lt;/P&gt;</description>
      <pubDate>Wed, 05 Apr 2023 20:01:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-me-understand-quot-Error-in-EvalCommand-The-expression-is/m-p/638888#M221370</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2023-04-05T20:01:01Z</dc:date>
    </item>
    <item>
      <title>Re: Help me understand: "Error in 'EvalCommand': The expression is malformed. Expected )."</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-me-understand-quot-Error-in-EvalCommand-The-expression-is/m-p/638889#M221371</link>
      <description>&lt;P&gt;Aaaah, that makes sense! Thank you very much for the response!&lt;/P&gt;</description>
      <pubDate>Wed, 05 Apr 2023 20:01:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-me-understand-quot-Error-in-EvalCommand-The-expression-is/m-p/638889#M221371</guid>
      <dc:creator>TorbinIT</dc:creator>
      <dc:date>2023-04-05T20:01:50Z</dc:date>
    </item>
  </channel>
</rss>

