Elasticsearch: Monitoring Elasticsearch with OpsDash

Quick Start

1. Install the OpsDash Smart Agent on a server which can connect to your Elasticsearch cluster. If you need instructions for how to do this, here they are:  Debian/UbuntuCentOS/RHELGeneric.

2. Edit the OpsDash Smart Agent configuration file at /etc/opsdash/agent.cfg and add a new service to monitor the overall Elasticsearch cluster (replace 1.2.3.4 with the IP address or hostname of any node in the cluster):

# choose a good, unique name for the service (here my-es-cluster-1 is used)
service "my-es-cluster-1" {
    type = "elasticsearch"
    host = "1.2.3.4"
}

3. You can also monitor a specific Elasticsearch index (named my.index in this example):

# choose a good, unique name for the service (here es-my.index is used)
service "es-my.index" {
    type = "elasticsearch-index"
    host = "1.2.3.4"
    index = "my.index"
}

4. You can also monitor a specific Elasticsearch node (use the id, name or hostname of the node as the value of node):

# choose a good, unique name for the service (here my-es-node-1 is used)
service "my-es-node-1" {
    type = "elasticsearch-index"
    host = "1.2.3.4"
    # can be the id, name or hostname of the node
    node = "node-name"
}

5. Reload the OpsDash Smart Agent so that it picks up the new configuration:

sudo service opsdash-agent reload

6. You should see the services appear under  https://app.opsdash.com/sources within a minute or so. If it does not, check the agent log file at /var/log/opsdash/agent.log.

Notes

  • You can also specify a port (port = 9200) in the service configuration block if needed.
  • The OpsDash Smart Agent will also collect and report metrics of the server itself, where it is installed. This will appear under the "Servers" section on the Sources page.