• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

How do I monitor and restart Elasticsearch?

I've had some problems with my server as of late. When certain processes fail they automatically recover and I get notifications via email through WHM. Is there any way to monitor Elasticsearch and have WHM notify me of its failure and automatically restart it?

I'm just looking for solutions that others have used to monitor/restart Elasticsearch if it fails.
I have found ElasticSearch to be extremely reliable so I have not seen any need to monitor if it's running.

You mentioned:

What sort of problems?
The kind of problems that caused Elasticsearch to stop working. :)

It's only happened a couple of times but I've had Elasticsearch down for hours without knowing about it except that I am informed by a user or I see it in the backend error logs. I'm not always looking at the board to realize that search is down and I'm looking for a solution that will notice that the service has failed and attempt to restart it.
Just to clarify, no other server problems besides ElasticSearch stopped working?
To be specific, there were memory problems caused by some malicious traffic that caused Java and mySQL to crash but those two started back up automatically. ElasticSearch did not.

I'm trying to figure out a way for the server to monitor and report that ElasticSearch has stopped and then restart it. If I could only monitor that it stopped at least I would know so I could restart it.


Well-known member
I'ld recommend dedicated monitoring over my add-ons, as they don't cover that situation.

There are several addons by @Xon for Enhanced Search which improve it and provide additional information.
I use Datadog's free plan for monitoring my Elastic Search setup, works well with more information that I'll ever need :p