sensu-plugins / sensu-plugins-chef

This plugin provides native instrumentation for monitoring Chef, including service health checks (via chef-server-ctl) and chef node status, and a Sensu handler for removing stale Sensu clients.

Home Page:http://sensu-plugins.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Warning messages in handler-chef-node

runningman84 opened this issue · comments

Can these messages be supressed?

{"timestamp":"2016-09-09T15:09:24.324282+0000","level":"info","message":"handler output","handler":{"type":"pipe","filters":["keepalives","chef","every_3_occurrences","max_300_occurre
nces"],"severities":["warning","critical"],"command":"sudo handler-chef-node.rb","timeout":300,"name":"chef_node"},"output":["W, [2016-09-09T15:09:24.284687 #1379]  WARN -- : Terminat
ing task: type=:finalizer, meta={:method_name=>:__shutdown__}, status=:receiving\n\tCelluloid::TaskFiber backtrace unavailable. Please try `Celluloid.task_class = Celluloid::TaskThrea
d` if you need backtraces here.\n"]

@runningman84 what version of the gem are you seeing this on?

I would guess it has something with where Celluloid is being booted, but I would honestly have to look more into it to be sure. I saw some odd stuff with that handler that I did not need to do when re-writing the other checks to use ridley.

The current release sensu-plugins-chef-3.0.2 seems to have other problems:

warning: event filtering in sensu-plugin is deprecated, see http://bit.ly/sensu-plugin
warning: occurrence filtering in sensu-plugin is deprecated, see http://bit.ly/sensu-plugin
only handling every 60 occurrences: i-0fc808cbdfcf21b40/keepalive
/opt/sensu/embedded/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- hashie/logger (LoadError)
	from /opt/sensu/embedded/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
	from /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-chef-3.0.2/bin/handler-chef-node.rb:48:in `<top (required)>'
	from /opt/sensu/embedded/bin/handler-chef-node.rb:22:in `load'
	from /opt/sensu/embedded/bin/handler-chef-node.rb:22:in `<main>'

and this error with enable_deprecated_filtering set to false:

ignoring event -- no handler defined
/opt/sensu/embedded/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- hashie/logger (LoadError)
	from /opt/sensu/embedded/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
	from /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-chef-3.0.2/bin/handler-chef-node.rb:48:in `<top (required)>'
	from /opt/sensu/embedded/bin/handler-chef-node.rb:22:in `load'
	from /opt/sensu/embedded/bin/handler-chef-node.rb:22:in `<main>'

hmm there was no change to the handler (there were for 2 of the checks), I am guessing this is due to event filters being deprecated in newer versions of sensu. Will certainly need to be updated. I am not really using this handler myself though so it might be a bit before I get to this. I use aws-cleaner instead to remove nodes.