多くの Centos クライアント (Centos 5-7) があります。すべてのクライアントがログを syslog 経由で graylog サーバーに送信するようにします。これは、rsyslog がインストールされているクライアントで機能します。しかし、古いクライアントには rsyslog がありません。彼らはsyslogを使用します。
ファイルを機能させるには、ファイルの何を変更すればよい/etc/syslog.conf
ですか? 助けてくれてありがとう。
他のクライアントには graylog-collector を使用します。
graylog-collector の私の設定:
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
}
}
GELF 形式の graylog2 インターフェイスで入力を作成するだけです!
古い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);
};