The ElasticHealthReporter utility enables you to monitor your network for the following:
- The status of the Elasticsearch service (i.e., stopped or running).
- Elasticsearch cluster health stats, which include:
- Cluster name, status and shards information
- Cluster indices information, like health, number of documents and status.
When you run the utility, it reads the Elasticsearch status and health; then sends this information via email notifications to one or more recipients.
Configure the Utility:
The utility comes with a configuration file, Imanami.ElasticHealthReporter.exe.config. Open it with a text editor to configure the following:
- An SMTP server to use for sending email notifications. This includes the fully qualified domain name or IP address of the SMTP server, a port for communicating with the server, and the credentials of an authorized user account on the server.
- The ‘sender’ email address. Email notifications would be sent from this ID.
- The ‘recipient’ email address. Email notifications would be sent to this ID. You can specify multiple recipients.
- The total number of nodes configured in the Elasticsearch cluster for GroupID.
Run the Utility:
You can run the ElasticHealthReporter utility in any of the three ways:
- Run the .exe file manually
Double-click the exe file, Imanami.ElasticHealthReporter.exe, to run the utility.
- Create a scheduled task to auto run the utility
In the Windows Rask Scheduler, create a new scheduled task that would auto run the utility on a scheduled basis.
- Run the utility via a command line
Type in the following commandlet in the Windows Command Prompt to run the utility.
[drive name]:\[path to the ElasticHealthReporter folder]>Imanami.ElasticHealthReporter.exe/[parameter_name]
Only one parameter is supported: “/d”. When you run the commandlet with this parameter, the information is displayed in the command prompt, in addition to the email notification.
Some examples of email notifications are given below.
- When the Elasticsearch service has stopped on the master node, an exception is shown:
- When the cluster is up and services are running on the slave node:
- When the cluster is up and services are running on the master node:
- When the cluster is broken due to the reason that the Elasticsearch service has stopped on the master node:
Notice that the cluster status is shown as ‘Yellow’ and the slave node has become its own master now. The cluster can be broken when port 9305 (default) is blocked for 90 seconds or more.
Cluster Health Indicators:
Health status is indicated by a color:
- Green – the service is running and the cluster is intact.
- Yellow – the service has stopped or the cluster is broken (for reasons such as network connectivity issues).
The cluster is running but with warnings, like Elasticsearch recommends a three-node topology for improved performance and high availability.
- Red – the server hosting the service is down.
|Note:||If the Elasticsearch service has stopped, you must manually restart it on the host machine.|
Imanami ElasticHealthReporter Utility Guide