I use syslog output plugin to transport my log file to a syslog collector like logstash. My config is as below
[[outputs.syslog]]
address = “tcp://…”
framing = “non-transparent”
trailer = “LF”
However I found that the separator character between different metrics is \x00 instead of \x0A.
And if I change the trailer attribute to “NUL”, then the separator is changed to \x01.
I use Telegraf 1.17 and 1.21 in Redhat7 platform, both have such problem. I am not sure that is a bug, or there is something wrong in my config. Please advise.
And using a inputs.tail plugin to capture the test.log. After startup telegraf, I run above shell script, then at log receiver side (I use logstash) I observe the abnormal output.
The most strange to me is that, the “NUL” will let the separator become \x01. Sounds a bug was hit.
We are using this go-syslog library to generate the strings. However, in Telegraf we are not using the Value() function to get the actual value of the trailer itself. Instead, we are using the const value.
I put up a PR here. Once tests pass, there will be some artifacts uploaded to the PR that you can download. Can you please give that a try?