hello all,
I am currently running logstash 6.x with ES 6.x and i am trying to leverage logstash to parse through the data and using mutate and gsub filters
i have a syslog_msg in the current format
example(): {"token”:”sdssfsfsfs”,”expires":"2018-04-27T08:01:22.405Z"}
i am trying to leverage gsub filter to remove example from this string so that it's a json struct to do further conversion to grab token and expiration fields
here is my filter conf
filter {
if [logsource] =~ "example-service" {
mutate {
gsub => [ "syslog_msg" , "example():" , ""]
}
json {
source => "syslog_msg"
target => "parsedJsonmsg"
tag_on_failure => ["_jsonparsefailure"]
}
}
}
any help appreciated i have tried multiple combinations of example() and trying to see if there is a better way to do this
thanks
CHakri