Hi,
I want to replace a string in my message field. How should i proceed in logstash filter.
Below is a sample [message] log:
input to logstash:(before parsing)
some text in the beginning Auth: Sec slghltrgj;sjtg;String to replaced;rtfygjhrslfknr;f some text after
output from logstash: (after parsing)
some text in the beginning **Auth: Sec **************************************** some text after
Can anyone provide some ideas on how i can do the above parsing in logstash?
Thanks @magnusbaeck
Is there a way i can do the following using logstash filters:
I have an ID stored in a field example id: 123456789.
I want to replace first 5 digits with an 'x'. so that id looks like, id:xxxxx6789.
How can i do this in logstash filters?
@magnusbaeck Is there a way we can perform a count operation in if condition in logstash filter.
For example:
I am trying to check the occurrence of "text" in my [message] field.
something like this,
filter{
if count("text")[message] >1 {
"do something"
}
}
if this is not possible, could you suggest a way to do this kind of operation.
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.