[syslog-ng] Local sources seem not to be working

Alexandre Santos ASantos at infinera.com
Thu May 5 14:31:13 UTC 2022

Hi Szilard,

The logs being written in /var/log/linecard.log are the ones coming from the ‘syslog(ip( transport("udp") port(514) keep-alive(no));’ source.
Because log messages received in syslog() source, have always local4 facility.

I am sending you in attachment the write_with_rotation.sh script.


From: syslog-ng <syslog-ng-bounces at lists.balabit.hu> On Behalf Of Szilard Parrag (sparrag)
Sent: 5 de maio de 2022 07:32
To: syslog-ng at lists.balabit.hu
Subject: Re: [syslog-ng] Local sources seem not to be working

CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.

Hi Alex,

After checking the stats, you have sent we can see that there had been some writes:
dst.program;d_localfile_linecard#0;/opt/machine/local/bin/write_with_rotation.sh /var/log/linecard.log 10 10;a;written;4518

dst.program;d_localfile_linecard#0;/opt/machine/local/bin/write_with_rotation.sh /var/log/linecard.log 10 10;a;written;4549

·         we do not see increase in the counters of /var/log destinatons, but only on one destination

·         we could only see an increase in syslog-udp processed counters

·         there are no dropped/queued counters

We would guess this could be due to flow-control, but for that we would need to see non-zero queued counter values, which is not the case. It could happen that one destination hangs/can't send messages out, which leads to suspended sources due to flow-control, but the syslog() source is not affected since it doesn't send messages to the hanged destination(s).

Based on the stats, only "d_localfile_linecard" is active (~30 messages in 15 minutes), maybe the syslog() source would be affected too without the filtering.

We should see more internal logs, which is problematic, since internal() source seems to be stopped too. For that I would recommend extracting internal() source from the s_src statement and putting it in a separate log path with a simple file destination.
Also, if possible, could you please share your `write_with_rotation.sh` script? It is unlikely that it interferes with syslog-ng, but a double check would be nice. 🙂

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.balabit.hu/pipermail/syslog-ng/attachments/20220505/5cbc415b/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: write_with_rotation.sh
Type: application/octet-stream
Size: 3512 bytes
Desc: write_with_rotation.sh
URL: <http://lists.balabit.hu/pipermail/syslog-ng/attachments/20220505/5cbc415b/attachment-0001.obj>

More information about the syslog-ng mailing list