Table of Contents

syslog-ng

Installation

# opkg install syslog-ng3

In Backfire 10.3.1-rc4, there are missing depencies. Install with

# opkg install libdbi

Configuration

Configuration is controlled by /etc/syslog-ng.conf The default configuration logs to /var/log/messages.

Below is a sample configuration for logging to a remote server via UDP (from http://www.systemajik.com/blog/openwrt-syslog-ng-installation/):

options {
    chain_hostnames(off);
    sync(0);
    stats(0);
};

source src { unix-stream("/dev/log"); internal(); };
source kernel { file("/proc/kmsg" log_prefix("kernel: ")); };

destination messages { file("/var/log/messages" log_fifo_size(256)); };
destination d_udp { udp("192.168.10.2" port(514)); };

log {
    source(src);
    source(kernel);
    destination(d_udp);
#    destination(messages);
};

Startup

# /etc/init.d/syslog-ng enable
# /etc/init.d/syslog-ng start

Back to top

doc/howto/log.syslog-ng.txt · Last modified: 2011/06/28 07:38 by despot