Kibana: scripts in json input not working

Hello,

I am getting error while adding scripts in json input while doing
aggregation(date histogram).
Am I missing any configuration options which I need to do before using this?

Any help would be appreciated!

Below is the script:
{
"script":"log(_value)"
}

Request to Elasticsearch failed: {"error":"SearchPhaseExecutionException[Failed to execute phase [query], all shards failed; shardFailures {[qsuoq24rQCmt-BkEuwe1tg][logstash-2015.04.08][0]: SearchParseException[[logstash-2015.04.08][0]: query[ConstantScore(BooleanFilter(+cache(@timestamp:[1428465600000 TO 1428551999999])))],from[-1],size[0]: Parse Failure [Failed to parse source [{"size":0,"query":{"filtered":{"query":{"query_string":{"analyze_wildcard":true,"query":""}},"filter":{"bool":{"must":[{"range":{"@timestamp":{"gte":1428465600000,"lte":1428551999999}}}],"must_not":[]}}}},"aggs":{"2":{"date_histogram":{"field":"@timestamp","interval":"30m","pre_zone":"-04:00","pre_zone_adjust_large_interval":true,"min_doc_count":1,"extended_bounds":{"min":1428465600000,"max":1428551999999},"script":"log(_value)"}}}}]]]; nested: ScriptException[dynamic scripting for [groovy] disabled]; }{[qsuoq24rQCmt-BkEuwe1tg][logstash-2015.04.08][1]: SearchParseException[[logstash-2015.04.08][1]: query[ConstantScore(BooleanFilter(+cache(@timestamp:[1428465600000 TO 1428551999999])))],from[-1],size[0]: Parse Failure [Failed to parse source [{"size":0,"query":{"filtered":{"query":{"query_string":{"analyze_wildcard":true,"query":""}},"filter":{"bool":{"must":[{"range":{"@timestamp":{"gte":1428465600000,"lte":1428551999999}}}],"must_not":[]}}}},"aggs":{"2":{"date_histogram":{"field":"@timestamp","interval":"30m","pre_zone":"-04:00","pre_zone_adjust_large_interval":true,"min_doc_count":1,"extended_bounds":{"min":1428465600000,"max":1428551999999},"script":"log(_value)"}}}}]]]; nested: ScriptException[dynamic scripting for [groovy] disabled]; }{[qsuoq24rQCmt-BkEuwe1tg][logstash-2015.04.08][2]: SearchParseException[[logstash-2015.04.08][2]: query[ConstantScore(BooleanFilter(+cache(@timestamp:[1428465600000 TO 1428551999999])))],from[-1],size[0]: Parse Failure [Failed to parse source [{"size":0,"query":{"filtered":{"query":{"query_string":{"analyze_wildcard":true,"query":""}},"filter":{"bool":{"must":[{"range":{"@timestamp":{"gte":1428465600000,"lte":1428551999999}}}],"must_not":[]}}}},"aggs":{"2":{"date_histogram":{"field":"@timestamp","interval":"30m","pre_zone":"-04:00","pre_zone_adjust_large_interval":true,"min_doc_count":1,"extended_bounds":{"min":1428465600000,"max":1428551999999},"script":"log(_value)"}}}}]]]; nested: ScriptException[dynamic scripting for [groovy] disabled]; }{[qsuoq24rQCmt-BkEuwe1tg][logstash-2015.04.08][3]: SearchParseException[[logstash-2015.04.08][3]: query[ConstantScore(BooleanFilter(+cache(@timestamp:[1428465600000 TO 1428551999999])))],from[-1],size[0]: Parse Failure [Failed to parse source [{"size":0,"query":{"filtered":{"query":{"query_string":{"analyze_wildcard":true,"query":""}},"filter":{"bool":{"must":[{"range":{"@timestamp":{"gte":1428465600000,"lte":1428551999999}}}],"must_not":[]}}}},"aggs":{"2":{"date_histogram":{"field":"@timestamp","interval":"30m","pre_zone":"-04:00","pre_zone_adjust_large_interval":true,"min_doc_count":1,"extended_bounds":{"min":1428465600000,"max":1428551999999},"script":"log(_value)"}}}}]]]; nested: ScriptException[dynamic scripting for [groovy] disabled]; }{[qsuoq24rQCmt-BkEuwe1tg][logstash-2015.04.08][4]: SearchParseException[[logstash-2015.04.08][4]: query[ConstantScore(BooleanFilter(+cache(@timestamp:[1428465600000 TO 1428551999999])))],from[-1],size[0]: Parse Failure [Failed to parse source [{"size":0,"query":{"filtered":{"query":{"query_string":{"analyze_wildcard":true,"query":"*"}},"filter":{"bool":{"must":[{"range":{"@timestamp":{"gte":1428465600000,"lte":1428551999999}}}],"must_not":[]}}}},"aggs":{"2":{"date_histogram":{"field":"@timestamp","interval":"30m","pre_zone":"-04:00","pre_zone_adjust_large_interval":true,"min_doc_count":1,"extended_bounds":{"min":1428465600000,"max":1428551999999},"script":"log(_value)"}}}}]]]; nested: ScriptException[dynamic scripting for [groovy] disabled]; }]"}KbnError@http://localhost:5601/index.js?_b=5930:39210:21
RequestFailure@http://localhost:5601/index.js?_b=5930:39247:1
callResponseHandlers/<@http://localhost:5601/index.js?_b=5930:42978:38
Promise.try@http://localhost:5601/index.js?_b=5930:46205:23
Promise.map/<@http://localhost:5601/index.js?_b=5930:46183:16
Promise.map@http://localhost:5601/index.js?_b=5930:46182:26
callResponseHandlers@http://localhost:5601/index.js?_b=5930:42950:1
fetchWithStrategy/<@http://localhost:5601/index.js?_b=5930:43068:16
qFactory/defer/deferred.promise.then/wrappedCallback@http://localhost:5601/index.js?_b=5930:20873:31
qFactory/defer/deferred.promise.then/wrappedCallback@http://localhost:5601/index.js?_b=5930:20873:31
qFactory/ref/<.then/<@http://localhost:5601/index.js?_b=5930:20959:26
$RootScopeProvider/this.$get</Scope.prototype.$eval@http://localhost:5601/index.js?_b=5930:22002:16
$RootScopeProvider/this.$get</Scope.prototype.$digest@http://localhost:5601/index.js?_b=5930:21814:15
$RootScopeProvider/this.$get</Scope.prototype.$apply@http://localhost:5601/index.js?_b=5930:22106:13
done@http://localhost:5601/index.js?_b=5930:17641:34
completeRequest@http://localhost:5601/index.js?_b=5930:17855:7
createHttpBackend/</xhr.onreadystatechange@http://localhost:5601/index.js?_b=5930:17794:1

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/ea35e32b-1c3e-49c1-af00-be1a3abec945%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.