diff --git a/serving/setting-up-a-logging-plugin.md b/serving/setting-up-a-logging-plugin.md index 641d47c08..bd7f96ace 100644 --- a/serving/setting-up-a-logging-plugin.md +++ b/serving/setting-up-a-logging-plugin.md @@ -23,15 +23,15 @@ Operators can do the following steps to configure the Fluentd DaemonSet for collecting `stdout/stderr` logs from the containers: 1. Replace `900.output.conf` part in - [100-fluentd-configmap.yaml](https://https://github.com/knative/serving/blob/master/config/monitoring/150-elasticsearch/100-fluentd-configmap.yaml) + [100-fluentd-configmap.yaml](https://github.com/knative/serving/blob/master/config/monitoring/logging/elasticsearch/100-fluentd-configmap.yaml) with the desired output configuration. Knative provides a sample for sending logs to Elasticsearch or Stackdriver. Developers can simply use `100-fluentd-configmap.yaml` or override any with other configuration. -2. Replace the `image` field of `fluentd-ds` container in - [fluentd-ds.yaml](https://github.com/knative/serving/blob/master/third_party/config/monitoring/common/kubernetes/fluentd/fluentd-ds.yaml) +2. Replace the `image` field of `fluentd-ds` container of `flunetd-ds` DaemonSet + in + [200-fluentd.yaml](https://github.com/knative/serving/blob/master/config/monitoring/logging/elasticsearch/200-fluentd.yaml) with the Fluentd image including the desired Fluentd output plugin. See - [here](image/fluentd/README.md) for the requirements of Flunetd image on - Knative. + [here](fluentd/README.md) for the requirements of Flunetd image on Knative. ### Configure the Sidecar for log files under /var/log @@ -46,7 +46,7 @@ of the sidecar. The steps to configure are: `monitoring` namespace while the Fluentd sidecar is in the namespace same with the app. There may be small differences between the configuration for DaemonSet and sidecar even though the desired backends are the same. -1. Replace `logging.fluentd-sidecar-image` flag in +2. Replace `logging.fluentd-sidecar-image` flag in [config-observability](https://github.com/knative/serving/blob/master/config/config-observability.yaml) with the Fluentd image including the desired Fluentd output plugin. In theory, this is the same with the one for Fluentd DaemonSet. @@ -60,14 +60,12 @@ Operators need to deploy Knative components after the configuring: kubectl apply --filename config/config-observability.yaml # Deploy the DaemonSet to make configuration for DaemonSet take effect -kubectl apply --filename \ - --filename third_party/config/monitoring/common/kubernetes/fluentd/fluentd-ds.yaml \ - --filename config/monitoring/200-common/100-fluentd.yaml - --filename config/monitoring/200-common/100-istio.yaml +kubectl apply --recursive --filename config/monitoring/100-namespace.yaml \ + --filename ``` -In the commands above, replace `` with the -Fluentd DaemonSet configuration file, e.g. `config/monitoring/150-stackdriver`. +In the commands above, replace `` with the +Fluentd DaemonSet configuration file, e.g. `config/monitoring/stackdriver`. **NOTE**: The deployment above will not affect the fluentd sidecar of existing pods. Developers need to redeploy their app to get the newest configuration for @@ -89,10 +87,7 @@ whole Knative monitoring components. To uninstall a logging plugin, run: ```shell -kubectl delete --filename \ - -f third_party/config/monitoring/common/kubernetes/fluentd/fluentd-ds.yaml \ - -f config/monitoring/200-common/100-fluentd.yaml - -f config/monitoring/200-common/100-istio.yaml +kubectl delete --recursive --filename ``` ---