From 194f815a94802b0af05f22230a959b38727b916f Mon Sep 17 00:00:00 2001 From: Tyler Roscoe Date: Mon, 3 Dec 2018 16:01:36 -0700 Subject: [PATCH 1/2] Fix whitespace in example Kubernetes manifest. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ff08aa4..30dee9c 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ spec: template: metadata: labels: - app: stackdriver-agent + app: stackdriver-agent spec: containers: - name: stackdriver-agent From e26f6dfb974b61ff19e33990ebb568cfa15d182a Mon Sep 17 00:00:00 2001 From: Tyler Roscoe Date: Mon, 3 Dec 2018 16:16:21 -0700 Subject: [PATCH 2/2] Use logfile for logging. syslog is not generally available inside a container. --- configurator/01-logging.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 configurator/01-logging.sh diff --git a/configurator/01-logging.sh b/configurator/01-logging.sh new file mode 100644 index 0000000..a415645 --- /dev/null +++ b/configurator/01-logging.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +# Copyright (C) 2016 wikiwi.io +# +# This software may be modified and distributed under the terms +# of the MIT license. See the LICENSE file for details. + +# This file and the conf file it generates are named "01-" so +# they are loaded as early as possible. Without this, conf files +# that sort lexically before this one would not have logging +# configured correctly. + +cat < /opt/stackdriver/collectd/etc/collectd.d/01-logging.conf +LoadPlugin "logfile" +# Enable logging with logfile as syslog is not generally available inside a container. + + LogLevel "info" + File "/var/log/collectd.log" + Timestamp true + +EOL +