Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable set syslog host for Filebeat HAProxy module #9366

Merged
merged 4 commits into from
Dec 5, 2018

Conversation

jasontedor
Copy link
Member

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.

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.
@ruflin ruflin added module review Filebeat Filebeat Team:Integrations Label for the Integrations team labels Dec 4, 2018
@elasticmachine
Copy link
Collaborator

Pinging @elastic/infrastructure

@ruflin
Copy link
Contributor

ruflin commented Dec 4, 2018

jenkins, test this

Copy link
Contributor

@ruflin ruflin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, change looks good to me.

@jsoriano Could you also have a look at this. Did not test it locally on my end but don't see a reason this should not work.

@ruflin ruflin requested a review from jsoriano December 4, 2018 09:21
Copy link
Member

@jsoriano jsoriano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It LGTM, thanks! Could you add a changelog entry about that?

…yslog_host

* elastic/master:
  Metricbeat can call Jolokia with GET requests. (elastic#8566)  (elastic#9226)
  Add some missing references to PRs in changelog (elastic#9358)
@jasontedor
Copy link
Member Author

Thanks @ruflin and @jsoriano. I added a changelog entry.

CHANGELOG.asciidoc Outdated Show resolved Hide resolved
@jasontedor
Copy link
Member Author

@jsoriano I don't think the build failure had anything to do with my change. How do I trigger a new build?

@exekias
Copy link
Contributor

exekias commented Dec 5, 2018

jenkins, retest this please

@jsoriano jsoriano added the needs_backport PR is waiting to be backported to other branches. label Dec 5, 2018
@jsoriano jsoriano merged commit bc7640f into elastic:master Dec 5, 2018
jsoriano pushed a commit to jsoriano/beats that referenced this pull request Dec 5, 2018
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.

(cherry picked from commit bc7640f)
@jsoriano jsoriano added v6.6.0 and removed needs_backport PR is waiting to be backported to other branches. labels Dec 5, 2018
jsoriano added a commit that referenced this pull request Dec 6, 2018
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.

(cherry picked from commit bc7640f)

Co-authored-by: Jason Tedor <jason@tedor.me>
@jsoriano
Copy link
Member

jsoriano commented Dec 6, 2018

Thanks @jasontedor! this will be available on 6.6.0.

@jasontedor
Copy link
Member Author

Thanks @jsoriano!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Filebeat Filebeat module review Team:Integrations Label for the Integrations team v6.6.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants