Skip to content

Commit

Permalink
Merge pull request #55 from digital-science/fix_elasticsearch_health
Browse files Browse the repository at this point in the history
Fix small problems in riemann elasticsearch
  • Loading branch information
Gavin Sandie committed Jul 15, 2013
2 parents 68bd1b4 + 79319ff commit a1b05b1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bin/riemann-elasticsearch
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class Riemann::Tools::Elasticsearch
opt :read_timeout, 'Faraday read timeout', type: :int, default: 2
opt :open_timeout, 'Faraday open timeout', type: :int, default: 1
opt :es_host, 'Elasticsearch host', default: "localhost"
opt :es_port, 'Elasticsearch port', tyoe: :int, default: 9200
opt :es_port, 'Elasticsearch port', type: :int, default: 9200


# Handles HTTP connections and GET requests safely
Expand All @@ -26,7 +26,7 @@ class Riemann::Tools::Elasticsearch
end
rescue => e
report(:host => uri.host,
:service => "elasticsearch",
:service => "elasticsearch health",
:state => "critical",
:description => "HTTP connection error: #{e.class} - #{e.message}"
)
Expand All @@ -46,7 +46,7 @@ class Riemann::Tools::Elasticsearch

if response.status != 200
report(:host => uri.host,
:service => "elasticsearch",
:service => "elasticsearch health",
:state => "critical",
:description => "HTTP connection error: #{response.status} - #{response.body}"
)
Expand Down

0 comments on commit a1b05b1

Please sign in to comment.