作者: Tscccn |
日期: 2013 年 03 月 07 日 |
围观: 19163次+ |
SYSLOG服务
linux依旧使用syslogd作为日志监控进程,而在主流的linux发行版中依旧使用sysklog这个比较老的日志服务器套件。
syslog.conf内格式:
|
facility.level action 设备.优先级 动作 facility.level 字段也被称为seletor(选择条件),选择条件和动作之间用空格或tab分割开。 |
服务器1(日志服务器):kinggoo.com
服务器2:tscccn.com
服务器1上设置如下:
请将防火墙关掉,或者允许514端口通过syslog的守护进程要用到514端口
cat /etc/sysconfig/syslog
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
# Options to syslogd # -m 0 disables 'MARK' messages. # -r enables logging from remote machines # -x disables DNS lookups on messages recieved with -r //禁用掉dns记录项不够齐全或其他的日志中心的日志 # See syslogd(8) for more details # SYSLOGD_OPTIONS="-r -x -m 180" # 加 -r 选项以允许接受外来日志消息 # 加 -x 禁用掉dns记录项不够齐全或其他的日志中心的日志 # 加 -m 修改syslog的内部mark消息写入间隔时间(0为关闭)。例如-m 180,表示每隔180分钟(每天8次)在日志文件里增加一行时间戳消息 # 加 -h 默认情况下,syslog不会发送从远端接受过来的消息到其他主机,而使用该选项,则把该开关打开,所有接受到的信息都可根据syslog.conf中定义的@主机转发过去。 # Options to klogd # -2 prints all kernel oops messages twice; once for klogd to decode, and # once for processing with 'ksymoops' # -x disables all klogd processing of oops messages entirely # See klogd(8) for more details KLOGD_OPTIONS="-x" # SYSLOG_UMASK=077 # set this to a umask value to use for all log files as in umask(1). # By default, all permissions are removed for "group" and "other". |
接着向/[……]
继续阅读
最新评语