Hi all:
I hava an ES cluster running on two node with ten shards and zero
replica. Onetime I find my page error and then enter es_head and find one
shard was unassigned.
I check es.log but nothing there. At last I found that ES was error
three hours ago by grep my webserver.log
So, is there some scrpt like nagios check_elasticsearch?
And, Is there some way to repair my cluster?
Hi all:
I hava an ES cluster running on two node with ten shards and zero
replica. Onetime I find my page error and then enter es_head and find one
shard was unassigned.
I check es.log but nothing there. At last I found that ES was error
three hours ago by grep my webserver.log
So, is there some scrpt like nagios check_elasticsearch?
Actually, there is one called just like that:
Or you can try to use check_http or check_http_json with the Cluster Health API:
and grep for "green" in the result, as suggested here:
I also wrote a couple of ES checks here:
They report the total number of documents and the total number of
inserts/sec between checks.
And if you want a more complete monitoring solution for your ES, I'd
suggest you look at SPM for Elasticsearch:
And, Is there some way to repair my cluster?
It's strange that you don't get anything in the logs. I'd try to
increase the logging verbosity (if you installed from the Debian
package that should be in /etc/elasticsearch/logging.yml), then
restart the node with the unassigned shard and see what the logs say
then regarding that shard.
I highly recommend check_http_json, mostly because I wrote it for this
exact purpose (monitoring Elasticsearch). The big selling point is
that it can easily drill down into nested JSON structures and can be
used to monitor totally arbitrary values.
Enjoy !
--
dan (phrawzty).
mozilla webops; european outpost.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.