New line in collector snippet


(N3xus) #1

Hello I’m trying to add new custom field to winlogbeat. Following is the snippet I’m trying but instead of new line it literally printing “\n”

{{if .Windows}}
  - name: CustomLog
\n   fields:
\n	  app:'winlogbeat'
{{end}}

How can i print new line into winlogbeat config?


(Crchad) #2

Did you ever figure this out; I’m having the same issue?


#3

have you checked the output in eg. notepad++, windows notepad doesn’t support \n, only with \r


(Jochen) #4

Please create a bug report for this at https://github.com/Graylog2/graylog-plugin-collector/issues