<?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: Error in 'eval' command: The expression is malformed. Expected ). in Security</title>
    <link>https://community.splunk.com/t5/Security/Error-in-eval-command-The-expression-is-malformed-Expected/m-p/636713#M16682</link>
    <description>&lt;P&gt;The Search &amp;amp; Reporting app doesn't recognize "&amp;amp;gt;" or "&amp;amp;lt;" as "&amp;gt;" and "&amp;lt;", respectively.&amp;nbsp; You have to decode them yourself.&lt;/P&gt;</description>
    <pubDate>Thu, 30 Mar 2023 13:54:39 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2023-03-30T13:54:39Z</dc:date>
    <item>
      <title>Error in 'eval' command: The expression is malformed. Expected )?</title>
      <link>https://community.splunk.com/t5/Security/Error-in-eval-command-The-expression-is-malformed-Expected/m-p/636703#M16681</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;I am setting dashboard and alert where we are trying to alert if there is missing hosts in splunk for more than 24 hours . I am using below query but getting malformed error when running in search although on dashboard its giving result.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;| inputlookup data.csv where DECOMMISSIONED=N SUB_ENVIRONMENT!=TEST
| fields ACTIVE_DC APP_NAME DATABASE HOST_NAME APP_NAME DB_VERSION DB_ROLE SUB_ENVIRONMENT
| eval Reference=ABC
| rename HOST_NAME as host
| join type=left host
[ search index=dbecx source="*audit*"
| stats count as SPLEvents latest(_time) as LastSeen by host
| eval age=round((now()-LastSeen)/3600,1)
| eval Status=case(
LastSeen&amp;amp;gt;(now()-(3600*2)),"Low",
LastSeen&amp;amp;lt;(now()-(3600*2+1)) AND LastSeen&amp;amp;gt;(now()-(3600*8)) ,"Medium",
LastSeen&amp;amp;lt;(now()-(3600*8+1)) AND LastSeen&amp;amp;gt;(now()-(3600*24)),"High",
1=1,"Critical")
| convert ctime(LastSeen) timeformat="%d-%m-%Y %H:%M:%S"
| eval Reference="SPL"]
| fields DB_VERSION DATABASE APP_NAME ACTIVE_DC host Status SPLEvents
| rex mode=sed field=host "s/\..*$//g"
| fillnull value=Missing Status
| fillnull value=Null&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can someone help here&lt;/P&gt;</description>
      <pubDate>Thu, 30 Mar 2023 15:30:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Error-in-eval-command-The-expression-is-malformed-Expected/m-p/636703#M16681</guid>
      <dc:creator>shruti14</dc:creator>
      <dc:date>2023-03-30T15:30:39Z</dc:date>
    </item>
    <item>
      <title>Re: Error in 'eval' command: The expression is malformed. Expected ).</title>
      <link>https://community.splunk.com/t5/Security/Error-in-eval-command-The-expression-is-malformed-Expected/m-p/636713#M16682</link>
      <description>&lt;P&gt;The Search &amp;amp; Reporting app doesn't recognize "&amp;amp;gt;" or "&amp;amp;lt;" as "&amp;gt;" and "&amp;lt;", respectively.&amp;nbsp; You have to decode them yourself.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Mar 2023 13:54:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Error-in-eval-command-The-expression-is-malformed-Expected/m-p/636713#M16682</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2023-03-30T13:54:39Z</dc:date>
    </item>
    <item>
      <title>Re: Error in 'eval' command: The expression is malformed. Expected ).</title>
      <link>https://community.splunk.com/t5/Security/Error-in-eval-command-The-expression-is-malformed-Expected/m-p/636714#M16683</link>
      <description>&lt;P&gt;Your dashboard is XML. Because of this, certain characters have to be encoded, e.g. &amp;gt; and &amp;lt; which are encoded as &amp;amp;gt; and &amp;amp;lt; respectively. Try using the open in search button on your dashboard, or if you want to just copy the search from your dashboard source, then decode the encoded characters e.g.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup data.csv where DECOMMISSIONED=N SUB_ENVIRONMENT!=TEST
