# Filebeat not sending output

**URL:** <https://discuss.elastic.co/t/filebeat-not-sending-output/248190>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [September 10, 2020, 2:29pm UTC](https://discuss.elastic.co/t/filebeat-not-sending-output/248190 "2020-09-10T14:29:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![humartinez](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/humartinez/32/46395_2.png) [@humartinez](https://discuss.elastic.co/u/humartinez)\
**Post date:** [September 10, 2020, 2:29pm UTC](https://discuss.elastic.co/t/filebeat-not-sending-output/248190/1 "2020-09-10T14:29:54Z")

</div>

I was trying to debug why my filebeat is not sending output to kafka but after debuging I'd change it to file output to see if my config is ok, but Im not getting any output also

This is my config file

```
cat filebeat.yml|grep -v "#" |grep -v ^$
filebeat.inputs:
- type: log
  paths:
    - /tmp/example.log
  json_keys_under_root: true
  json.add_error_key: true
- type: log
  enabled: false
  paths:
    - /var/log/*.log
filebeat.config.modules:
  path: ${path.config}/modules.d/*.yml
  reload.enabled: false
setup.template.settings:
  index.number_of_shards: 1
setup.kibana:
output.file:
  enabled: true
  codec.json:
    pretty: true
  path: "/tmp/fbeat.log"
  hosts: ["localhost:9200"]
processors:
  - add_host_metadata:
      when.not.contains.tags: forwarded
  - add_cloud_metadata: ~
  - add_docker_metadata: ~
  - add_kubernetes_metadata: ~
logging.level: warning
logging.selectors: ["*"]

```

Im sending logs to the input file /tmp/example.log as JSON

> {  
> "error": "dial tcp 172.21.0.2:5432: getsockopt: connection refused",  
> "level": "error",  
> "msg": "Could not open database connection",  
> "time": "2020-03-27T16:40:49Z"  
> }

In this way (just testing)

> echo -n '{"error":"dial tcp 172.21.0.2:5432: getsockopt: connection refused","level":"error","msg":"Could not open database connection","time":"2020-03-27T16:40:49Z"}' \>\> /tmp/example.log

And I cant get the output file /tmp/fbeat.log

While If I send the output to console I see that filebeat is parsing the input file

> {
> 
> "@timestamp": "2020-09-10T12:00:16.789Z",  
> "@metadata": {  
> "beat": "filebeat",  
> "type": "\_doc",  
> "version": "7.9.1"  
> },  
> "log": {  
> "offset": 1272,  
> "file": {  
> "path": "/tmp/example.log"  
> }  
> },  
> " **json**": {  
> " **msg**": "Could not open database connection",  
> " **time**": "2020-08-27T16:36:49Z",  
> " **error**": "dial tcp 172.21.0.2:5432: getsockopt: connection refused",  
> " **level**": "error"  
> },  
> .....  
> }

Any ideas? Thanks in advance

---

<div class="post-metadata">

**Author:** ![humartinez](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/humartinez/32/46395_2.png) [@humartinez](https://discuss.elastic.co/u/humartinez)\
**Post date:** [September 10, 2020, 2:45pm UTC](https://discuss.elastic.co/t/filebeat-not-sending-output/248190/2 "2020-09-10T14:45:06Z")

</div>

I performed some changes in the output.file stanza, but same results

```
output.file:
  enabled: true
  codec.json:
    pretty: true
  path: "/tmp"
  filename: filebeat
```

---

<div class="post-metadata">

**Author:** ![humartinez](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/humartinez/32/46395_2.png) [@humartinez](https://discuss.elastic.co/u/humartinez)\
**Post date:** [September 11, 2020, 7:30am UTC](https://discuss.elastic.co/t/filebeat-not-sending-output/248190/3 "2020-09-11T07:30:16Z")

</div>

My bad. I was sending the info to the log in a wrong way.

---

<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 9, 2020, 9:30am UTC](https://discuss.elastic.co/t/filebeat-not-sending-output/248190/4 "2020-10-09T09:30:33Z")

</div>

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