Skip to main content
Skip table of contents

Elasticsearch troubleshooting & useful commands

  1. check status by running command:

bash /etc/veridiumid/scripts/

Status explained:

  • it presents the number of servers in the cluster ( = 6)

  • it presents the overall status: green, yellow, red

    • green means that everything is fine

    • yellow that not all nodes are up or some shards needs to be reallocated (the system is still functional)

    • red - elasticsearch is not fully functional.

  • pending/unassing tasks

    • the number of tasks (ex. moving shards from one server to other)

Backup :

Backup is done incrementally, for the data and needs to be executed on one node, in crontab. For more details, see article Disaster Recovery

Useful commands:

## list the indices
bash /opt/veridiumid/elasticsearch/bin/ -l 

## get help for _cat commands
bash /opt/veridiumid/elasticsearch/bin/ -x=GET -p=/_cat

## modify number of replicas
bash /opt/veridiumid/elasticsearch/bin/ -x=PUT -p=/veridium.*/_settings -d='{"index":{"number_of_replicas":3}}'

## get nodes, indices, allocation of shards
bash /opt/veridiumid/elasticsearch/bin/ -x=GET -p=/_cat/nodes?v
bash /opt/veridiumid/elasticsearch/bin/ -x=GET -p=/_cat/indices?v
bash /opt/veridiumid/elasticsearch/bin/ -x=GET -p=/_cat/allocation?v   ## here you can see how many shards need to be realocated
bash /opt/veridiumid/elasticsearch/bin/ -x=GET -p=/_cat/shards         ## see how shards are allocated to each node
bash /opt/veridiumid/elasticsearch/bin/ -x=GET -p=/_cluster/allocation/explain?pretty   ## shards realocation reasons

## delete an indices
bash /opt/veridiumid/elasticsearch/bin/ -x=DELETE -p=/veridiumid.sessions-2023-03

##make and index readable
eops -x=PUT -p=/veridium.sessions-2023-08/_settings -d='{"settings":{"index.blocks.write":true}}'
###clone an index
eops -x=POST -p=/veridium.sessions-2023-08/_clone/veridiumbck.sessions-2023-08
##make and index writtable
eops -x=PUT -p=/veridium.sessions-2023-08/_settings -d='{"settings":{"index.blocks.write":false}}'

## copy the content of an index to the new index.
eops -x=POST -p=/_reindex -d='{"source":{"index":"veridium.sessions_history-2023-06"},"dest":{"index":"veridiumbck.sessions_history-2023-06"}}'

eops -x=DELETE -p=/veridiumbck.sessions_history-2023-06
eops -x=POST -p=/veridium.*/_flush
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.