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 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 +