OPNsense Forum

Archive => 24.1, 24.4 Legacy Series => Topic started by: guest43963 on July 06, 2024, 04:47:33 AM

Title: syslog remote destination - possible to include system log?
Post by: guest43963 on July 06, 2024, 04:47:33 AM
I'm using OPNsense 24.1.9_4-amd64 and trying to include the /var/log/system/latest.log file in the files that syslog sends to a remote host.

In System > Settings > Logging > Remote > Applications, there does not seem to be an option that includes that file.

Is it somehow possible to manually include that file?
Title: Re: syslog remote destination - possible to include system log?
Post by: user944801 on July 06, 2024, 09:37:14 PM
Another destination driver & log statement in a custom syslog-ng conf file can be used to accomplish this. It may not survive software updates though.

Ex: /usr/local/etc/syslog-ng.conf.d/syslog-ng-system-log-remote.conf


destination system_log_remote_syslog {
    network("IP Address Goes Here" port(514) transport(udp));
};
log {
    source(s_all);
    filter(f_local_system);
    destination(system_log_remote_syslog);
};