<?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: Eval Error In Search Statement in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Eval-Error-In-Search-Statement/m-p/88912#M22763</link>
    <description>&lt;P&gt;Also, the "ExtractFriendlyMetricName" listed above is a similar case statement and it works fine.&lt;/P&gt;</description>
    <pubDate>Wed, 17 Nov 2010 00:28:11 GMT</pubDate>
    <dc:creator>johnboldt</dc:creator>
    <dc:date>2010-11-17T00:28:11Z</dc:date>
    <item>
      <title>Eval Error In Search Statement</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Eval-Error-In-Search-Statement/m-p/88908#M22759</link>
      <description>&lt;P&gt;I'm receiving the following error message on a search:
Error in 'eval' command: Failed to parse the provided arguments. Usage: eval dest_key = expression&lt;/P&gt;

&lt;P&gt;The expression is a search macro that takes a string parameter and returns a message based on a regex match using a case statement which uses the &lt;STRONG&gt;match&lt;/STRONG&gt; function.&lt;/P&gt;

&lt;P&gt;This statement was working at one point, and then I started getting the error. Any ideas?&lt;/P&gt;</description>
      <pubDate>Mon, 15 Nov 2010 13:36:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Eval-Error-In-Search-Statement/m-p/88908#M22759</guid>
      <dc:creator>johnboldt</dc:creator>
      <dc:date>2010-11-15T13:36:23Z</dc:date>
    </item>
    <item>
      <title>Re: Eval Error In Search Statement</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Eval-Error-In-Search-Statement/m-p/88909#M22760</link>
      <description>&lt;P&gt;Posting the actual search would go a long way toward getting a useful answer. Please edit your question above to provide more detail.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Nov 2010 21:32:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Eval-Error-In-Search-Statement/m-p/88909#M22760</guid>
      <dc:creator>southeringtonp</dc:creator>
      <dc:date>2010-11-15T21:32:58Z</dc:date>
    </item>
    <item>
      <title>Re: Eval Error In Search Statement</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Eval-Error-In-Search-Statement/m-p/88910#M22761</link>
      <description>&lt;P&gt;Agreed with southeringtonp - please post the search and also the macros it uses.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Nov 2010 05:51:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Eval-Error-In-Search-Statement/m-p/88910#M22761</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2010-11-16T05:51:06Z</dc:date>
    </item>
    <item>
      <title>Re: Eval Error In Search Statement</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Eval-Error-In-Search-Statement/m-p/88911#M22762</link>
      <description>&lt;P&gt;Here's the search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="SRCTYPE" hoursago=1 | `InetServiceCallsSearch` | eval Metric=`ExtractFriendlyMetricName(Message)` | eval SLA=`GetActivitySLA(Message)` | stats count as "Count", avg(elapsedTime) as "Average", p95(elapsedTime) as "95th Percentile", max(SLA) as "SLA" by Metric
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The eval that's blowing up is &lt;CODE&gt;GetActivitySLA&lt;/CODE&gt;, listed below:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;case (
match($message$, "Some Message", 500,
match($message$, "Another Message:"), 500, 
match($message$, "Yet Another Message:"), 500
)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If I extract the macro body and place it directly into the search it works fine:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;eval SLA=case (...)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 17 Nov 2010 00:24:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Eval-Error-In-Search-Statement/m-p/88911#M22762</guid>
      <dc:creator>johnboldt</dc:creator>
      <dc:date>2010-11-17T00:24:28Z</dc:date>
    </item>
    <item>
      <title>Re: Eval Error In Search Statement</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Eval-Error-In-Search-Statement/m-p/88912#M22763</link>
      <description>&lt;P&gt;Also, the "ExtractFriendlyMetricName" listed above is a similar case statement and it works fine.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Nov 2010 00:28:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Eval-Error-In-Search-Statement/m-p/88912#M22763</guid>
      <dc:creator>johnboldt</dc:creator>
      <dc:date>2010-11-17T00:28:11Z</dc:date>
    </item>
    <item>
      <title>Re: Eval Error In Search Statement</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Eval-Error-In-Search-Statement/m-p/88913#M22764</link>
      <description>&lt;P&gt;You are missing an end/right-parenthesis ")" that I highlight in &lt;CODE&gt;red&lt;/CODE&gt;:&lt;/P&gt;

&lt;P&gt;case (&lt;BR /&gt;
match($message$, "Some Message" &lt;CODE&gt;)&lt;/CODE&gt;, 500,&lt;BR /&gt;
match($message$, "Another Message:"), 500, &lt;BR /&gt;
match($message$, "Yet Another Message:"), 500&lt;BR /&gt;
)&lt;/P&gt;</description>
      <pubDate>Wed, 27 May 2015 05:15:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Eval-Error-In-Search-Statement/m-p/88913#M22764</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-05-27T05:15:27Z</dc:date>
    </item>
    <item>
      <title>Re: Eval Error In Search Statement</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Eval-Error-In-Search-Statement/m-p/88914#M22765</link>
      <description>&lt;P&gt;If this was the problem, do click "Accept" on the answer to close it.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Dec 2015 14:52:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Eval-Error-In-Search-Statement/m-p/88914#M22765</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-12-21T14:52:38Z</dc:date>
    </item>
  </channel>
</rss>

