Skip to content

Instantly share code, notes, and snippets.

@mercul3s
Created September 3, 2014 20:34
Show Gist options
  • Save mercul3s/56d73cb74ed71bf0813e to your computer and use it in GitHub Desktop.
Save mercul3s/56d73cb74ed71bf0813e to your computer and use it in GitHub Desktop.
Example dashing job for elasticsearch cluster health
require 'elasticsearch'
# defaults to "localhost"
client = Elasticsearch::Client.new log: true
SCHEDULER.every '5s', :first_in => 0 do |job|
health = client.cluster.health
send_event('es_health', {value: health['status']})
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment