I have a string field message in filebeats index
message : "2018-12-07 00:42:57,797;INFO ;ATDSDSFCMTWB03.66220.127.116.11a7eec05-287d-462e-b2b5-bab666ee33e6;1;0;;GetSiteDetailsHandler;2;"
I need to split the string & extract the last integer(which is 2 here) and assign it to a new field .
I know we need to use scripted field(painless script) for this case .
Can someone please suggest painless script query to do this.