Class: Workarea::Monitoring::ElasticsearchCheck

Inherits:
Object
  • Object
show all
Defined in:
lib/workarea/monitoring/elasticsearch_check.rb

Instance Method Summary collapse

Instance Method Details

#checkObject



5
6
7
8
9
10
11
12
13
# File 'lib/workarea/monitoring/elasticsearch_check.rb', line 5

def check
  status = Workarea.elasticsearch.cluster.health.try(:[], 'status')

  if status_ok?(status)
    [true, 'Up']
  else
    [false, 'Down']
  end
end