You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On one of our hosts being monitored by riemann-net, we just ran into the following error after installing and starting Docker:
TypeError nil can't be coerced into Fixnum
/usr/lib/ruby/gems/2.1.0/gems/riemann-tools-0.1.8/bin/riemann-net:71:in `-'
/usr/lib/ruby/gems/2.1.0/gems/riemann-tools-0.1.8/bin/riemann-net:71:in `block in tick'
/usr/lib/ruby/gems/2.1.0/gems/riemann-tools-0.1.8/bin/riemann-net:70:in `each'
/usr/lib/ruby/gems/2.1.0/gems/riemann-tools-0.1.8/bin/riemann-net:70:in `tick'
/usr/lib/ruby/gems/2.1.0/gems/riemann-tools-0.1.8/lib/riemann/tools.rb:101:in `block in run'
/usr/lib/ruby/gems/2.1.0/gems/riemann-tools-0.1.8/lib/riemann/tools.rb:99:in `loop'
/usr/lib/ruby/gems/2.1.0/gems/riemann-tools-0.1.8/lib/riemann/tools.rb:99:in `run'
/usr/lib/ruby/gems/2.1.0/gems/riemann-tools-0.1.8/lib/riemann/tools.rb:11:in `run'
/usr/lib/ruby/gems/2.1.0/gems/riemann-tools-0.1.8/bin/riemann-net:101:in `<top (required)>'
/usr/local/bin/riemann-net:23:in `load'
/usr/local/bin/riemann-net:23:in `<main>'
Looking at line 71 of that script as it was in version 0.1.8, it looks like the issue is that there is no check to see if a service is actually a key in @old_state before trying to calculate delta. When a new interface is added (e.g. the veth* or docker0 interfaces added when Docker is started), then the list of services in state has keys that aren't in @old_state, leading to the error we saw.
This same code is still in the riemann-net script on master. It looks like an easy fix would be to skip reporting for all services where @old_state.has_key? service is false.
The text was updated successfully, but these errors were encountered:
On one of our hosts being monitored by
riemann-net
, we just ran into the following error after installing and starting Docker:Looking at line 71 of that script as it was in version 0.1.8, it looks like the issue is that there is no check to see if a
service
is actually a key in@old_state
before trying to calculatedelta
. When a new interface is added (e.g. theveth*
ordocker0
interfaces added when Docker is started), then the list of services instate
has keys that aren't in@old_state
, leading to the error we saw.This same code is still in the
riemann-net
script on master. It looks like an easy fix would be to skip reporting for all services where@old_state.has_key? service
is false.The text was updated successfully, but these errors were encountered: