# Send batch file output to Elasticsearch

**URL:** https://discuss.elastic.co/t/send-batch-file-output-to-elasticsearch/248672
**Category:** Elasticsearch
**Created:** [September 15, 2020, 12:34pm UTC](https://discuss.elastic.co/t/send-batch-file-output-to-elasticsearch/248672 "2020-09-15T12:34:24Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![shiv97](https://avatars.discourse-cdn.com/v4/letter/s/e8c25b/32.png) [@shiv97](https://discuss.elastic.co/u/shiv97)
#### Post date: [September 15, 2020, 12:34pm UTC](https://discuss.elastic.co/t/send-batch-file-output-to-elasticsearch/248672/1 "2020-09-15T12:34:24Z")

</div>

Hello Everyone,

I am having one batch file, when I run batch file in command prompt it prints some output  
I want to ingest this output in Elasticsearch instance.

kindly provide me help on this case!!

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [September 15, 2020, 10:26pm UTC](https://discuss.elastic.co/t/send-batch-file-output-to-elasticsearch/248672/2 "2020-09-15T22:26:30Z")

</div>

You will need to pipe that output to somewhere - a file, or even Filebeat's stdin. Then send it to Elasticsearch.

---

<div class="post-metadata">

### Author: ![shiv97](https://avatars.discourse-cdn.com/v4/letter/s/e8c25b/32.png) [@shiv97](https://discuss.elastic.co/u/shiv97)
#### Post date: [September 16, 2020, 5:57am UTC](https://discuss.elastic.co/t/send-batch-file-output-to-elasticsearch/248672/3 "2020-09-16T05:57:11Z")

</div>

Thanks @warkolm.

There is no way to directly send the output of the batch file to ES instance.  
Can we do this using logstash exec input plugin?

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [September 16, 2020, 6:12am UTC](https://discuss.elastic.co/t/send-batch-file-output-to-elasticsearch/248672/4 "2020-09-16T06:12:13Z")

</div>

Yeah, that'd work.

---

<div class="post-metadata">

### Author: ![shiv97](https://avatars.discourse-cdn.com/v4/letter/s/e8c25b/32.png) [@shiv97](https://discuss.elastic.co/u/shiv97)
#### Post date: [September 16, 2020, 10:00am UTC](https://discuss.elastic.co/t/send-batch-file-output-to-elasticsearch/248672/5 "2020-09-16T10:00:27Z")

</div>

Hi @warkolm can you please provide the syntax to use this,

Great Thanks!!

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [September 16, 2020, 9:20pm UTC](https://discuss.elastic.co/t/send-batch-file-output-to-elasticsearch/248672/6 "2020-09-16T21:20:14Z")

</div>

You'd need to refer to the documentation for that sorry, I don't know it.

---

<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 14, 2020, 9:20pm UTC](https://discuss.elastic.co/t/send-batch-file-output-to-elasticsearch/248672/7 "2020-10-14T21:20:15Z")

</div>

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