How do I check the disk usage for elastic search?

Goal

Get the available disk size of elasticsearch

Assumptions

You already have elasticsearch set-up and running.

Steps

1. Log in to the app container using ssh

https://docs.platform.sh/development/access-site.html#accessing-the-application-with-ssh

2. Query the elastic search api

Run this curl snippet assuming your elasticsearch relationship is called elasticsearch. If the name is different, change the snippet below to reflect that.

curl -XGET 'elasticsearch.internal:9200/_cat/allocation?v&pretty'

shards disk.indices disk.used disk.avail disk.total disk.percent host   ip   node
4   124.7kb   22.6mb   1.8gb   1.9gb   1 127.0.0.0 127.0.0.0 2kv5ycbzprs4bomyaeu6zkvoh4

0

Comments

1 comment
Date Votes
  • The command is missing a quote character. Should be curl -XGET 'elasticsearch.internal:9200/_cat/allocation?v&pretty'

    0

Please sign in to leave a comment.

 

Didn't find what you were looking for?

New post