IT2012. 3. 20. 19:36
반응형


options {
        long_hostnames(off);
        sync(0);
        stats(43200);
        dns_cache(yes);
        use_fqdn(no); 
        keep_hostname(yes);
        use_dns(yes);     
};

source gateway {
        unix-stream("/dev/log");
        internal();
        udp(ip(0.0.0.0) port(514));
};

source tcpgateway {
        unix-stream("/dev/log");
        internal();
        tcp(ip(0.0.0.0) port(514) max_connections(1000));
};

destination hosts {
        file("/home2/syslogs/$HOST/$FACILITY"
        owner(root) group(root) perm(0600) dir_perm(0700)
create_dirs(yes));
};

log {
        source(gateway); destination(hosts);
};

log {
        source(tcpgateway); destination(hosts);
};



syslog-ng.conf 파일

/home2/syslogs/ 디렉토리로 로그 기록
반응형
Posted by Dream Come True