# Import text file to logstash

**URL:** <https://discuss.elastic.co/t/import-text-file-to-logstash/286303>\
**Category:** Logstash\
**Created:** [October 9, 2021, 5:41pm UTC](https://discuss.elastic.co/t/import-text-file-to-logstash/286303 "2021-10-09T17:41:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![quyennguyen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/quyennguyen/32/91626_2.png) [@quyennguyen](https://discuss.elastic.co/u/quyennguyen)\
**Post date:** [October 9, 2021, 5:41pm UTC](https://discuss.elastic.co/t/import-text-file-to-logstash/286303/1 "2021-10-09T17:41:13Z")

</div>

I had some text files with formats like this.

`10/09-22:09:34.989323 [**] [1:100000015:3] "OR SQL Injection Detected" [**] [Priority: 0] {TCP} 192.168.186.25:44748 -> 192.168.186.162:80 10/09-22:09:34.989323 [**] [1:100000015:3] "OR SQL Injection Detected" [**] [Priority: 0] {TCP} 192.168.186.25:44748 -> 192.168.186.162:80 10/09-22:09:34.994995 [**] [1:100000017:4] "Possible DDoS Attack" [**] [Priority: 0] {TCP} 192.168.186.25:44756 -> 192.168.186.162:80 10/09-22:09:34.995210 [**] [1:100000017:4] "Possible DDoS Attack" [**] [Priority: 0] {TCP} 192.168.186.25:44758 -> 192.168.186.162:80 10/09-22:09:34.995481 [**] [1:100000019:5] "Possible Brute Force Attack" [**] [Priority: 0] {TCP} 192.168.186.25:44756 -> 192.168.186.162:80 10/09-22:09:34.995481 [**] [1:100000015:3] "OR SQL Injection Detected" [**] [Priority: 0] {TCP} 192.168.186.25:44756 -> 192.168.186.162:80`

I want to send this to logstash and use it in my kibana but I don't really know how to do that.

Anyone help me, please!

---

<div class="post-metadata">

**Author:** ![zx8086](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zx8086/32/94917_2.png) [@zx8086](https://discuss.elastic.co/u/zx8086)\
**Post date:** [October 9, 2021, 6:45pm UTC](https://discuss.elastic.co/t/import-text-file-to-logstash/286303/2 "2021-10-09T18:45:24Z")

</div>

You can use the Logstash Input - File

> **[File input plugin | Logstash Reference \[7.15\] | Elastic](https://www.elastic.co/guide/en/logstash/current/plugins-inputs-file.html)**

Then you can grok or dissect the data via these filters

> **[Grok filter plugin | Logstash Reference \[7.15\] | Elastic](https://www.elastic.co/guide/en/logstash/current/plugins-filters-grok.html)**

> **[Dissect filter plugin | Logstash Reference \[7.15\] | Elastic](https://www.elastic.co/guide/en/logstash/current/plugins-filters-dissect.html)**

and then you can send the filtered result to the Elasticsearch Output.

> **[Elasticsearch output plugin | Logstash Reference \[7.15\] | Elastic](https://www.elastic.co/guide/en/logstash/current/plugins-outputs-elasticsearch.html)**

---

<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:** [November 6, 2021, 6:46pm UTC](https://discuss.elastic.co/t/import-text-file-to-logstash/286303/3 "2021-11-06T18:46:06Z")

</div>

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