"; ?>
info();
// get es status
$curl = curl_init();
// construct url
curl_setopt($curl, CURLOPT_URL,"http://".$es_user.":".$es_password."@".$es_host."/_cluster/health");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
//executing curl
$status = curl_exec($curl);
// closing curl
curl_close($curl);
// decode
$array = json_decode($status, true);
// display result
echo "Informations
";
echo "Name: ".$response['name']."
";
echo "Cluster name: ".$response['cluster_name']."
";
echo "Elasticsearch version: ".$response['version']['number']."
";
echo "Cluster health status: ".$array['status']."
";
?>