我们有很多Centos客户端(Centos 5-7)。我希望所有客户端都通过syslog将日志发送到graylog服务器。这适用于安装了rsyslog的客户端。但是旧的客户端没有rsyslog。他们使用syslog。
我应该更改/etc/syslog.conf文件中的哪些内容才能使其正常工作?谢谢你的帮助。
发布于 2016-01-28 00:23:54
对其他客户端使用灰度日志收集器:
我的graylog收集器的conf:
server-url = "http://192.168.254.184:12900/"
inputs {
win-eventlog-application {
type = "windows-eventlog"
source-name = "Application"
poll-interval = "1s"
}
win-eventlog-system {
type = "windows-eventlog"
source-name = "System"
poll-interval = "1s"
}
win-eventlog-security {
type = "windows-eventlog"
source-name = "Security"
poll-interval = "1s"
}
}
outputs {
gelf-tcp {
type = "gelf"
host = "192.168.254.184"
port = 12201
}
}只需在graylog2接口中为GELF格式创建一个输入即可!
发布于 2016-02-04 16:35:39
您是否使用旧的syslog或syslog-ng?如果使用syslog,则无法更改输出格式,但如果使用syslog-ng,请尝试:
# Define TCP syslog destination.
destination d_net {
syslog("graylog.example.org" port(514));
};
# Tell syslog-ng to send data from source s_src to the newly defined syslog destination.
log {
source(s_src); # Defined in the default syslog-ng configuration.
destination(d_net);
};https://stackoverflow.com/questions/34911505
复制相似问题