<?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 am I getting an eval command error &amp;quot;The arguments to the match function are invalid&amp;quot;? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-an-eval-command-error-quot-The-arguments-to-the/m-p/331006#M159862</link>
    <description>&lt;P&gt;It is working. Thank you very much &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 27 Jul 2017 07:14:22 GMT</pubDate>
    <dc:creator>Taner</dc:creator>
    <dc:date>2017-07-27T07:14:22Z</dc:date>
    <item>
      <title>Why am I getting an eval command error "The arguments to the match function are invalid"?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-an-eval-command-error-quot-The-arguments-to-the/m-p/331001#M159857</link>
      <description>&lt;P&gt;I would like to create a new panel in my Dashboard and I am using the following search string:&lt;/P&gt;

&lt;P&gt;index=$index$ eventId=xy source="zz-json.log" (X-TRACE-ID="PV3*") OR (X-TRACE-ID="IPL*")| dedup X-TRACE-ID | &lt;BR /&gt;
eval event=case( &lt;BR /&gt;
match(X-TRACE-ID,"PV3"),"Option1", &lt;BR /&gt;
match(X-TRACE-ID,"IPL"),"Option2") | chart count by event&lt;/P&gt;

&lt;P&gt;Why do I get the error message: Error in "eval" command: The arguments to the „match“ function are invalid.&lt;/P&gt;

&lt;P&gt;Could you please help me &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt; ?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 15:03:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-an-eval-command-error-quot-The-arguments-to-the/m-p/331001#M159857</guid>
      <dc:creator>Taner</dc:creator>
      <dc:date>2020-09-29T15:03:54Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I getting an eval command error "The arguments to the match function are invalid"?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-an-eval-command-error-quot-The-arguments-to-the/m-p/331002#M159858</link>
      <description>&lt;P&gt;try below, i think - in XTRACEID  created a issue.&lt;/P&gt;

&lt;P&gt;index=$index$ eventId=xy source="zz-json.log" (X-TRACE-ID="PV3*") OR (X-TRACE-ID="IPL*")| dedup X-TRACE-ID | rename X-TRACE-ID as XTRACEID | eval event=case(&lt;BR /&gt;
match(XTRACEID ,"PV3"),"Option1",&lt;BR /&gt;
match(XTRACEID ,"IPL"),"Option2") | chart count by event&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 15:05:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-an-eval-command-error-quot-The-arguments-to-the/m-p/331002#M159858</guid>
      <dc:creator>sbbadri</dc:creator>
      <dc:date>2020-09-29T15:05:11Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I getting an eval command error "The arguments to the match function are invalid"?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-an-eval-command-error-quot-The-arguments-to-the/m-p/331003#M159859</link>
      <description>&lt;P&gt;The hyphens in your field names cause Splunk to evaluate the field as the expression X minus TRACE minus ID. Try adding &lt;CODE&gt;| rename X-TRACE-ID as xtraceid&lt;/CODE&gt; after your dedup and use xtraceid in your match expressions and it should work as expected.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jul 2017 19:02:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-an-eval-command-error-quot-The-arguments-to-the/m-p/331003#M159859</guid>
      <dc:creator>s2_splunk</dc:creator>
      <dc:date>2017-07-26T19:02:21Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I getting an eval command error "The arguments to the match function are invalid"?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-an-eval-command-error-quot-The-arguments-to-the/m-p/331004#M159860</link>
      <description>&lt;P&gt;response overlap with sbbadri, sorry for the dupe&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jul 2017 19:03:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-an-eval-command-error-quot-The-arguments-to-the/m-p/331004#M159860</guid>
      <dc:creator>s2_splunk</dc:creator>
      <dc:date>2017-07-26T19:03:06Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I getting an eval command error "The arguments to the match function are invalid"?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-an-eval-command-error-quot-The-arguments-to-the/m-p/331005#M159861</link>
      <description>&lt;P&gt;You should enclose field names with special characters within single quotes in eval and where clause. Like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=$index$ eventId=xy source="zz-json.log" (X-TRACE-ID="PV3*") OR (X-TRACE-ID="IPL*")| dedup X-TRACE-ID | 
eval event=case( 
match('X-TRACE-ID',"PV3"),"Option1", 
match('X-TRACE-ID',"IPL"),"Option2") | chart count by event
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 26 Jul 2017 19:13:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-an-eval-command-error-quot-The-arguments-to-the/m-p/331005#M159861</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-07-26T19:13:32Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I getting an eval command error "The arguments to the match function are invalid"?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-an-eval-command-error-quot-The-arguments-to-the/m-p/331006#M159862</link>
      <description>&lt;P&gt;It is working. Thank you very much &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jul 2017 07:14:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-an-eval-command-error-quot-The-arguments-to-the/m-p/331006#M159862</guid>
      <dc:creator>Taner</dc:creator>
      <dc:date>2017-07-27T07:14:22Z</dc:date>
    </item>
  </channel>
</rss>

