Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/phucpnt/docker-google-stackdriver
A container to send log to google stackdriver.
https://github.com/phucpnt/docker-google-stackdriver
docker-image stackdriver-logs
Last synced: 14 days ago
JSON representation
A container to send log to google stackdriver.
- Host: GitHub
- URL: https://github.com/phucpnt/docker-google-stackdriver
- Owner: phucpnt
- Created: 2019-01-18T09:29:26.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-01-18T09:36:02.000Z (about 6 years ago)
- Last Synced: 2024-12-05T23:11:47.971Z (2 months ago)
- Topics: docker-image, stackdriver-logs
- Language: Dockerfile
- Size: 6.84 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Purpose
Setup a container that would receiving the log from other docker container and send to google stackdriver## Usage
* From the GCP panel, download your service key for `write` log into your stackdriver. Download the file and renamed it to `application_default_credentials.json`
* Run the docker```docker run -p 5514:514 -v /Users/phucpnt/projects/google-stackdriver-log/application_default_credentials.json:/etc/google/auth/application_default_credentials.json -v /Users/phucpnt/projects/google-stackdriver-log/google-fluentd.conf:/etc/google-fluentd/google-fluentd.conf -e "GOOGLE_APPLICATION_CREDENTIALS=/etc/google/auth/application_default_credentials.json" --name=google-log phucpnt/google-stackdriver-log```
* Remember to assign the following environment for location of the stackdriver log:
* GCP_PROJECT_ID: your project id in GCP
* GCP_VM_ID: you can name your VM name (any name you want)
* GCP_ZONE_ID: use the zone id of GCP ex: northamerica etc...
* Why you need that? -> https://github.com/GoogleCloudPlatform/fluent-plugin-google-cloud/issues/156* Set the other docker instance to use `fluentd` driver for log.
Eg. ```docker run --log-driver=fluentd --log-opt fluentd-address=127.0.0.1:5514 phucpnt/log-test```## Limitation
* You can not change the VM_ID dynamically in the stackdriver log base on the docker instance.