HI all,
I am getting this error while running groovy script in kibana 4 visualization Visualize: failed to run inline script [doc['node.ifs.bytes.used'].value * 100 / doc['node.ifs.bytes.total'].value] using lang [groovy]
Error: Request to Elasticsearch failed: {"error":{"root_cause":[{"type":"script_exception","reason":"failed to run inline script [doc['node.ifs.bytes.used'].value * 100 / doc['node.ifs.bytes.total'].value] using lang [groovy]"}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"isilon","node":"stQM7IvdQ9uFMSRcp5oEhA","reason":{"type":"script_exception","reason":"failed to run inline script [doc['node.ifs.bytes.used'].value * 100 / doc['node.ifs.bytes.total'].value] using lang [groovy]","caused_by":{"type":"illegal_argument_exception","reason":"No field found for [node.ifs.bytes.used] in mapping with types []"}}}]}
at Array.map (native)
at Function.Promise.map
at callResponseHandlers
I have done this changes in elasticsearch.yml .
script.inline: true
script.engine.groovy.inline.aggs: true
script.engine.groovy.inline.mapping: true
script.engine.groovy.inline.search: true
script.engine.groovy.inline.update: false
script.engine.groovy.inline.plugin: false
script.engine.groovy.inline.aggs: on
script.engine.groovy.inline.mapping: on
I'm not sure but I don't think you need to use or enable groovy scripting to get your percent bytes used. I think you can just create a scripted field in Kibana on the Settings tab and then use that field in your visualizations.
Here's an example of one I did just to try doing some math in a scripted field (it doesn't actually make any sense but it works).
Thank you for your reply
I tried to do this same but I'm getting error when I divide two values , an addition or any of the -,/,* is working well with one value and any other numbers .
Like doc[].values*8/(1024*1024)
Hello @LeeDr ,
sorry for late reply and following is my error:
Visualize: failed to run inline script [doc['node.ifs.bytes.used'].value * 100 / doc['node.ifs.bytes.total'].value] using lang [groovy] Error: Request to Elasticsearch failed: {"error":{"root_cause":[{"type":"script_exception","reason":"failed to run inline script [doc['node.ifs.bytes.used'].value * 100 / doc['node.ifs.bytes.total'].value] using lang [groovy]"}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"isilon","node":"stQM7IvdQ9uFMSRcp5oEhA","reason":{"type":"script_exception","reason":"failed to run inline script [doc['node.ifs.bytes.used'].value * 100 / doc['node.ifs.bytes.total'].value] using lang [groovy]","caused_by":{"type":"illegal_argument_exception","reason":"No field found for [node.ifs.bytes.used] in mapping with types "}}}]} at Array.map (native) at Function.Promise.map at callResponseHandlers
This is the same error I specified earlier but not getting it how to solve it ?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.