[remote syslog] Can't see messages from localhost

I wanted to setup a minimal syslog-ng 4.10 on 24.10.5
But I'm unable to log to localhost?!

The syslog-ng.conf seams correct. Process starts, and I get messages from remote systems.

# cat /etc/syslog-ng.conf

source s_network {
    udp(ip("0.0.0.0") port("514"));
    udp6(ip("::") port("514"));
};

destination d_remote {
    file("/var/log/remote.log");
};

log { source(s_network); destination(d_remote); };

But whats wrong with:

config system
    option  hostname        'test'
    option  log_ip          '127.0.0.1'
    option  log_proto       'udp'

Next time I should spend more them on reading, then on deleting the defaults from the packages, which should have pointed me directly to it...

My hint then was

# logread ; logread -f
Error: logfile not found!
Error: logfile not found!

Maybe the systems logging is also "swapped" with syslog-ng? :person_shrugging:
Indeed you need to handle local logging with syslog-ng instead ...

Minimal Dual-Stack config

# cat /etc/syslog-ng.conf


options {
    keep_hostname(yes);
    use_fqdn(yes);
    use_dns (no);
};

source s_local {
    internal();
    unix-dgram("/dev/log");
};

source s_kernel {
    file("/proc/kmsg" program_override("kernel"));
};

source s_network {
    network(
        ip("::")
        transport("tcp")
        port(514)
        ip-protocol(6)
    );
    network(
        ip("::")
        transport("udp")
        port(514)
        ip-protocol(6)
    );
};

destination d_messages {
    file("/var/log/messages");
};

log {
    source(s_local);
    source(s_kernel);
    source(s_network);
    destination(d_messages);
};


This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.