We would like to remote syslog off the LTM via TCP for guaranteed delivery and also prevent the messages from writing to disk. In order to get TCP versus UDP we stream the logs through the local syslog-ng process as the remote iRule log command can only do UDP. I have referenced the great “Custom Syslog Configuration” article on how to append custom changes to syslog-ng, which has allowed us to stream syslog messages off the box via TCP.
The problem is that even though we have added configs to send logs off the box, the syslog-ng process is still writing them to disk which is causing a performance degradation. We want to send off the box and also stop from logging locally. When we do custom syslog configs it appears to only add additional configuration but doesn’t change any of the existing default configs. Is there anyway to override local0 (or other) to stop writing to /var/log/ltm?
For versions lower than 9.4.2 you can edit the syslog-ng.conf however you want. In 9.4.2+ there is the new CLI interface which limits the options. If you’re on a newer version, I’d suggest opening a case with F5 Support and asking them if it’s possible or for a workaround. Worst case, hopefully they’ll add the functionality in a future release.
Thanks for the information. Here is my workaround to get any custom syslog-ng configuration. This allowed me to stream logs off the box without writing them to disk.
1) Stop syslog-ng (bigstart stop syslog-ng)
2) Edit /var/run/config/syslog-ng.conf to meet my needs
3) Start syslog-ng (bigstart start syslog-ng)
This worked around the limitations of just appending syslog configs via the F5 method.
Thanks, that works for not writing the iRule logs to disk.
My problem is that to do this makes my syslog-ng configuration not supported by F5. The supported method to edit syslog-ng only allows you to append configurations to the file via the include method. Any advanced config like the you purpose requires a direct edit of the file. So, I guess my question is can this be done and still be supported by F5?
You should be able to selectively block disk logging by overriding the unwanted disk-file “destination” targets with empty (or TCP-forwarding) versions in your include block.
Please note, if you reboot or change the syslog config with the GUI or bigpipe any changes made to the syslog config will be gone.
joberreu is on to something. If you use the bigpipe syslog include command to include a second destination for an existing destination it will be used (it might be because it is the last one in the config file). For example:
bigpipe syslog include ‘“destination d_messages { udp(ip(10.10.1.10)); };”’
should cause log messages to go to the IP instead of the original file /var/log/messages.
I followed the article outlined above. But I am not able to override the default destination of log message. It is always written to disk. Here is my include file
syslog include "
weblog filter Log WebLog to remote server
filter f_weblog {
facility(local4) and level(debug..emerg) and match(\“WEBLOG\”);