Quay Enterprise logging is normally done to /var/log/syslog which is the default logging location for the syslog daemon. Unfortunately, FluentD reads only information that is directed to the standard output (/dev/stdout). To enable FluentD to read Quay logs, the output from syslog needs to be rerouted to /dev/stdout; this can be done in the following manner:
- Create a new file called syslog-ng-extra.conf with the following content:
source s_docker_syslog { file("/var/log/syslog"); }; destination d_docker_syslog { file("/dev/stdout"); }; log { source(s_docker_syslog); destination(d_docker_syslog); };
- Before we can add the file to QE deployment in Kubernetes, we need to base64 encode the file:
$ cat /config/syslog-ng-extra.conf | base64 -w 0
The output should look something like this:c291cmNlIHNfZG9ja2VyX3N5c2xvZyB7IGZpbGUoIi92YXIvbG9nL3N5c2xvZyIpOyB9Owpk
ZXN0aW5hdGlvbiBkX2RvY2tlcl9zeXNsb2cgeyBmaWxlKCIvZGV2L3N0ZG91dCIpOyB9Owpsb
2cgeyAKCXNvdXJjZShzX2RvY2tlcl9zeXNsb2cpOyAKCWRlc3RpbmF0aW9uKGRfZG9ja2VyX
3N5c2xvZyk7IAoKfTsK - Edit the Kubernetes secret file and add the output that you got with base64 to it:
$ kubectl --namespace quay-enterprise edit secret/quay-enterprise-config-secret
syslog-ng-extra.conf:
rc291cmNlIHNfZG9ja2VyX3N5c2xvZyB7IGZpbGUoIi92YXIvbG9nL3N5c2xvZyIpOyB9OwpkZX
N0aW5hdGlvbiBkX2RvY2tlcl9zeXNsb2cgeyBmaWxlKCIvZGV2L3N0ZG91dCIpOyB9Owpsb
2cgeyAKCXNvdXJjZShzX2RvY2tlcl9zeXNsb2cpOyAKCWRlc3RpbmF0aW9uKGRfZG9ja2V
yX3N5c2xvZyk7IAoKfTsK - Recycle all QE pods and let the scheduler start new ones.
Comments
0 comments
Please sign in to leave a comment.