Capture full line of log file

Hello,

we try to send log entries from logfiles to opensearch with telegraf.

This works with this config:

[[inputs.file]]
alias = “graylog”
files = [“/var/log/graylog-server/server.log”]
file_tag = “server.log”
file_path_tag = “/var/log/graylog-server/server.log”

data_format = “grok”

grok_patterns = [‘%{TIMESTAMP_ISO8601:timestamp} %{LOGLEVEL:loglevel}%{SPACE}[%{NOTSPACE:process:string}]%{SPACE}%{GREEDYDATA:msg:string}’]
grok_timezone = “Europe/Berlin”

grok_multiline = true

The defined fields in the grok pattern show in opensearch, that’s fine.

In addition we want to have the full log messeage (the complete line) in opensearch. How can I achieve this?

Thanks in advance,

Dietmar