code: @Override
      protected Result check() throws Exception {
          final IndicesExistsResponse indicesExistsResponse = client.admin().indices().prepareExists(indices).get();
  
          if (indicesExistsResponse.isExists()) {
              return Result.healthy();
          } else {
              return Result.unhealthy("One or more indices do not exist.");
          }
      }
docs: Perform a check of the number of documents in the Elasticsearch indices.
  
  @return if the Elasticsearch indices exist, a healthy {@link com.codahale.metrics.health.HealthCheck.Result};
  otherwise, an unhealthy {@link com.codahale.metrics.health.HealthCheck.Result} with a descriptive error
  message or exception
  @throws Exception if there is an unhandled error during the health check; this will result in
  a failed health check