Using NLS to log dynamic docker hosts
Posted: Mon May 02, 2016 9:13 am
Hello,
We are running containers inside a docker host. When a new docker host is created a different hostid hash is created. We are trying to build and elastic type apache environment. Depending on CPU Load an application called marathon will fire up another apache container to help with the load.
The question I have is: Is there a way to configure the rsyslog daemon on each docker to use a dyamic name when sending the logs?
So we have 1 Docker Host. In the host we are running about 4 apache containers with rsyslog running.
Inside the container we are writing apache logs to /var/log/httpd/$HOSTNAME/access. I want to ship these logs with a dynamic hostname to our NLS. Currently it appears that we would have to setup rsyslog on each container to ship them to the Log Server. This sounds like an administrative nightmare. Especially if the marathon process decides to start up another instance.
Is there any way to setup rsyslog to use dynamic names?
Thank you in advance,
Greg Cooper
We are running containers inside a docker host. When a new docker host is created a different hostid hash is created. We are trying to build and elastic type apache environment. Depending on CPU Load an application called marathon will fire up another apache container to help with the load.
The question I have is: Is there a way to configure the rsyslog daemon on each docker to use a dyamic name when sending the logs?
So we have 1 Docker Host. In the host we are running about 4 apache containers with rsyslog running.
Inside the container we are writing apache logs to /var/log/httpd/$HOSTNAME/access. I want to ship these logs with a dynamic hostname to our NLS. Currently it appears that we would have to setup rsyslog on each container to ship them to the Log Server. This sounds like an administrative nightmare. Especially if the marathon process decides to start up another instance.
Is there any way to setup rsyslog to use dynamic names?
Thank you in advance,
Greg Cooper