Hi I am using Kibana 5.6.4,
I have two fields in the documents as below
message: The WMI Performance hostWiley 0 down
beat.hostname: hostWiley
I want to create scripted field in kibana which can parse the message field and create a new field called error: 0(i,e with the 5th value in the message field "0")
my below painless script is not giving the expected result, it just throws failing shards error. Is the below syntax correct?
m = /^(?:\S+\s){4}(\S+)/.matcher(doc['message'].value);
if (doc['beat.hostname'].value == hostWiley) {
return m
}