Skip to content

Commit

Permalink
Merge pull request #8 from perezd/host-properties
Browse files Browse the repository at this point in the history
add host properties to cloudant, haproxy, redis.
  • Loading branch information
aphyr committed Oct 22, 2012
2 parents 7cd10d6 + 5616cbb commit e90c3bd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bin/riemann-cloudant
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class Riemann::Tools::Cloudant
json.each do |node|
return if node['svname'] == 'BACKEND' # this is just a sum of all nodes.

ns = "cloudant #{node['pxname']} #{node['tracked']}"
ns = "cloudant #{node['pxname']}"
cluster_name = node['tracked'].split('.')[0] # ie: meritage.cloudant.com

# report health of each node.
Expand All @@ -31,6 +31,7 @@ class Riemann::Tools::Cloudant
node.each do |property, metric|
unless ['pxname', 'svname', 'status', 'tracked'].include?(property)
report(
:host => node['tracked'],
:service => "#{ns} #{property}",
:metric => metric.to_f,
:state => (node['status'] == 'UP' ? 'ok' : 'critical'),
Expand Down
1 change: 1 addition & 0 deletions bin/riemann-haproxy
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class Riemann::Tools::Haproxy
row.each do |property, metric|
unless property == 'pxname' || property == 'svname'
report(
:host => @uri.host,
:service => "#{ns} #{property}",
:metric => metric.to_f,
:state => 'ok',
Expand Down
1 change: 1 addition & 0 deletions bin/riemann-redis
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class Riemann::Tools::Redis
def tick
@redis.info.each do |property, value|
report(
:host => opts[:redis_host],
:service => "redis #{property}",
:metric => value.to_f,
:state => 'ok',
Expand Down

0 comments on commit e90c3bd

Please sign in to comment.