I have a device sending in logs which have "" before every string caracter and I would like to remove them or rewrite them to a simple ". So this " --> " to this.
Logs:
srcintfrole="undefined" dstip=255.255.255.255 dstport=000 dstintf="interface" dstintfrole="interface" srccountry="Reserved" dstcountry="counrtyname" sessionid=2458616 proto=6 action="timeout" policyid=0 service="HTTPS"
I have tried with a logstash filter but it does not seem to work.
input {
tcp {
port => port_number
}
}
filter{
mutate {
gsub => ["message", "\"", '"']
}
}
output {
elasticsearch {
hosts => ["host_name"]
index => "index_name"
cacert => "cert_path"
pipeline => "pipeline_name"
user => "user_name"
password => "password"
}
}
The logs arrive into elasticsearch but without required modifications.
Any help or advice is greatly appreciated.
Márton