<?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 &amp;quot;TypeError: e.replace is not a function&amp;quot; using SearchManager with eval in the search? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-quot-TypeError-e-replace-is-not-a-function-quot/m-p/180022#M51828</link>
    <description>&lt;P&gt;Try using Following code:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;new SearchManager({
     id: "mysearch1",
     earliest_time: "-24h@h",
     latest_time: "now",
     search: "openstack::* node::* command=w |dedup node|eval critical = if( load2 &amp;gt; 1.25,load2,0)|table node load2 critical"
 });
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Please note: Removed the last comma (just after search string).&lt;/P&gt;

&lt;P&gt;Thanks!!&lt;/P&gt;</description>
    <pubDate>Mon, 29 Jun 2015 05:25:51 GMT</pubDate>
    <dc:creator>vganjare</dc:creator>
    <dc:date>2015-06-29T05:25:51Z</dc:date>
    <item>
      <title>Why am I getting "TypeError: e.replace is not a function" using SearchManager with eval in the search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-quot-TypeError-e-replace-is-not-a-function-quot/m-p/180021#M51827</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;new SearchManager({
                id: "mysearch1",
                earliest_time: "-24h@h",
                latest_time: "now",
                search: "openstack::* node::* command=w |dedup node|eval critical = if( load2 &amp;gt; 1.25,load2,0)|table node load2 critical",
            });
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Console error:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;TypeError: e.replace is not a function


...ngToFieldList(e))},s=function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}...
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 28 Jun 2015 12:20:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-quot-TypeError-e-replace-is-not-a-function-quot/m-p/180021#M51827</guid>
      <dc:creator>vikassanap2011</dc:creator>
      <dc:date>2015-06-28T12:20:35Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I getting "TypeError: e.replace is not a function" using SearchManager with eval in the search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-quot-TypeError-e-replace-is-not-a-function-quot/m-p/180022#M51828</link>
      <description>&lt;P&gt;Try using Following code:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;new SearchManager({
     id: "mysearch1",
     earliest_time: "-24h@h",
     latest_time: "now",
     search: "openstack::* node::* command=w |dedup node|eval critical = if( load2 &amp;gt; 1.25,load2,0)|table node load2 critical"
 });
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Please note: Removed the last comma (just after search string).&lt;/P&gt;

&lt;P&gt;Thanks!!&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jun 2015 05:25:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-quot-TypeError-e-replace-is-not-a-function-quot/m-p/180022#M51828</guid>
      <dc:creator>vganjare</dc:creator>
      <dc:date>2015-06-29T05:25:51Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I getting "TypeError: e.replace is not a function" using SearchManager with eval in the search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-quot-TypeError-e-replace-is-not-a-function-quot/m-p/180023#M51829</link>
      <description>&lt;P&gt;I guess you got a "comma" after the "search" param, thus the function not ending properly&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jun 2015 09:54:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-quot-TypeError-e-replace-is-not-a-function-quot/m-p/180023#M51829</guid>
      <dc:creator>koshyk</dc:creator>
      <dc:date>2015-06-29T09:54:49Z</dc:date>
    </item>
  </channel>
</rss>

