Maintaining your indices
The Shinydocs Indexer does not require specific maintenance that may be common with other database-like software solutions. To ensure smooth operation, the indexer only requires basic maintenance related to the system on which the Indexer is installed
Indexer-Specific Maintenance
When a cluster reports that its health is yellow or red, action may need to be taken to resolve this state.
If you are running a single node cluster, the health of the cluster will likely always be yellow. This is because a replica shard cannot be on the same node as the primary shards. You can either ignore the yellow state or remove replicas from your indices.
Checking Index Health Status
Shinydocs Indexer v 6.8.0
Access Kibana (ex. http://localhost:9200)
Open ‘Dev Tools’
Run the command
GET _cluster/health
You will get a response similar to this
CODE{ "cluster_name" : "elasticsearch", "status" : "yellow", "timed_out" : false, "number_of_nodes" : 1, "number_of_data_nodes" : 1, "active_primary_shards" : 115, "active_shards" : 115, "relocating_shards" : 0, "initializing_shards" : 0, "unassigned_shards" : 102, "delayed_unassigned_shards" : 0, "number_of_pending_tasks" : 0, "number_of_in_flight_fetch" : 0, "task_max_waiting_in_queue_millis" : 0, "active_shards_percent_as_number" : 52.995391705069125 }
If the “status” is:
Yellow
All primary shards are assigned, but one or more replica shards are unassigned. If a node in the cluster fails, some data could be unavailable until that node is repaired.Red
One or more primary shards are unassigned, so some data is unavailable. This can occur briefly during cluster startup as primary shards are assignedNow you need to ask the cluster why shards are unassigned. To do that, run the following in Dev Tools
GET _cluster/allocation/explain?pretty
. This command will give you more information as to why there are unassigned shardsThe most common reason is
CODE"allocate_explanation" : "cannot allocate because allocation is not permitted to any of the nodes"
This is the explanation you will get if you are running a single node cluster with replicas.
If the reason is
CODE"allocate_explanation" : "shard has exceeded the maximum number of retries [5] on failed allocation attempts - manually call [/_cluster/reroute?retry_failed=true] to retry"
There may have been a problem assigning nodes due to resources at the time, simply run
POST _cluster/reroute?retry_failed
to force the cluster to assign the shardsIf you receive another reason, you can check the Elasticsearch documentation https://www.elastic.co/guide/en/elasticsearch/reference/6.8/cluster-allocation-explain.html. Please contact the Shinydocs HelpDesk.
Indexer Environment Maintenance
While the indexer doesn’t require maintenance (unless there is a problem), the environment it is installed in does. Be aware of these items that would be considered regular maintenance:
The indexer logs directory will fill up and should be cleared regularly (meeting your organization's log retention policy)
Indexer logs can be found in ..\install_directory\shinydocs\indexer\logs