drupalwxt / helm-drupal

Helm Chart for deploying an enterprise-grade Drupal environment.
https://drupalwxt.github.io/helm-drupal/index.yaml
MIT License
31 stars 22 forks source link

How does stderr stdout logging work? #103

Closed nathanpw closed 2 years ago

nathanpw commented 3 years ago

How does stderr stdout logging work? Particularly for NGINX and PHP-FPM. Is this a feature these charts provide?

We noticed that the nginx logs in the Drupal container (/var/log/nginx are symlinked to /dev/stderr /dev/stdout). Was curious if there was any best practice, direction, or config to manage logs. Particularly around retention time and how to access/export them (on say a file system for analysis). We typically access the logs via lens, but wondering if they are written somewhere and retained/rotated or whatever?

Hopefully these questions make sense, as we aren't really helm/k8s experts.

I did read some of this.: https://kubernetes.io/docs/concepts/cluster-administration/logging/ Which suggest there should be "cluster-level logging" just not sure how (or if) this is implemented by these charts (or is up to the user/implementer)?

sylus commented 2 years ago

This would be up to the user to implement, I do know for your use case this is handled via 2 methods:

1) Fluentd and soon to be Fluent Bit grabs all logs and relay to your elasticsearch instance via a configured configmap in your namespace.

2) OMS Agent for Azure AKS Cluster is deployed and it will transparently sent logs to Log Analytics which can then later be filtered.

Normally yes there is not much you will need to do as this is indeed handled at the cluster level usually. Although you can always see logs for the current life of the container.