Good point, however monitoring file sizes from Zabbix perspective is more generic an re-usable. syslog-ng-ctl solution is specific to syslog-ng Also, we will have similar permission issues there (so, we need to implement some sudo based authorization, which is obviously possible), so simple du in a bash script looked simpler :) /usr/sbin/syslog-ng-ctl stats Error connecting control socket, socket='/var/lib/syslog-ng/syslog-ng.ctl', error='Permission denied' L: On Mon, Jul 13, 2020 at 1:55 PM SZIGETVÁRI János <jszigetvari@gmail.com> wrote:
Hi Laci,
Why don't you monitor the output of syslog-ng-ctl stats or syslog-ng-ctl query instead to see queued counters? IMHO it would be easier than checking the files, which may become corrupted and renamed, or become larger than 4KB even in cases when there are no apparent problems. (For instance if the queue file is several GB in size, but only holds a few KB of actual buffered data.)
Best Regards, János -- Janos SZIGETVARI RHCE, License no. 150-053-692 <https://www.redhat.com/rhtapps/verify/?certId=150-053-692>
LinkedIn: linkedin.com/in/janosszigetvari
__@__˚V˚ Make the switch to open (source) applications, protocols, formats now: - windows -> Linux, iexplore -> Firefox, msoffice -> LibreOffice - msn -> jabber protocol (Pidgin, Google Talk) - mp3 -> ogg, wmv -> ogg, jpg -> png, doc/xls/ppt -> odt/ods/odp
Pal, Laszlo <vlad@vlad.hu> ezt írta (időpont: 2020. júl. 13., H, 13:24):
Hi,
We want to monitor disk-buffer files, so we can detect if there is are some issues with the destinations. syslog-ng creates these files with permissions like this
otal 360 -rw-------. 1 root root 4096 Oct 10 2019 syslog-ng-00000.qf -rw-------. 1 root root 4096 Jul 12 03:49 syslog-ng-00001.qf
So, our monitor script (for zabbix) cannot stat files because it is running under user zabbix.
I'm not sure how to submit a feature request nowadays, but it would be great of perm() option added to disk-buffer()
Any chance? Thx L:
______________________________________________________________________________ Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng FAQ: http://www.balabit.com/wiki/syslog-ng-faq
______________________________________________________________________________ Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng FAQ: http://www.balabit.com/wiki/syslog-ng-faq