es监控

more es_check_available.sh

#!/bin/bash
available_flag=`curl -s -H "Content-Type: application/json" http://172.17.10.120:19200/?pretty|grep cluster_name|wc -l`
if [ $available_flag -eq 1 ] ; then
echo "ok"
else
echo "failed"
fi

原文地址:https://www.cnblogs.com/hxlasky/p/11555248.html