Skip to content

Commit f83e1fb

Browse files
author
Brice Fallon-Freeman
authored
Merge pull request openshift#2361 from bfallonf/followup_1950
Followup edits to PR 1950
2 parents 7c39f8e + 15c939d commit f83e1fb

File tree

1 file changed

+27
-19
lines changed

1 file changed

+27
-19
lines changed

install_config/aggregate_logging.adoc

+27-19
Original file line numberDiff line numberDiff line change
@@ -741,37 +741,45 @@ $ oc get route --all-namespaces --selector logging-infra=support
741741
----
742742
====
743743

744-
== External Elasticsearch instance with Fluentd
744+
[[sending-logs-to-an-external-elasticsearch-instance]]
745+
== Sending Logs to an External Elasticsearch instance
745746

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`.
748751

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:
755755

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`
759767
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
762770
recreate the `logging-fluentd` secret with your client key, client cert, and CA.
763771

764772
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
767775
it with `oc new-app logging-fluentd-template` after seeing all previous Fluentd
768776
pods have terminated.
769777
endif::openshift-origin[]
770778

771779
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.
775783
enddef::openshift-enterprise[]
776784

777785
[NOTE]

0 commit comments

Comments
 (0)