Skip to content

Commit

Permalink
Enable set syslog host for Filebeat HAProxy module (#9366)
Browse files Browse the repository at this point in the history
The syslog input for the Filebeat HAProxy module binds by default to
localhost:9001. It is possible to configure the port through the
variable var.syslog_port, but it is not possible for the
syslog_host. This can be useful when running Filebeat inside a Docker
container. Since it is not easy to forward a port from the host to
localhost inside the Docker container, it restricts the ability to use
Filebeat in a Docker container to log HAProxy running on a remote
instance. With this commit, we make it possible to configure the host
that the syslog input for the HAProxy binds to through a variable
var.syslog_host. This makes it possible to have HAProxy running on a
remote instance (e.g., a FreeBSD 11.2 host), and configure that instance
to remote log to a Filebeat instance running inside a Docker container.
  • Loading branch information
jasontedor authored and jsoriano committed Dec 5, 2018
1 parent 2aca783 commit bc7640f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha1...master[Check the HEAD d
*Filebeat*

- Added `detect_null_bytes` selector to detect null bytes from a io.reader. {pull}9210[9210]
- Added `syslog_host` variable to HAProxy module to allow syslog listener to bind to configured host. {pull}9366[9366]

*Heartbeat*

Expand Down
2 changes: 1 addition & 1 deletion filebeat/module/haproxy/log/config/syslog.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
type: syslog
protocol.udp:
host: "localhost:{{.syslog_port}}"
host: "{{.syslog_host}}:{{.syslog_port}}"
2 changes: 2 additions & 0 deletions filebeat/module/haproxy/log/manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ var:
- name: paths
default:
- /var/log/haproxy.log
- name: syslog_host
default: localhost
- name: syslog_port
default: 9001
- name: input
Expand Down

0 comments on commit bc7640f

Please sign in to comment.