@@ -741,37 +741,45 @@ $ oc get route --all-namespaces --selector logging-infra=support
741
741
----
742
742
====
743
743
744
- == External Elasticsearch instance with Fluentd
744
+ [[sending-logs-to-an-external-elasticsearch-instance]]
745
+ == Sending Logs to an External Elasticsearch instance
745
746
746
- It is possible to configure the Fluentd pod created with aggregated logging to
747
- connect to an externally hosted Elasticsearch instance.
747
+ Fluentd sends logs to the value of the `ES_HOST`, `ES_PORT`, `OPS_HOST`, and
748
+ `OPS_PORT` environment variables of the Elasticsearch deployment configuration.
749
+ The application logs are directed to the `ES_HOST` destination, and operations
750
+ logs to `OPS_HOST`.
748
751
749
- Fluentd knows where to send its logs to based on the `ES_HOST`, `ES_PORT`,
750
- `OPS_HOST` and `OPS_PORT` environment variables. If you have an external
751
- Elasticsearch instance that will contain both application and operations logs,
752
- ensure that `ES_HOST` and `OPS_HOST` are the same and that `ES_PORT` and
753
- `OPS_PORT` are also the same. Fluentd is configured to send its application logs
754
- to the `ES_HOST` destination and all of its operations logs to `OPS_HOST`.
752
+ To direct logs to a specific Elasticsearch instance, edit the deployment
753
+ configuration and replace the value of the above variables with the desired
754
+ instance:
755
755
756
- If your externally hosted Elasticsearch does not make use of TLS you will need to
757
- update the `*_CLIENT_CERT`, `*_CLIENT_KEY` and `*_CA` variables to be empty. If
758
- it uses TLS but not Mutual TLS, update the `*_CLIENT_CERT` and `*_CLIENT_KEY`
756
+ ----
757
+ $ oc edit dc/<deployment_configuration>
758
+ ----
759
+
760
+ For an external Elasticsearch instance to contain both application and
761
+ operations logs, you can set `ES_HOST` and `OPS_HOST` to the same destination,
762
+ while ensuring that `ES_PORT` and `OPS_PORT` also have the same value.
763
+
764
+ If your externally hosted Elasticsearch instance does not use TLS, update the
765
+ `*_CLIENT_CERT`, `*_CLIENT_KEY`, and `*_CA` variables to be empty. If it does
766
+ use TLS, but not mutual TLS, update the `*_CLIENT_CERT` and `*_CLIENT_KEY`
759
767
variables to be empty and patch or recreate the `logging-fluentd` secret with
760
- the appropriate `*_CA` for communicating with your Elasticsearch. If it uses
761
- Mutual TLS as the provided Elasticsearch does, you will just need to patch or
768
+ the appropriate `*_CA` value for communicating with your Elasticsearch instance.
769
+ If it uses Mutual TLS as the provided Elasticsearch instance does, patch or
762
770
recreate the `logging-fluentd` secret with your client key, client cert, and CA.
763
771
764
772
ifdef::openshift-origin[]
765
- Since Fluentd is deployed by means of a DaemonSet you will need to update the
766
- `logging-fluentd-template` template, delete your current DaemonSet and recreate
773
+ Since Fluentd is deployed by a DaemonSet, update the
774
+ `logging-fluentd-template` template, delete your current DaemonSet, and recreate
767
775
it with `oc new-app logging-fluentd-template` after seeing all previous Fluentd
768
776
pods have terminated.
769
777
endif::openshift-origin[]
770
778
771
779
ifdef::openshift-enterprise[]
772
- You can use `oc edit dc/logging-fluentd` to update your Fluentd configuration.
773
- It is advised that you first scale down your number of replicas to 0 before
774
- editing the DeploymentConfig .
780
+ You can use `oc edit dc/logging-fluentd` to update your Fluentd configuration,
781
+ making sure to first scale down your number of replicas to zero before editing
782
+ the deployment configuration .
775
783
enddef::openshift-enterprise[]
776
784
777
785
[NOTE]
0 commit comments