我已经设置了 Kiwi Syslog 服务器,我在其中收集 Sonicwalls 防火墙流量日志,但我想通过任何 API 访问该日志或想在 elasticsearch 上发送。有没有办法设置 logstash 和 elasticsearch 来从我们收集日志的 kiwi syslog 服务器收集防火墙日志?
答案 0 :(得分:0)
我认为你有两个选择
让 Logstash 读取 kiwi syslog 服务器的 txt 文件输出
使用 Logstash Syslog 输入并让 Logstash 监听 syslog 事件、处理它们并将它们发送到 Elasticsearch [Info on the Logstash Syslog input can be found here]
答案 1 :(得分:0)
您不能直接发送到elasticsearch,但是您可以配置Kiwi 将日志转发到另一个地方,如果您将logstash 配置为接收此日志,则可以将其发送到elasticsearch。
您可以使用 udp
、tcp
或 syslog
输入来执行此操作,主要区别在于使用 syslog
输入有助于解析,但是系统日志消息必须遵循 RFC 中指定的格式,我不确定 Kiwi 是否是这种情况。
要使用 syslog
输入,您只需要像这样的配置。
input {
syslog {
port => "port-to-listen-to"
}
}
output {
elasticsearch {
your-elasticsearch-output
}
}