Can filebeat pick up log entries based on keywords?

Don't know how performand it is but there is a n include_lines option in the configuration of the log input

see
https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-input-log.html#filebeat-input-log-include-lines