# Output.elasticsearch -\> console

**URL:** <https://discuss.elastic.co/t/output-elasticsearch-console/132708>\
**Category:** Beats\
**Tags:** beats-development\
**Created:** [May 22, 2018, 1:47am UTC](https://discuss.elastic.co/t/output-elasticsearch-console/132708 "2018-05-22T01:47:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ecc256](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ecc256/32/59815_2.png) [@ecc256](https://discuss.elastic.co/u/ecc256)\
**Post date:** [May 22, 2018, 1:47am UTC](https://discuss.elastic.co/t/output-elasticsearch-console/132708/1 "2018-05-22T01:47:56Z")

</div>

Guys,  
How do I set output.elasticsearch to console only, without elasticsearch hosts?  
If I do  
`# hosts: ["localhost:9200"]`  
`console:`  
I get  
_Exiting: error initializing publisher: missing required field accessing 'output.elasticsearch.hosts' (source:'test.yml')_

I do know, -e flag sends filebeat log to stderr.  
I do want to run beat NOT in test mode with output to console instead of elasticsearch.  
Is it possible?

---

<div class="post-metadata">

**Author:** ![adrisr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/adrisr/32/25423_2.png) [@adrisr](https://discuss.elastic.co/u/adrisr)\
**Post date:** [May 22, 2018, 4:12am UTC](https://discuss.elastic.co/t/output-elasticsearch-console/132708/2 "2018-05-22T04:12:50Z")

</div>

What you want is to use console output, which is a different kind of output than elasticsearch:

```auto
# output.elasticsearch:
# hosts: ["localhost:9200"]

output.console:
  enabled: true
  pretty: true

```

For that you need to comment-out the elasticsearch output completely, not just the hosts field, as beats only allow one output to be specified.

---

<div class="post-metadata">

**Author:** ![ecc256](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ecc256/32/59815_2.png) [@ecc256](https://discuss.elastic.co/u/ecc256)\
**Post date:** [May 22, 2018, 4:29am UTC](https://discuss.elastic.co/t/output-elasticsearch-console/132708/3 "2018-05-22T04:29:59Z")

</div>

Adrian,

> [@adrisr](#):
>
> For that you need to comment-out the elasticsearch output completely, not just the hosts field, as beats only allow one output to be specified.

Got it!  
That’s exactly what I was missing! 😊  
Thanks a lot!

---

<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 19, 2018, 4:30am UTC](https://discuss.elastic.co/t/output-elasticsearch-console/132708/4 "2018-06-19T04:30:04Z")

</div>

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