I have 2 fields of string type in filebeat index:
-
_index = kibana_sample_data_flights
(This field is marked aggregatable by default) -
message : 2018-12-21 02:31:31,792;INFO ;XSYD.2.5.0.1a5e8-uye1-9d87-8744-5343db306cd8;1;0;;GETCONFPRO;0;
I want to split by ; and get the timestamp
(This field is marked non-aggregatable by default , i made it as aggregatable)
Now I create a scripted field called firstword (i am splitting the string(message or _index) using underscore as delimiter and getting the firstword)
When i try for _index field, the painless query works as expected:
String[] parts = /_/.split(doc['_index'].value);
return parts[0]
But When i try for message field, i get error ( 3 of 6 shards failed) when in click on Discover:
String[] parts = /;/.split(doc['message'].value);
return parts[0]
Furthermore even simple parsing of message field using below query
return doc['message'].value;
is giving same error( 3 of 6 shards failed):
I am beginner to ELK . Can someone please help me resolve this.
Thanks a lot in advance