This was a little project for me to start learning GoLang for the first time. That is why my code is so messy :D
This is a basic script that runs multiple checks for an Elasticsearch cluster health and saves everything to text files. The script runs the following checks :
- Unavailable nodes based on the number of nodes you provide in your cluster.
- Checks indices status (Green, Yellow, Red). Warns you if it detects Yellow indices or Red ones.
- Verifies cluster's health using
_cluster/health
API call. - Checks allocations status using
_cat/allocation
API call - Looks and warns you for unassigned shards;
- Creates a directory from where it was run and saves every output to files.
- At the moment the script only supports elasticsearch nodes using TLS.
- I will try to use elasticsearch's golang module for next versions.
- I am also planning on adding more options and tasks in the future.
- If you have any remarks please let me know, twitter @Cyb3rSn0rlax.