I am trying to get my docker images to log to stackdriver but nothing I do seems to work.
keycloak_server
DEBU[0000] [hijack] End of stdout
ERRO[0000] error waiting for container: context canceled
I tried exporting that into my environment. I tried using the full path of the full path of the key file. Nothing I did worked.
Then I tried setting up another container with fluentd google cloud plugin. That didn't work either giving the error message
2018-11-08 00:45:59 +0000 [info]: parsing config file is succeeded path="/fluentd/etc/fluent.conf"
keycloak_fluentd | /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- /var/lib/gems/2.3.0/gems/fluent-plugin-google-cloud-0.7.0/lib/fluent/plugin/out_google_cloud (LoadError)
then I installed fluentd into my own laptop and tried to use it without docker.
I set up a config file like this
<source>
@type tail
path /....../test.log
pos_file //...../test.log.pos
tag foobar.tsv
format syslog
</source>
<match **>
@type s3
aws_key_id XXXXXXX
aws_sec_key XXXXXXXXX
s3_bucket logs
s3_region ap-southeast-2
check_apikey_on_start true
</match>
<match **>
@type google_cloud
</match>
This ships the logs to amazon S3 but doesn't ship to stackdriver. There are no errors, it just doesn't do anything. Note the credentials are exported into the environment.
How can I get my docker containers to log to stackdriver?
Thanks.