mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 10:08:40 -05:00
Rescue and warn when graphite connection cannot be opened
This commit updates vmpooler graphite stats behavior when a connection cannot be opened to the graphite server to warn instead of allowing the full backtrace to be output to stderr. Without this change a backtrace is output to stderr when a graphite connection fails.
This commit is contained in:
parent
9f397f02fb
commit
e390efbb10
1 changed files with 2 additions and 0 deletions
|
|
@ -35,6 +35,8 @@ module Vmpooler
|
|||
socket.close
|
||||
end
|
||||
end
|
||||
rescue Errno::EADDRNOTAVAIL => e
|
||||
warn "Could not assign address to graphite server #{server}: #{e}"
|
||||
rescue StandardError => e
|
||||
warn "Failure logging #{path} to graphite server [#{server}:#{port}]: #{e}"
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue