Save docker logs to /srv/cci/serial/logs/$hostname. So fluentd can tail this file and send logs to monitoring service. In this way can generate docker's dmsg file
Signed-off-by: Wu Zhende wuzhende666@163.com --- providers/docker/run.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/providers/docker/run.sh b/providers/docker/run.sh index 4d53db7..2810641 100755 --- a/providers/docker/run.sh +++ b/providers/docker/run.sh @@ -7,6 +7,7 @@ : ${docker_image:="centos:7"} : ${load_path:="${HOME}/jobs"} : ${hostname:="dc-1g-1"} +: ${log_dir:="/srv/cci/serial/logs/$hostname"}
if [[ $hostname =~ ^(.*)-[0-9]+$ ]]; then tbox_group=${BASH_REMATCH[1]} @@ -38,4 +39,4 @@ cmd=( /root/sbin/entrypoint.sh )
-"${cmd[@]}" +"${cmd[@]}" 2>&1 | tee -a "$log_dir"