Open james-emerton opened 4 years ago
@james-emerton, let me understand this clearly; so, you want to be able to set the hostname of each container's logs to a different value rather than using one HOSTNAME
for all, right?
@smusali No, I want to launch the container as part of a machine image baking process. When an instance is created using that image, the logspout container will start and should then pick up a the hostname of the machine it's running on.
Current behaviour is that the hostname associated with these logs is the original container id. Unfortunately that means that all logs coming from the set of instances launched from that image all posses the same uninformative hostname.
hey, @james-emerton, sorry for the late response!
I have internally filed a ticket for this request. We are going to make this change as soon as possible.
Thanks!
Hi, any updates on this?
@agrushin So sorry, it looks like this fell off of our radar accidentally some time ago. We've picked this back up and have a branch and coding solution complete. Unfortunately, testing this change is proving to be challenging given the integration with logspout, so give us some time on that. We apologize for all the delay, but rest assured, we will finish the effort.
Just an update to keep this active--we have a code fix, but testing it within the confines of logspout's implementation is making it very hard to test. We are looking into this now and are working towards resolving this issue.
The upstream logspout project supports reading
/etc/host_hostname
to determine the hostname. This allows one to expose the actual hosts name to the container rather than using the container id.Currently, this does not work for logdna's logspout as the
HOSTNAME
environment variable appears to be the only way to set the hostname.I am currently working around this as follows:
I'm starting this container as part of an image baking process, so I cannot set the hostname to the value at the time the container is created as it will change.