Grep in logstash

Don't use the obsolete grep filter; use conditionals instead, e.g. like this to delete all messages where the foo field isn't equal to "bar":

if [foo] != "bar" {
  drop { }
}