Skip to content

Commit

Permalink
Improve statsd metrics
Browse files Browse the repository at this point in the history
* do only track backend, not individual servers
* add amount of active/failed/down servers for alerting
  • Loading branch information
Florian Holzhauer committed Nov 26, 2015
1 parent 13de45c commit d1f9080
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bin/haproxyctl
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ begin
status.each do |line|
if not line.chomp == ""
stats=Hash[HEADERS.zip(line.split(','))]
%w(scur smax ereq econ rate).each do |statname|
%w(scur smax ereq econ rate act chkfail chkdown).each do |statname|
next unless stats['svname'] == 'BACKEND'
puts "HAProxy.#{INSTANCE}.#{stats['pxname']}.#{stats['svname']}.#{statname}:#{stats[statname]}|g"
end
end
Expand Down

0 comments on commit d1f9080

Please sign in to comment.