lib/riemann/babbler/plugins/dummy.rb in riemann-babbler-0.9.7 vs lib/riemann/babbler/plugins/dummy.rb in riemann-babbler-0.9.8
- old
+ new
@@ -1,7 +1,13 @@
class Riemann::Babbler::Dummy < Riemann::Babbler
def collect
- { :service => plugin.service , :state => 'ok' }
+ if tcp_port_aviable?(configatron.riemann.host, configatron.riemann.port)
+ logger.error "Riemann state 'ok' host: #{configatron.riemann.host}, port #{configatron.riemann.port}, proto tcp"
+ []
+ else
+ logger.error "Can't access to riemann host: #{configatron.riemann.host}, port #{configatron.riemann.port}, proto tcp"
+ end
+ Array.new
end
end