<div dir="ltr"><div>Hi Alex,</div><div><br></div><div>You might want to look at the multi-line-prefix() option. Unfortunately though, that doesn't seem to be available for unix-dgram() and unix-socket() sources.</div><div>Your remaining options include using a regular file (with using multi-line-prefix()) for passing on the logs between the two syslog-ng instances, or you could also try to bind one to some port on 127.0.0.1, and have the other send the logs to that port using the syslog() driver.</div><div><br></div><div>Also, it may be important to know whether your logs are read from the original file/source properly (not as separate log messages on every newline). If the messages are improperly broken up there, there is little one can do about them in case of the second syslog-ng.</div><div><br></div><div>Best regards,</div><div>János</div><div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">--</div><div dir="ltr">Janos SZIGETVARI<br><span>RHCE, License no. <a href="https://www.redhat.com/rhtapps/verify/?certId=150-053-692" target="_blank">150-053-692</a></span><br></div><div dir="ltr"><span><br></span></div><div dir="ltr"><span>LinkedIn: <a href="http://linkedin.com/in/janosszigetvari" target="_blank">linkedin.com/in/janosszigetvari</a></span><br><br>__@__˚V˚<br>Make the switch to open (source) applications, protocols, formats now:<br>- windows -> Linux, iexplore -> Firefox, msoffice -> LibreOffice<br>- msn -> jabber protocol (Pidgin, Google Talk)<br>- mp3 -> ogg, wmv -> ogg, jpg -> png, doc/xls/ppt -> odt/ods/odp</div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Alexandre Santos <<a href="mailto:alexandre.rosas.santos@gmail.com">alexandre.rosas.santos@gmail.com</a>> ezt írta (időpont: 2020. szept. 7., H, 18:17):<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi,</div><div><br></div><div>I have some multi-line messages that are being broken, into single log messages, when they are sent over some remote host. In my configuration, I have one syslog-ng sending messages to other syslog-ng over unix-domain-socket. (check configurations in attachment).</div><div>My goal is to have content of
"/tmp/test1_udp_file.log" equal to the content of "/var/log/netconf-commands.log".</div><div><br></div><div>Do know what am I missing?</div><div>Any help is appreciated. Thanks in advance.</div><div>Alex<br></div><div><br></div><div><span style="font-family:monospace"><i><b></usr/sbin/syslog-ng -Fvde></b></i><br>[2020-09-07T15:57:17.711583] Incoming log entry from journal; message='AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA Test at 2020-09-07T15:57:17,448482284+00:00 \x0awith newline BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB'<br>[2020-09-07T15:57:17.711760] json-parser(): no marker at the beginning of the message, skipping JSON parsing ; input='AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA Test at 2020-09-07T15:57:17,448482284+00:00 \x0awith newline BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB', marker='@cim:'<br>[2020-09-07T15:57:17.712016] Reliable disk-buffer state saved; filename='/tmp/syslog-ng-00002.rqf', qdisk_length='0'<br>[2020-09-07T15:57:17.712046] Initializing destination file writer; template='/var/log/netconf-command.log', filename='/var/log/netconf-command.log'<br>[2020-09-07T15:57:17.712150] Outgoing message; message='<158>1 2020-09-07T15:57:17.449+00:00 localhost root 25947 - - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA Test at 2020-09-07T15:57:17,448482284+00:00 \x0awith newline BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB\x0a'<br>[2020-09-07T15:57:17.712299] Outgoing message; message='<158>1 2020-09-07T15:57:17.449+00:00 MYHOSTNAME root 25947 - - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA Test at 2020-09-07T15:57:17,448482284+00:00 \x0awith newline BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB\x0a'<br><br><i><b></var/log/netconf-commands.log></b></i><br><158>1 2020-09-07T15:57:17.449+00:00 localhost root 25947 - - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA Test at 2020-09-07T15:57:17,448482284+00:00</span></div><div><span style="font-family:monospace">with newline BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB<br><br><br><br><br><i><b><ip vrf exec MGMT /usr/sbin/syslog-ng -Fvde --cfgfile=/etc/syslog-ng/mgmt-syslog-ng.conf --pidfile=/var/lib/syslog-ng/mgmt-syslog-ng.pid --persist-file=/var/lib/syslog-ng/mgmt-syslog-ng.persist --control=/var/lib/syslog-ng/mgmt-syslog-ng.ctl></b></i><br>[2020-09-07T15:57:17.712514] Incoming log entry; line='<158>1 2020-09-07T15:57:17.449+00:00 MYHOSTNAME root 25947 - - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA Test at 2020-09-07T15:57:17,448482284+00:00 '<br>[2020-09-07T15:57:17.712762] Incoming log entry; line='with newline BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB'<br>[2020-09-07T15:57:17.712997] Outgoing message; message='<158>1 2020-09-07T15:57:17.449+00:00 MYHOSTNAME root 25947 - [meta sequenceId="2"] AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA Test at 2020-09-07T15:57:17,448482284+00:00 \x0a'<br>[2020-09-07T15:57:17.713250] Outgoing message; message='<158>1 2020-09-07T15:57:17.449+00:00 MYHOSTNAME root 25947 - [meta sequenceId="2"] AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA Test at 2020-09-07T15:57:17,448482284+00:00 \x0a'<br><br><i><b></tmp/test1_udp_file.log></b></i><br><158>1 2020-09-07T15:57:17.449+00:00 MYHOSTNAME root 25947 - [meta sequenceId="2"] AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA Test at 2020-09-07T15:57:17,448482284+00:00</span></div></div>
______________________________________________________________________________<br>
Member info: <a href="https://lists.balabit.hu/mailman/listinfo/syslog-ng" rel="noreferrer" target="_blank">https://lists.balabit.hu/mailman/listinfo/syslog-ng</a><br>
Documentation: <a href="http://www.balabit.com/support/documentation/?product=syslog-ng" rel="noreferrer" target="_blank">http://www.balabit.com/support/documentation/?product=syslog-ng</a><br>
FAQ: <a href="http://www.balabit.com/wiki/syslog-ng-faq" rel="noreferrer" target="_blank">http://www.balabit.com/wiki/syslog-ng-faq</a><br>
<br>
</blockquote></div>