Created
January 1, 2013 17:36
-
-
Save piavlo/4428848 to your computer and use it in GitHub Desktop.
failure procs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -30,9 +30,16 @@ | |
@logger.fatal('SENSU NOT RUNNING!') | |
exit 2 | |
end | |
+ connection_auth_failure = Proc.new do | |
+ @logger.fatal('cannot auth to rabbitmq', { | |
+ :settings => @settings[:rabbitmq] | |
+ }) | |
+ @logger.fatal('SENSU NOT RUNNING!') | |
+ exit 2 | |
+ end | |
@rabbitmq = AMQP.connect(@settings[:rabbitmq], { | |
:on_tcp_connection_failure => connection_failure, | |
- :on_possible_authentication_failure => connection_failure | |
+ :on_possible_authentication_failure => connection_auth_failure | |
}) | |
@rabbitmq.logger = Sensu::NullLogger.get | |
@rabbitmq.on_tcp_connection_loss do |connection, settings| |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment