Forum Discussion
Syslog off box via TCP and stop writing to disk
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?
Thanks,
-Dan
- hoolio
Cirrostratus
Hi Dan, - dan_19334
Nimbostratus
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. - Ed_Hammond_2611
Nimbostratus
You need to add the exclusion rules to the syslog-ng.conf file on the LTM lines. For example:filter f_local0 { facility(local0) and level(info..emerg) and not match(": Rule ") ; }; destination d_ltm { file("/var/log/ltm" create_dirs(yes)); }; log { source(local); filter(f_local0); destination(d_ltm); };
- dan_19334
Nimbostratus
Thanks, that works for not writing the iRule logs to disk. - Jessie_O__45052Historic F5 AccountYou 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.
- Matt_112326Historic F5 AccountPlease note, if you reboot or change the syslog config with the GUI or bigpipe any changes made to the syslog config will be gone.
- Ian_SmithRet. EmployeeYou can use the command line to include an entire file of syslog-ng.conf changes, the instructions are here:
- suprety_83882
Nimbostratus
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 filesyslog include "
weblog filter Log WebLog to remote server
filter f_weblog {
facility(local4) and level(debug..emerg) and match(\"WEBLOG\");
};
destination d_weblog {
udp(\"192.168.0.68\" port (19999));
};
log {
source(local);
filter(f_weblog);
destination(d_weblog);
};
filter f_no_weblog {
not match(\"WEBLOG\");
};
local4.*
/var/log/ltmfilter f_local4 {
facility(local4);
};
log {
source(s_syslog_pipe);
filter(f_local4);
filter(f_no_weblog);
destination(d_ltm);
};
"
Any help would be greatly appreciated.
- JRahm
Admin
if logging to syslog, you ARE writing to disk. To avoid it, you need to use the log or HSL:: commands in iRules - hoolio
Cirrostratus
suprety, that looks about right at first glance. What does your syslog-ng.conf file look like after saving the config?
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com