# Filebeat for Fail2Ban via Logstash?

**URL:** <https://discuss.elastic.co/t/filebeat-for-fail2ban-via-logstash/201115>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [September 25, 2019, 11:07pm UTC](https://discuss.elastic.co/t/filebeat-for-fail2ban-via-logstash/201115 "2019-09-25T23:07:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dan\_Kennedy](https://avatars.discourse-cdn.com/v4/letter/d/e0b2c6/32.png) [@Dan\_Kennedy](https://discuss.elastic.co/u/Dan_Kennedy)\
**Post date:** [September 25, 2019, 11:07pm UTC](https://discuss.elastic.co/t/filebeat-for-fail2ban-via-logstash/201115/1 "2019-09-25T23:07:28Z")

</div>

Hi All, need a bit of advice.

I'm using Elasticsearch to collect and categorise logs from network devices. These are being sent to Logstash before being forwarded to Elasticsearch.

I want to forward some Linux server Fail2Ban logs via Filebeat but have a few questions;

1. Is is best to forward these to Logstash or direct to Elasticsearch?
2. In either case, how would I ensure logs are matched? I found the following for logstash, but the file is for local input, so i'm unsure what this what need to look like for filebeat input?

> <https://gist.github.com/alexalouit/40d4b5b8f5c62bda6dad>

Any help would be much appreciated

Thanks

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 23, 2019, 11:07pm UTC](https://discuss.elastic.co/t/filebeat-for-fail2ban-via-logstash/201115/2 "2019-10-23T23:07:40Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
