Created
September 3, 2014 20:34
-
-
Save mercul3s/56d73cb74ed71bf0813e to your computer and use it in GitHub Desktop.
Example dashing job for elasticsearch cluster health
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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