FileBeat directly to ELS or via LogStash?

旧时模样 提交于 2019-12-05 05:54:55

Logstash is useful if you need to aggregate logs from many servers and apply some common transformations and filtering to your events.

If your log events are already structured and you are ok with indexing them directly, then you can definitely have Filebeat send them directly to ES. If ES goes down (e.g. for maintenance), Filebeat will retry until it can successfully send the events.

Is this a sensible option or does LogStash have value over and above parsing that we might need?

Deciding to use Logstash or not in your case depends if you need to treat the logs before inserting them in ES.

In addition to parsing (which is apparently useless in your use case), you can use Logstash to add a location with the geoip filter, parse a date with the date filter, replace a word with another, replace a field with a hash...
You can have a look at the available filter here.

If we do use LogStash can I use that to harvest log files or should I still use FileBeat to pump the logs to LogStash?

If you need Logstash and can afford to run it on the machine where your logs are, you can avoid using filebeat, by using the file input.
But keep in mind that Logstash, especially if used for parsing, can consume a lot of resources, it is better to have it on another machine and use filebeat to pump the logs to Logstash.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!