Skip to content

Files

Latest commit

662b4aa · Apr 3, 2024

History

History

elasticsearch

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Sep 11, 2020
Dec 20, 2021
Mar 23, 2023
Jun 21, 2021
Jul 14, 2021
Aug 5, 2020
Oct 26, 2020
Jul 3, 2020
Jul 29, 2022
May 19, 2021
Jul 6, 2018
Apr 3, 2024
Apr 3, 2024
Apr 30, 2021
Apr 3, 2024
Jun 27, 2023
Aug 5, 2020
Dec 20, 2021
Apr 16, 2021
Sep 3, 2020
Apr 3, 2024
Jun 5, 2020
Apr 16, 2021
Jun 21, 2021
Jun 27, 2023
Mar 30, 2021
Sep 17, 2021

README.md

Elasticsearch

Image Utilities

Following are utilities included in the image to facilitate running commonly used administration commands. Use of these utilities assumes you have exec access to the container. Some of these utilities make use of the administration certs which have full access to all indices and operations of the Elasticsearch cluster.

es_util

Run any REST command against the Elasticsearch endpoint

Example to retrieve the list of nodes

$ oc exec -c elasticsearch $POD -- es_util --query=_cat/nodes?pretty

allocate-replica

Manually allocate replica shard to a given node in the Elasticsearch cluster. The node by default will be the one on which the command is executed. This command is used to explicitly reroute and allocate a replica shard.

Example:

$ oc exec -c elasticsearch $POD -- allocate-replica .kibana.02c55f18a892b365bcd1802db9e5c9df39c04674

allocate-stale-primary

Manually allocate a stale primary shard to a given node in the Elasticsearch cluster. The node by default will be the one on which the command is executed. This command is used to explicitly reroute and allocate a primary shard. NOTE: There is a risk of data loss when using this command

Example:

$ oc exec -c elasticsearch $POD -- allocate-stale-primary .kibana.02c55f18a892b365bcd1802db9e5c9df39c04674

logs

Retrieve Elasticsearch logs from the log directory. This command defaults to retrieving the file /elasticsearch/persistent/logging-es/logs/logging-es.log which may not be directed to STDOUT by the logging configuration.

Example to follow the default file:

$ oc exec -c elasticsearch $POD -- logs -f

move-replica-shard

Manually move a shard to a given node in the Elasticsearch cluster.

Example:

$ oc exec -c elasticsearch $POD -- move-replica-shard .kibana.02c55f18a892b365bcd1802db9e5c9df39c04674 0 source-node target-node

shards

List information about shards in the cluster

Example to find unassigned shards:

$ oc exec -c elasticsearch $POD -- shards | grep UNASSIGNED