 
     promises.push 'mongo'
 
-    #Check mongoDb connection
+    #Check mongoDb connections
     if config.mongoDbs
       mongoDbs = config.mongoDbs()
       for mongoDb in mongoDbs
         promises.push collectionNamesAsync(mongoDb)
 
-    if promises.length > 1
+    promises.push 'elasticsearch'
+
+    #Check elasticsearch connections
+    if config.elasticsearchClts
+      elasticsearchClts = config.elasticsearchClts
+      for elasticsearchClt in elasticsearchClts
+        promises.push pingAsync(elasticsearchClt)
+
+    if promises.length > 2
       Promise.settle(promises).then (results) ->
         mongo = {}
         postgres = {}
+        elastic = {}
         databases = postgres
         i = 0
         j = 1


module.exports = (params = {}) ->
  config =
    mongoDbs:         if params.mongoDbs?    then params.mongoDbs    else null
    postgresDbs:      if params.postgresDbs? then params.postgresDbs else null

  app = express()
  secondes = 0

          if promises[i] == 'mongo'
            databases = mongo
            j = 1
          else if promises[i] == 'elasticsearch'
            databases = elastic
            j = 1
          else
            if result.isFulfilled()
              databases['database_' + j] = true
            else
              databases['database_' + j] = false
            j++
          i++

        answer['postgres']        = postgres
        answer['mongo']           = mongo
        answer['elasticsearch']   = elastic
        res.send(answer)
    else
      res.send(answer)
