3

I'm trying to setup the logging agent for StackDriver on a cos image but its reporting its an unsupported system. My thought is to create a "sidecar" container similar to how an AppEngine Flexible VM would bring its logs into stackdriver, however there is very little guidance on how to achieve this and the container images used by google via the gcr.io/ URLs aren't well documented (or even supposed to be used outside of Google?)

Does anyone have suggestions on how to do this? I'd like to be able to monitor and alert on certain logs my nginx container outputs as well as view the logs of the host VM itself.

For now, I have logs from my nginx container going to StackDriver Logging by utilizing the --log-driver=gcplogs flag on my docker run command.

someone1
  • 151

1 Answers1

2

At the moment COS images do not support the Stackdriver agent. There is a feature request to allow this functionality.

This discussion provides a workaround using “container_vm” image.

The image “container-vm-v20170214” is currently available in the project “google-containers”. You can spin a VM with this image using a command similar to this:

gcloud compute instances create VMName --image container-vm-v20170214 \
  --image-project=google-containers
  --zone us-central1-a \
  --machine-type f1-micro
Carlos
  • 1,385