Gcloud VM logging strategy
I have a group of instances Container VMs
that runs my application in a docker container.
I am trying to find a good strategy for managing application logs for docker + MEAN + Google Cloud Compute Machines
.
I see logs in separate containers with docker logs [container_id]
.
However, if I stop and start the virtual machine, I lose those logs. I also have VMs dynamically added Auto scaler
and would like to have a convenient way to access the logs.
Stack MEAN
and logging tool bunyan
.
Is it possible to centralize or consolidate logs from all VMS in one permanent location?
any suggestions?
UPDATE: I installed the agent fluentd
and now I can see the logs when I manually run thins in the shell:logger "some message for testing"
However, the logs from mine container vm
from my docker container never show up in the logs.
I still don't know how to get these docker logs to enter google cloud logs. It is expected to be built automatically.
amuses Leo
source to share
Here is the yaml, Dockerfile and conf for the fluentd pod inside kubernetes.
-
Adjust yaml for drive installation: https://github.com/GoogleCloudPlatform/kubernetes/tree/master/contrib/logging/fluentd-sidecar-gcp
-
Then set up the configuration for disk login.
-
Create a container with a new configuration.
-
Expand the new container.
source to share