| fields ACTIVE_DC APP_NAME DATABASE HOST_NAME APP_NAME DB_VERSION DB_ROLE SUB_ENVIRONMENT
| eval Reference=ABC
| rename HOST_NAME as host
| join type=left host
[ search index=dbecx source="*audit*"
| stats count as SPLEvents latest(_time) as LastSeen by host
| eval age=round((now()-LastSeen)/3600,1)
| eval Status=case(
LastSeen&amp;gt;(now()-(3600*2)),"Low",
LastSeen&amp;lt;(now()-(3600*2+1)) AND LastSeen&amp;gt;(now()-(3600*8)) ,"Medium",
LastSeen&amp;lt;(now()-(3600*8+1)) AND LastSeen&amp;gt;(now()-(3600*24)),"High",
1=1,"Critical")
| convert ctime(LastSeen) timeformat="%d-%m-%Y %H:%M:%S"
| eval Reference="SPL"]
| fields DB_VERSION DATABASE APP_NAME ACTIVE_DC host Status SPLEvents
| rex mode=sed field=host "s/\..*$//g"
| fillnull value=Missing Status
| fillnull value=Null&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 30 Mar 2023 13:55:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Error-in-eval-command-The-expression-is-malformed-Expected/m-p/636714#M16683</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-03-30T13:55:12Z</dc:date>
    </item>
    <item>
      <title>Re: Error in 'eval' command: The expression is malformed. Expected )?</title>
      <link>https://community.splunk.com/t5/Security/Error-in-eval-command-The-expression-is-malformed-Expected/m-p/636760#M16684</link>
      <description>&lt;P&gt;yeah this worked also there is one query with left join so i have to get the db count with creating join on one column but post applying join the numbers are not correct .&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup abc.csv where DECOMMISSIONED=N ENVIRONMENT=XYZ
| fields ACTIVE_DC APP_NAME HOST_NAME DATABASE DB_VERSION DB_ROLE ENVIRONMENT
| eval Reference=ISD
| rename HOST_NAME as host
| join type=left host
  [ search index=cb_* sourcetype="*dbx*"
  | stats count as SPLEvents latest(_time) as LastSeen by host
  | eval age=round((now()-LastSeen)/3600,1)
  | eval Status=case(
    LastSeen&amp;gt;(now()-(3600*2)),"Low",
    LastSeen&amp;lt;(now()-(3600*2+1)) AND LastSeen&amp;gt;(now()-(3600*8)) ,"Medium",
    LastSeen&amp;lt;(now()-(3600*8+1)) AND LastSeen&amp;gt;(now()-(3600*24)),"High",
    1=1,"Critical")
  | convert ctime(LastSeen) timeformat="%d-%m-%Y %H:%M:%S"
  | eval Reference="SPL"]
| fields DB_VERSION APP_NAME DATABASE ACTIVE_DC host Status SPLEvents
| rex mode=sed field=host "s/\..*$//g"
| fillnull value=Missing Status
| fillnull value=Null 
| search APP_NAME="*" DATABASE="*" host="*" DB_VERSION="*"
| eval DBStatus=if(SPLEvents="Null","missing","ok")
| search DBStatus="ok"
| stats dc(host) as dbcount&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 30 Mar 2023 18:58:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Error-in-eval-command-The-expression-is-malformed-Expected/m-p/636760#M16684</guid>
      <dc:creator>shruti14</dc:creator>
      <dc:date>2023-03-30T18:58:26Z</dc:date>
    </item>
    <item>
      <title>Re: Error in 'eval' command: The expression is malformed. Expected )?</title>
      <link>https://community.splunk.com/t5/Security/Error-in-eval-command-The-expression-is-malformed-Expected/m-p/636761#M16685</link>
      <description>&lt;P&gt;have i make anything in the above query&lt;/P&gt;</description>
      <pubDate>Thu, 30 Mar 2023 18:43:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Error-in-eval-command-The-expression-is-malformed-Expected/m-p/636761#M16685</guid>
      <dc:creator>shruti14</dc:creator>
      <dc:date>2023-03-30T18:43:59Z</dc:date>
    </item>
  </channel>
</rss>

