# Error while sending logs to logstash with filebeats

**URL:** <https://discuss.elastic.co/t/error-while-sending-logs-to-logstash-with-filebeats/207652>\
**Category:** Logstash\
**Created:** [November 13, 2019, 8:16am UTC](https://discuss.elastic.co/t/error-while-sending-logs-to-logstash-with-filebeats/207652 "2019-11-13T08:16:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![David\_Samm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/david_samm/32/48390_2.png) [@David\_Samm](https://discuss.elastic.co/u/David_Samm)\
**Post date:** [November 13, 2019, 8:16am UTC](https://discuss.elastic.co/t/error-while-sending-logs-to-logstash-with-filebeats/207652/1 "2019-11-13T08:16:54Z")

</div>

> Getting following error while I try to fetch logs using filebeats to logstash
> 
> [logstash.outputs.elasticsearch] Installing elasticsearch template to \_template/logstash  
> [2019-11-13T13:36:49,899][ERROR][logstash.outputs.elasticsearch] Failed to install template. {:message=\>"Got response code '400' contacting Elasticsearch at URL '[http://localhost:9200/\_template/logstash](http://localhost:9200/_template/logstash)'", :class=\>"LogStash::Outputs::Elasticsearch::HttpClient::Pool::BadResponseCodeError",
> 
> my filebeat config file
> 
> type: log  
> enabled: true  
> paths: /home/xxxxx/Desktop/\*.log
> 
> logstash file
> 
> input {  
> beats {  
> port =\> 5044  
> }  
> }
> 
> filter {  
> #If log line contains tab character followed by 'at' then we will tag that entry as stacktrace  
> if [message] =~ "\tat" {  
> grok {  
> match =\> ["message", "^(\tat)"]  
> add\_tag =\> ["stacktrace"]  
> }  
> }
> 
> }
> 
> output {
> 
> stdout {  
> codec =\> rubydebug  
> }  
> elasticsearch {  
> hosts =\> ["localhost:9200"]  
> }  
> }

---

<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:** [December 11, 2019, 8:16am UTC](https://discuss.elastic.co/t/error-while-sending-logs-to-logstash-with-filebeats/207652/2 "2019-12-11T08:16:58Z")

</div>

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