syslog-ng怎麼過濾儲存非本機的Log - Linux

By Harry
at 2013-10-15T15:12
at 2013-10-15T15:12
Table of Contents
各位前輩大家好
小弟公司有需要使用到syslog-ng來收集log
但目前的問題在於要將外部的log寫到一個檔案裡
不知道要怎麼編輯Config檔才不會讓本機的Log也寫進去
PS.外部為不特定IP
以下是syslog-ng.conf內容, 但看來還是會有本機的LOG寫進去
source src { unix-dgram("/dev/log"); internal();
udp(ip(0.0.0.0) port(514));
};
destination xxxxx_pro {
file("/var/log/xxxxx_pro.log.log" owner("root")group("root") perm(0644)); };
filter f_authpriv { facility(auth, authpriv); };
filter f_kern { level(err .. emerg) and facility(kern); };
filter f_xxxxx { not filter(f_authpriv) and not filter(f_kern); };
log { source(src); filter(f_xxxxx); destination(xxxxx_pro); };
--
小弟公司有需要使用到syslog-ng來收集log
但目前的問題在於要將外部的log寫到一個檔案裡
不知道要怎麼編輯Config檔才不會讓本機的Log也寫進去
PS.外部為不特定IP
以下是syslog-ng.conf內容, 但看來還是會有本機的LOG寫進去
source src { unix-dgram("/dev/log"); internal();
udp(ip(0.0.0.0) port(514));
};
destination xxxxx_pro {
file("/var/log/xxxxx_pro.log.log" owner("root")group("root") perm(0644)); };
filter f_authpriv { facility(auth, authpriv); };
filter f_kern { level(err .. emerg) and facility(kern); };
filter f_xxxxx { not filter(f_authpriv) and not filter(f_kern); };
log { source(src); filter(f_xxxxx); destination(xxxxx_pro); };
--
Tags:
Linux
All Comments
Related Posts
位址 0xOO3 0xOB

By Regina
at 2013-10-15T14:37
at 2013-10-15T14:37
架設SERVER無法遠端登入

By Joseph
at 2013-10-14T19:45
at 2013-10-14T19:45
限制只有部分USER能從外部連線?

By Edward Lewis
at 2013-10-14T15:59
at 2013-10-14T15:59
HackingThursday 固定聚會 (2013-10-17)

By Sierra Rose
at 2013-10-14T12:09
at 2013-10-14T12:09
增加"最近存取文件"數量 (MINT)

By Brianna
at 2013-10-13T23:29
at 2013-10-13T23:29