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

dockbeat.hostname not showing up #134

Open
mr-oz-09 opened this issue Nov 4, 2016 · 1 comment
Open

dockbeat.hostname not showing up #134

mr-oz-09 opened this issue Nov 4, 2016 · 1 comment

Comments

@mr-oz-09
Copy link

mr-oz-09 commented Nov 4, 2016

The hostname is showing up as the container-id. Is there a way to have that be the hostname?

@dang3r
Copy link

dang3r commented Nov 10, 2016

If you are using the dockbeat container and want the associated hostname, use the --hostname flag for docker run. By default, a container does not inherit its host's hostname.

How you retrieve the hostname depends on the host system, but executing hostname, using the env. var. ${HOSTNAME}, or checking /etc/hosts made be viable options.

As example of the command is the following:
docker run -d --hostname FooBarBaz --net=dockernet --name=dockbeat -v /var/run/docker.sock:/var/run/docker.sock ingensi/dockbeat:latest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants