Skip to content
This repository was archived by the owner on Sep 21, 2020. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ spec:
template:
metadata:
labels:
app: stackdriver-agent
app: stackdriver-agent
spec:
containers:
- name: stackdriver-agent
Expand Down
22 changes: 22 additions & 0 deletions configurator/01-logging.sh
Original file line number Diff line number Diff line change
@@ -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 <<EOL > /opt/stackdriver/collectd/etc/collectd.d/01-logging.conf
LoadPlugin "logfile"
# Enable logging with logfile as syslog is not generally available inside a container.
<Plugin "logfile">
LogLevel "info"
File "/var/log/collectd.log"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this log into stdout/stderr instead? Looks like it is possible using the same logfile plugin.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 for stdout (but I don't have a good understanding of context here)

Timestamp true
</Plugin>
EOL