Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Stackdriver agent in docker container

Is it possible to set up a generic Docker image with Stackdriver monitoring agents so it can send logging data within the container to Stackdriver, then which can be used across any VM instances regardless of GCE and AWS?

Update

FROM ubuntu:16.04

USER root

ADD . /

ENV GOOGLE_APPLICATION_CREDENTIALS="/etc/google/auth/application_default_credentials.json"

RUN apt-get update && apt-get -y --no-install-recommends install wget curl python-minimal ca-certificates lsb-release libidn11 openssl && \

RUN curl -sSO https://dl.google.com/cloudagents/install-logging-agent.sh
RUN bash install-logging-agent.sh

Im exactly following what's been said in the documentation. The installation goes fine. But google-fluentd is failing to start/restart.

Thanks in advance.

like image 203
thishandp7 Avatar asked Apr 22 '26 18:04

thishandp7


1 Answers

Yes, this should be possible according to the documentation. You will need to make sure that Stackdriver agent is installed and configured correctly in your docker image.

like image 112
hinson Avatar answered Apr 25 '26 15:04

hinson



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!