Filebeat multi output


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 --------------------- ---------
  # Array of hosts to connect to.
  hosts: ["http: // 9200"]

# ----------------------------- Logstash output ------------------ --------------
  # The Logstash hosts
  hosts: [" 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:

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