wikiwi / stackdriver-agent

Stackdrivers Agent in a Docker Container.
MIT License
13 stars 14 forks source link

Update Stackdriver agent to latest version #2

Open ocervell opened 6 years ago

ocervell commented 6 years ago

I really like the concept in order to install Stackdriver agent in a container, but it seems this is installing an older version of the agent. Maybe we can modify the Dockerfile with updated install instructions available on the public docs ? https://cloud.google.com/monitoring/agent/install-agent#linux-install

dijitali commented 5 years ago

This was attempted in this StackOverflow post but doesn't seem to be straightforward: https://stackoverflow.com/questions/52123754/stackdriver-agent-in-docker-container

Trying a docker build using a similar dockerfile (slight RUN syntax correction) of:

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 \
 && curl -sSO https://dl.google.com/cloudagents/install-logging-agent.sh \
 && bash install-logging-agent.sh

Gives the below error. I've also tried using FROM debian:jessie (which is the OS I need) and get a similar result:

...
Unpacking google-fluentd (1.6.1-1) ...
Selecting previously unselected package google-fluentd-catch-all-config.
Preparing to unpack .../google-fluentd-catch-all-config_0.7_all.deb ...
Unpacking google-fluentd-catch-all-config (0.7) ...
Setting up google-fluentd (1.6.1-1) ...
Adding system user `google-fluentd' (UID 105) ...
Adding new group `google-fluentd' (GID 106) ...
Adding new user `google-fluentd' (UID 105) with group `google-fluentd' ...
Not creating home directory `/home/google-fluentd'.
Installing default conffile /etc/google-fluentd/google-fluentd.conf ...
invoke-rc.d: could not determine current runlevel
invoke-rc.d: policy-rc.d denied execution of start.
Setting up google-fluentd-catch-all-config (0.7) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Restarting google-fluentd:  * google-fluentd

==============================================================================
Errors occurred while installing google-fluentd-1.6.1-1. See the log snippet
above or run:
  sudo service google-fluentd status
==============================================================================
The command '/bin/sh -c apt-get update && apt-get -y --no-install-recommends install wget curl python-minimal ca-certificates lsb-release libidn11 openssl  && curl -sSO https://dl.google.com/cloudagents/install-logging-agent.sh  && bash install-logging-agent.sh' returned a non-zero code: 1
JanMikes commented 4 years ago

Hello! Were you able to update and if so, how to?

It scares me that issue is here opened for over year with no response.

We have run into some issues (#5) which might be solved by updating stackdriver-agent according to https://stackoverflow.com/questions/47787952/dockerized-stackdriver-agent-payloaderrors-in-logs/47916514#47916514

dijitali commented 4 years ago

Hi @JanMikes, I'm afraid I wasn't able to get this working and I can't actually recall the specific use case I had that required this.

It looks like this repo is not currently maintained so I'd suggest you might get better support directly from Google by raising a case.