超雑に。
% curl -i -XHEAD $(date --utc +"http://elasticsearch.myhost/${index_name}-%Y.%m.%d") HTTP/1.1 200 OK Server: nginx Date: Wed, 04 Nov 2015 07:22:06 GMT Content-Type: text/plain; charset=UTF-8 Content-Length: 0 Connection: keep-alive
fluentdなどでdailyでindexを作ってるという前提のもとに、今日の分のindexがあるかどうかみたいときはこうすると良い。 404が返ってこなければ良い。
※ nginxでリバースプロキシしてる環境です。