Hi! I want to configure the haproxy module on filebeat. I did it and i am getting some fileds but others are empty.
Here is my filebeat configuration
# Module: haproxy
# Docs: https://www.elastic.co/guide/en/beats/filebeat/7.8/filebeat-module-haproxy.html
- module: haproxy
# All logs
log:
enabled: true
# Set which input to use between syslog (default) or file.
#var.input:
var.input: "file"
# Set custom paths for the log files. If left empty,
# Filebeat will choose the paths depending on your OS.
#var.paths:
var.paths: ["/var/log/haproxy/haproxy.log"]
Here is part of my haproxy.cfg that sets the logging
defaults
log global
mode http
option httplog
option dontlognull
And here my syslog file (the one that send haproxy logs to the file)
Something is off because the default haproxy dashboard on kibana have some visualizations empty. Also, i would like to use syslog to get the logs and not the file but there is not much docs about it.
By default HAProxy module uses syslog to fetch logs:
The module is by default configured to run via syslog on port 9001. However it can also be configured to read from a file path. See the following example.
To change its config set syslog_host and syslog_port.
That is what i don't fully understand. My Haproxy send the logs to syslog with this:
global
log 127.0.0.1 local2
Should i add another line in the rsyslog config to send the information to localhost to the port 9001 so filebeat can read it? Something like this i imagine:
Sorry for the delay. I was between exams and another project at work.
I took a long read to the article that you mentioned (thanks for that!) but i still can't comprehend the configuration about the IP and port. There is no example in the official documentation on how to configure the module in order to receive information from syslog, only about the file configuration. Also, my status information run in /stats and not / as is mentioned in the link you provided.
I can still use the grok pattern that i created but i wanted to take a look at the dashboards that Kibana brings out of the box with my information.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.