<?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. in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Error-in-eval-command-The-expression-is-malformed/m-p/517688#M145591</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225779"&gt;@KeaganJ&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;good!&lt;/P&gt;&lt;P&gt;Ciao and happy splunking.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;P.S.: Karma Points are appreciated &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 03 Sep 2020 09:52:15 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2020-09-03T09:52:15Z</dc:date>
    <item>
      <title>Error in 'eval' command: The expression is malformed.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Error-in-eval-command-The-expression-is-malformed/m-p/517678#M145585</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am getting the following error on my application/dashboard:&lt;BR /&gt;"&lt;SPAN&gt;&amp;nbsp;Error in 'eval' command: The expression is malformed."&lt;BR /&gt;&lt;BR /&gt;The query that is being triggered is:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;| makeresults count=1 | eval id=$incident_id$| sendalert canary_acknowledge_incident param.incident_id=$incident_id$ param.index_name="main"&lt;/LI-CODE&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;And this is getting triggered when a Submit Button is being clicked.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;The Submit button is tied to a Dropdown of values.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;The dropdown is populated with values and is defined as below:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;input type="dropdown" token="incident_id" searchWhenChanged="false"&amp;gt;
 &amp;lt;label&amp;gt;Incident to Close&amp;lt;/label&amp;gt;
 &amp;lt;fieldForLabel&amp;gt;id&amp;lt;/fieldForLabel&amp;gt;
 &amp;lt;fieldForValue&amp;gt;id&amp;lt;/fieldForValue&amp;gt;
 &amp;lt;search&amp;gt;
  &amp;lt;query&amp;gt;`canary_tools_index` sourcetype="canarytools:incidents" | stats values(id) as id| mvexpand id&amp;lt;/query&amp;gt;
  &amp;lt;earliest&amp;gt;-30d@d&amp;lt;/earliest&amp;gt;
  &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
 &amp;lt;/search&amp;gt;
&amp;lt;/input&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;And running that drop down populating query using the Search tool gives information such as:&lt;/SPAN&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;incident:canarytoken:80f36193721b94fb268bb6df:&amp;lt;source_ip&amp;gt;:&amp;lt;epoch_timestamp&amp;gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;incident:canarytoken:80f36193721b94fb268bb6df:&amp;lt;source_ip&amp;gt;:&amp;lt;epoch_timestamp&amp;gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Looking at previous questions asked on this forum point towards the field names of the `eval` command not working whenever they start with a numeric character. But this is not the case in my issues as I am using :&lt;BR /&gt;`eval id=$incident_id$`&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This is happening on Splunk 8.0.0&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Sep 2020 09:25:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Error-in-eval-command-The-expression-is-malformed/m-p/517678#M145585</guid>
      <dc:creator>KeaganJ</dc:creator>
      <dc:date>2020-09-03T09:25:57Z</dc:date>
    </item>
    <item>
      <title>Re: Error in 'eval' command: The expression is malformed.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Error-in-eval-command-The-expression-is-malformed/m-p/517681#M145587</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225779"&gt;@KeaganJ&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;try to add quotes to the eval and sendalert commands:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults count=1 
| eval id="$incident_id$"
| sendalert canary_acknowledge_incident param.incident_id="$incident_id$" param.index_name="main"&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 03 Sep 2020 09:35:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Error-in-eval-command-The-expression-is-malformed/m-p/517681#M145587</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-09-03T09:35:18Z</dc:date>
    </item>
    <item>
      <title>Re: Error in 'eval' command: The expression is malformed.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Error-in-eval-command-The-expression-is-malformed/m-p/517685#M145590</link>
      <description>&lt;P&gt;I managed to fix my issue by surrounding the variable in double quotes ie:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;eval id="$incident_id$"&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 03 Sep 2020 09:45:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Error-in-eval-command-The-expression-is-malformed/m-p/517685#M145590</guid>
      <dc:creator>KeaganJ</dc:creator>
      <dc:date>2020-09-03T09:45:43Z</dc:date>
    </item>
    <item>
      <title>Re: Error in 'eval' command: The expression is malformed.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Error-in-eval-command-The-expression-is-malformed/m-p/517688#M145591</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225779"&gt;@KeaganJ&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;good!&lt;/P&gt;&lt;P&gt;Ciao and happy splunking.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;P.S.: Karma Points are appreciated &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Sep 2020 09:52:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Error-in-eval-command-The-expression-is-malformed/m-p/517688#M145591</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-09-03T09:52:15Z</dc:date>
    </item>
    <item>
      <title>Re: Error in 'eval' command: The expression is malformed.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Error-in-eval-command-The-expression-is-malformed/m-p/517689#M145592</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;SPAN&gt;Giuseppe Just saw your reply now as I refreshed the page. Your solution works great for me.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Sep 2020 09:52:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Error-in-eval-command-The-expression-is-malformed/m-p/517689#M145592</guid>
      <dc:creator>KeaganJ</dc:creator>
      <dc:date>2020-09-03T09:52:56Z</dc:date>
    </item>
  </channel>
</rss>

