Pulled from gist https://gist.github.com/Oneiroi/bf141e3f9c6d4f899116/raw/6b500bc877f2f4cdf7f25a6102f25354e327aefd/clustercheck.py