feat: add graylog plugin TCP support#9644
Conversation
dcd1ac5 to
a07efd2
Compare
Looks like new artifacts were built from this PR. Get them here!Artifact URLs |
|
Played through some (TCP) test cases. I think it is working fine. So we are glad, that after so many months gelf output plugin speaks TCP. Maybe in future this plugin will also speak secure TCP (TLS). We noticed a little issue: Input plugin name field (e.g. "name":"log_tail") are not sent with "_" prefix. Regarding Gelf spezification (https://docs.graylog.org/en/4.1/pages/gelf.html#gelf-payload-specification), all non standard fields should always be prefexed with "_". |
|
Hey @alespour , |
|
Hi @tamirhad I've created feature request #10367 for the connection TTL. |
Required for all PRs:
This PR resolves #9034.
It adds support for TCP. Servers (endpoints) may now be specified as URLs with either
udportcpscheme, eg."udp://127.0.0.1:12201"or"tcp://127.0.0.1:12201". For compatiblity with existing configurations, if scheme is missing (eg."127.0.0.1:12201") or is notudpneithertcp, UDP protocol is assumed.Sample config has been changed to reflect it:
Config option
timeoutallows to change connection dialup timeout.Connection handling has been refactored. Although I'm not quite sure, it may be OK for UDP to have a connection created for each outgoing message, but it would not work well for TCP where network resources would get depleted quickly. Therefore connections are reused (and recreated whenever needed, ie. typically after write error occurs).