Thank you @Badger ,
I tried doing this ,
mutate {
gsub => [
"message", "{%source.ip}", "1.1.1.1",
]
}
And the source ip got replaced , but in my scenario ,the value to be replaced is not predefined ( ie 1.1.1.1). I want to replace this with value of another field that is.("source. ip").
For example:
"newfield" : "12.12.12.1"
mutate {
gsub => [
"message", "{%source.ip}", "<value of the newfield>",
]
}
You may be able to use a sprintf reference. If gsub does not do the sprintf you may be able to make mutate+copy process the reference that you gsub in.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.