I am trying to search a pattern that contain spaces and its not working.
However, if i put something without space that's working absolutely fine; i am able to send mail to required address after string found in log file.
Below are the lines from my logstash.conf (using ruby filter in my logstash config file).
You're trying to match a log with the =~ operator i'll suggest you to try to parse it using grok filters and creating fields.
You could also split the field using ":" and try to clear out the log message you want eg: "The connection attempt failed" and understand where it came from with fields.
Problem statement String is searchable when it has no spaces, but vise-versa is not working.
i have created filed already while using Ruby filter. Did not understood what you mentioned by "creating fields".
Below is the full code, if that helps to understand more on this.
filter {
ruby {
code => 'event.cancel if event.get("message") == "\u0000"'
}
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.