Manage ElasticSearch and OpenSearch

Gewijzigd op Di, 28 Jul om 2:38 PM

Manage ElasticSearch and OpenSearch


You can add ElasticSearch or OpenSearch using the mnage CLI tool:

# Install ElasticSearch:
mnage es:add
# Install OpenSearch:
mnage os:add

To switch between installations, you need to remove the other one.

# Remove ElasticSearch:
mnage es:remove
# Remove OpenSearch:
mnage os:remove

You can also switch between versions of the same engine:

# Switch ElasticSearch version:
mnage es:switch
# Switch OpenSearch version:
mnage os:switch


IP and Port

We run a daemon on the IP address of your hosting account.
We use the default port, which is 9200.
The communication works via the REST/HTTP protocol.
For security reasons, port 9200 is not directly accessible from outside the hosting server.
The easiest way is to access the daemon using curl commands via SSH — examples below.
You can also set up an SSH tunnel to connect from your local machine.


Manage ElasticSearch or OpenSearch using Curl

Check if ElasticSearch or OpenSearch is running

curl http://$VHOSTIP:9200

Cluster Nodes and Health

curl "http://$VHOSTIP:9200/_cat/nodes?v"
curl "http://$VHOSTIP:9200/_cluster/health?pretty"

Delete all data - be careful!

curl -H 'Content-Type: application/json' -XDELETE "http://$VHOSTIP:9200/*"

List Indexes

curl "http://$VHOSTIP:9200/_cat/indices?v"


Fix status Yellow

There is likely just one node running for your shop (unless it's on a cluster of servers). The status can become Yellow because ElasticSearch and OpenSearch like to spread replicas of data across multiple nodes. 

To make the status Green again, execute the following commands:

curl -H "Content-Type: application/json" -XPUT "http://$VHOSTIP:9200/_settings" -d '{"index":{"number_of_replicas":0}}'
curl -H 'Content-Type: application/json' -XPUT "http://$VHOSTIP:9200/_cluster/settings" -d '{"transient":{"cluster.routing.allocation.enable":"all"}}'

Was dit artikel nuttig?

Dat is fantastisch!

Hartelijk dank voor uw beoordeling

Sorry dat we u niet konden helpen

Hartelijk dank voor uw beoordeling

Laat ons weten hoe we dit artikel kunnen verbeteren!

Selecteer tenminste een van de redenen
CAPTCHA-verificatie is vereist.

Feedback verzonden

We stellen uw moeite op prijs en zullen proberen het artikel te verbeteren