# What is the process to index the .txt using logsth and filebeat?

**URL:** <https://discuss.elastic.co/t/what-is-the-process-to-index-the-txt-using-logsth-and-filebeat/234379>\
**Category:** Elasticsearch\
**Created:** [May 26, 2020, 3:52pm UTC](https://discuss.elastic.co/t/what-is-the-process-to-index-the-txt-using-logsth-and-filebeat/234379 "2020-05-26T15:52:58Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Youssef\_SBAI](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/youssef_sbai/32/64242_2.png) [@Youssef\_SBAI](https://discuss.elastic.co/u/Youssef_SBAI)\
**Post date:** [May 26, 2020, 3:52pm UTC](https://discuss.elastic.co/t/what-is-the-process-to-index-the-txt-using-logsth-and-filebeat/234379/1 "2020-05-26T15:52:58Z")

</div>

What is the process to index the .txt using logsth and filebeat ??

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [May 26, 2020, 4:13pm UTC](https://discuss.elastic.co/t/what-is-the-process-to-index-the-txt-using-logsth-and-filebeat/234379/2 "2020-05-26T16:13:31Z")

</div>

What do you have in this file?  
Is it a single file?

---

<div class="post-metadata">

**Author:** ![Youssef\_SBAI](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/youssef_sbai/32/64242_2.png) [@Youssef\_SBAI](https://discuss.elastic.co/u/Youssef_SBAI)\
**Post date:** [May 26, 2020, 4:32pm UTC](https://discuss.elastic.co/t/what-is-the-process-to-index-the-txt-using-logsth-and-filebeat/234379/3 "2020-05-26T16:32:51Z")

</div>

here is the first line of my .txt file

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/7/d/7def301dd59c0b7c63cb7ddc74b6fece33ca12e1.png)

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [May 26, 2020, 7:30pm UTC](https://discuss.elastic.co/t/what-is-the-process-to-index-the-txt-using-logsth-and-filebeat/234379/4 "2020-05-26T19:30:57Z")

</div>

Looks like a CSV file. Not really a text file. Is it?

---

<div class="post-metadata">

**Author:** ![Youssef\_SBAI](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/youssef_sbai/32/64242_2.png) [@Youssef\_SBAI](https://discuss.elastic.co/u/Youssef_SBAI)\
**Post date:** [May 27, 2020, 8:04am UTC](https://discuss.elastic.co/t/what-is-the-process-to-index-the-txt-using-logsth-and-filebeat/234379/5 "2020-05-27T08:04:38Z")

</div>

It is a screen shoot of CSV file but is it a .txt file

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [May 27, 2020, 8:21am UTC](https://discuss.elastic.co/t/what-is-the-process-to-index-the-txt-using-logsth-and-filebeat/234379/6 "2020-05-27T08:21:20Z")

</div>

So you want to index it as a flat text like:

```auto
{
  "message": "chaine,job,date_plan\nINC880P,INC88,2020-05-22"
}

```

Or do you want to have it as:

```auto
{
  "chaine": "INC880P",
  "job": "INC88",
  "date_plan": "2020-05-22"
}

```

---

<div class="post-metadata">

**Author:** ![Youssef\_SBAI](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/youssef_sbai/32/64242_2.png) [@Youssef\_SBAI](https://discuss.elastic.co/u/Youssef_SBAI)\
**Post date:** [May 27, 2020, 8:23am UTC](https://discuss.elastic.co/t/what-is-the-process-to-index-the-txt-using-logsth-and-filebeat/234379/7 "2020-05-27T08:23:06Z")

</div>

I use logstash and filebeat for ingestion

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [May 27, 2020, 8:23am UTC](https://discuss.elastic.co/t/what-is-the-process-to-index-the-txt-using-logsth-and-filebeat/234379/8 "2020-05-27T08:23:39Z")

</div>

And?

---

<div class="post-metadata">

**Author:** ![Youssef\_SBAI](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/youssef_sbai/32/64242_2.png) [@Youssef\_SBAI](https://discuss.elastic.co/u/Youssef_SBAI)\
**Post date:** [May 27, 2020, 8:24am UTC](https://discuss.elastic.co/t/what-is-the-process-to-index-the-txt-using-logsth-and-filebeat/234379/9 "2020-05-27T08:24:27Z")

</div>

I use logstash and filebeat for ingestion

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [May 27, 2020, 8:42am UTC](https://discuss.elastic.co/t/what-is-the-process-to-index-the-txt-using-logsth-and-filebeat/234379/10 "2020-05-27T08:42:02Z")

</div>

Yes you already said that. But you did not answer to my question.  
Do you need help?

---

<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:** [June 24, 2020, 8:42am UTC](https://discuss.elastic.co/t/what-is-the-process-to-index-the-txt-using-logsth-and-filebeat/234379/11 "2020-06-24T08:42:04Z")

</div>

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