How to check for available space in Elasticsearch with Python

Viewed 27

I am completely new to Python but I need make a script that will check the Elasticsearch disk space on AWS and return a warning if it is below a certain threshold. I imagine I would have to create a client instance of Elasticsearch, create a dictionary for the search query to search for space available? But I'm honestly not sure. I'm really hoping someone can provide a starter code syntax to kind of push me in the right direction.

1 Answers

You use CloudWatch metrics for that, e.g.:

  • FreeStorageSpace
  • ClusterUsedSpace
Related