Filebeat multi output

Hello,

I have a filebeat that sends logs to logstash and elasticsearch.

I would like to enable the haproxy module of filebeat to send the haproxy logs to elasticsearch but when I run the command: filebeat setup -e

I have the following error:

Exiting: error unpacking config data: more than one namespace accessed accessing 'output' (source: '/ etc / filebeat / filebeat.yml')

I saw that we can not have multiple outputs with filebeat.

How to do in this case?

My goal is to take advantage of haproxy dashboards and mapping already present in the module.

Below the contents of my filebeat.yml file:

# ================================ Outputs ================ =====================
# Configure what output to use when sending the data collected by the beat.

# -------------------------- Elasticsearch output --------------------- ---------
output.elasticsearch:
  # Array of hosts to connect to.
  hosts: ["http: //xxx.xxx.xx.xx: 9200"]

# ----------------------------- Logstash output ------------------ --------------
output.logstash:
  # The Logstash hosts
  hosts: ["xxx.xxx.xx.xx: 5044"]

Thank you in advance.

Correct, you cannot have multiple outputs within a single Filebeat instance.

I think what you are looking for is this: https://www.elastic.co/guide/en/beats/filebeat/current/load-kibana-dashboards.html#load-dashboards-logstash.

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