bin/metrics-haproxy.rb in sensu-plugins-haproxy-0.0.1.alpha.3 vs bin/metrics-haproxy.rb in sensu-plugins-haproxy-0.0.1
- old
+ new
@@ -158,11 +158,15 @@
output "#{config[:scheme]}.#{line[0]}.response_2xx", line[40]
output "#{config[:scheme]}.#{line[0]}.response_3xx", line[41]
output "#{config[:scheme]}.#{line[0]}.response_4xx", line[42]
output "#{config[:scheme]}.#{line[0]}.response_5xx", line[43]
output "#{config[:scheme]}.#{line[0]}.response_other", line[44]
- output "#{config[:scheme]}.#{line[0]}.requests_per_second", line[46]
- output "#{config[:scheme]}.#{line[0]}.requests_per_second_max", line[47]
+ unless line[46].nil?
+ output "#{config[:scheme]}.#{line[0]}.requests_per_second", line[46]
+ end
+ unless line[47].nil?
+ output "#{config[:scheme]}.#{line[0]}.requests_per_second_max", line[47]
+ end
output "#{config[:scheme]}.#{line[0]}.queue_time", line[58]
output "#{config[:scheme]}.#{line[0]}.connect_time", line[59]
output "#{config[:scheme]}.#{line[0]}.response_time", line[60]
output "#{config[:scheme]}.#{line[0]}.average_time", line[61]
elsif config[:server_metrics]