Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 9 additions & 17 deletions _unused_topics/cluster-logging-elasticsearch-admin.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,17 @@
[id="cluster-logging-elasticsearch-admin_{context}"]
= Performing administrative Elasticsearch operations

An administrator certificate, key, and CA that can be used to communicate with and perform
administrative operations on Elasticsearch are provided within the
*elasticsearch* secret in the `openshift-logging` project.
An administrator certificate, key, and CA that can be used to communicate with and perform administrative operations on Elasticsearch are provided within the *elasticsearch* secret in the `openshift-logging` project.

[NOTE]
====
To confirm whether or not your OpenShift Logging installation provides these, run:
To confirm whether your OpenShift Logging installation provides these, run:
----
$ oc describe secret elasticsearch -n openshift-logging
----
====

. Connect to an Elasticsearch pod that is in the cluster on which you are
attempting to perform maintenance.
. Connect to an Elasticsearch pod that is in the cluster on which you are attempting to perform maintenance.

. To find a pod in a cluster use:
+
Expand All @@ -32,20 +29,15 @@ $ oc get pods -l component=elasticsearch -o name -n openshift-logging | head -1
$ oc rsh <your_Elasticsearch_pod>
----

. Once connected to an Elasticsearch container, you can use the certificates
mounted from the secret to communicate with Elasticsearch per its
link:https://www.elastic.co/guide/en/elasticsearch/reference/2.3/indices.html[Indices APIs documentation].
. Once connected to an Elasticsearch container, you can use the certificates mounted from the secret to communicate with Elasticsearch per its link:https://www.elastic.co/guide/en/elasticsearch/reference/2.3/indices.html[Indices APIs documentation].
+
Fluentd sends its logs to Elasticsearch using the index format *project.{project_name}.{project_uuid}.YYYY.MM.DD*
where YYYY.MM.DD is the date of the log record.
Fluentd sends its logs to Elasticsearch using the index format *infra-00000x* or *app-00000x*.
+
For example, to delete all logs for the *openshift-logging* project with uid *3b3594fa-2ccd-11e6-acb7-0eb6b35eaee3*
from June 15, 2016, we can run:
For example, to delete all logs for the openshift-logging index, *app-000001*, we can run:
+
----
$ curl --key /etc/elasticsearch/secret/admin-key \
--cert /etc/elasticsearch/secret/admin-cert \
--cacert /etc/elasticsearch/secret/admin-ca -XDELETE \
"https://localhost:9200/project.openshift-logging.664360-11e9-92d0-0eb4e1b4a396.2019.03.10"
--cert /etc/elasticsearch/secret/admin-cert \
--cacert /etc/elasticsearch/secret/admin-ca -XDELETE \
"https://localhost:9200/app-000001"
----