- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Why am I getting "TypeError: e.replace is not a function" using SearchManager with eval in the search?
vikassanap2011
New Member
06-28-2015
05:20 AM
new SearchManager({
id: "mysearch1",
earliest_time: "-24h@h",
latest_time: "now",
search: "openstack::* node::* command=w |dedup node|eval critical = if( load2 > 1.25,load2,0)|table node load2 critical",
});
Console error:
TypeError: e.replace is not a function
...ngToFieldList(e))},s=function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}...
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

koshyk
Super Champion
06-29-2015
02:54 AM
I guess you got a "comma" after the "search" param, thus the function not ending properly
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
vganjare
Builder
06-28-2015
10:25 PM
Try using Following code:
new SearchManager({
id: "mysearch1",
earliest_time: "-24h@h",
latest_time: "now",
search: "openstack::* node::* command=w |dedup node|eval critical = if( load2 > 1.25,load2,0)|table node load2 critical"
});
Please note: Removed the last comma (just after search string).
Thanks!!
